When the service of the LATEST version becomes stable, you can publish the service of this stable version to serve online requests. In addition, you can continue to develop more features over the LATEST version.
Publish a version
- Log on to the Function Compute console.
- In the top navigation bar, select a region.
- In the left-side navigation pane, click Services and Functions.
- On the Services and Functions page, click the service that you require. Then, click the Versions tab.
- On the Versions tab, click Publish new version in the upper-right corner. In the Publish a New Version By Using the LATEST Version dialog box, enter the version description and click OK.After the version is published, you can view the published version on the Versions tab.
Invoke a function in a service of a new version in the Function Compute console
- On the Services and Functions page, click the service that you require.
- In the upper-left corner of the Functions tab, select the new version ID from the Service Version drop-down list.
- Click the name of the function that you require. On the page that appears, click the Code tab.
- Click Invoke.After the function is executed, you can view the execution log in the lower part of the page. In the log, you can see that the value of the qualifier parameter that indicates the version information is 1 and the value of the versionId parameter that indicates the version ID is 1. The log shows that the executed function belongs to the service of version 1.
Invoke a function in a service of a new version by calling the API operation
To enable the system to invoke a function in a service of a specified version, you can append a period (.) as a separator to the serviceName parameter in the request and use the qualifier parameter to specify the version. The request is in the following format: