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 your region.
- In the left-side navigation pane, click Service/Function.
- Click the target service and choose .
- In the Publish New Version from LATEST dialog box, enter the version description and click OK.
You can view the published version in the version list.
Run a function for a service of a new version in the Function Compute console
- On the Service/Function page, find the target service named service.
- In the upper-right corner of the function list, select the new version ID from the Service Version drop-down list.
- Click the target function named function. On the page that appears, click the Code tab.
- Click Invoke.
After the function code is executed, you can view the execution log at the lower part of the page. In the log, you can see that the value of the qualifier field that indicates the version information is 1 and the versionId field that indicates the parsing result is 1. The log shows that the executed function belongs to the service of version 1.
Run a function for a service of a new version by calling the Function Compute API
To enable the system to call a function for a service of a specified version, you can append a period (.) as a separator to serviceName in the request path and use qualifier to specify the version. The request is in the following format: