Version and Alias Management
Managing Versions
After a function is created, the default version is latest. Each function has the latest version. After the function code is published, you can modify the version configuration as required.
Publishing a Version
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function.
- Select the latest version, click the Version tab, and click Publish New Version.
- Set the following information.
- Version: Enter a version number. If no version number is specified, the system automatically generates a version number based on the current date, for example, v20170819-190658.
- Description: Enter a description for the version. This parameter is optional.
- Click OK. The system automatically publishes a version. Then you will be redirected to the new version.Note
- You can publish up to 20 versions for a function.
- For a function whose latest version has been configured with reserved instances, the function configuration can be modified. By default, non-latest versions do not have reserved instances.
- No disk is attached to a new version created based on latest. Environment variables cannot be set if no trigger has been bound to the version.
Deleting a Version
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function.
- On the Version tab page of the latest version, select the version to delete.Note
- The latest version of a function cannot be deleted.
- If a function version associated with aliases is deleted, the aliases will also be deleted.
- Click OK to delete the version.
Deleting a version will permanently delete the associated code, configuration, alias, and event source mapping, but will not delete logs. Deleted versions cannot be recovered. Exercise caution when performing this operation.
Parent topic: Basic Operations
- Managing Versions