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.
- On the displayed function details page, select the latest version, and choose Operation > Publish new version in the upper right corner.
- 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 Publish.
You can publish a maximum of 10 versions for a function.
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 displayed function details page, select the version you want to delete, and choose Operation > Delete version in the upper right corner.
- The latest version of a function cannot be deleted.
- If a function version associated with aliases is deleted, the aliases will also be deleted.
- Enter DELETE and click Yes.
Deleted versions cannot be recovered. Exercise caution when performing this operation.
Managing Aliases
An alias represents a specific function version and can be used to invoke this version.
Creating an Alias
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function.
- Open the Create Alias dialog box in either of the following ways:
- On the displayed function details page, choose Operation > Create alias in the upper right corner.
- On the displayed function details page, click the Aliases tab and then click Create Alias.
- Set the following parameters:
- Alias: Enter an alias.
- Version: Select a version to be associated with the alias.
- Traffic Shifting: Choose whether to enable traffic shifting. If this function is enabled, you can distribute a specific percentage of traffic to the additional version.
- Additional Version: Select an additional version to be associated. The latest version cannot be used as an additional version.
- Weight: Enter an integer from 0 to 100.
- Description: Enter a description for the alias.
Figure 1 Specifying an additional version
- Click OK.
You can create a maximum of 10 aliases for a function.
Modifying an Alias
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function.
- On the displayed function details page, select the version for which you want to modify the alias, and click the Aliases tab.
- In the same row as the alias, click Edit.
- Modify the alias information, and click OK.
Deleting an Alias
Delete an alias using either of the following methods:
Method 1:
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function.
- On the displayed function details page, select the alias you want to delete, and choose Operation > Delete alias.
- Enter DELETE and click Yes.
Method 2:
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function.
- On the displayed function details page, select the version for which you want to delete the alias and click the Aliases tab.
- In the same row as the alias you want to delete, click Delete.
- Enter DELETE and click Yes.
Last Article: Test Management
Next Article: Function Monitoring
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.