All Products
Search
Document Center

Version

Last Updated: Jun 05, 2019

By using versioning, you can publish different service versions and work with them in your development workflow, to better manage your service in Function Compute.

Version

  • The newly created service has only one LATEST version. Before publishing any version, the LATEST version is the only version you have, and the LATEST version cannot be deleted.
  • Each version has a unique ID, version cannot be changed after publish.

When you publish a version, Function Compute takes a snapshot copy of all service configurations, functions, and function configurations (excluding triggers) in the LATEST version and assign a unique version number. You must explicitly publish the version using the console or command line tools. A new version can only be publish after a function or service configuration has changed since last version.version

Publish version

Please input description when publishing new version, it can not be edit after publish:

  • Description(Optional):version description。

Publish version using Console

Select LATEST in “Version” dropdown button, then choose “Publish new version” from “Operations” dropdown button:pv1

Publish version using fcli

  1. fcli service_version publish -s my-service -d 'description'

Get Version

Get version using Console

You can view and select the version you want from “Versioning” dropdown button

getversion

Get version using fcli

Specify -q(—qualifier) parameter when get service:

  1. fcli service get -s my-service -q '1'

Delete version

Deleting a version removes the associated functions and configurations permanently, triggers or aliases pointing to this version will not be removed. Functions under this version cannot be invoked after deletion.

Delete version using Console

Select version from “Version” dropdown button, choose “Delete version” from “Operations” dropdown:

deleteversion

Delete version using fcli

  1. fcli service_version delete -s my-service -v 1

Function Compute provides following APIs for version operations:

Following APIs also support version: