All Products
Document Center


Last Updated: Jun 05, 2019

Function Compute also support creating aliases for service versions. An alias is a pointer to a specific service version. It is not possible to create an alias without service or version. When accessing a service or function using an alias, Function Compute resolves the alias to the version it points to, and the caller does not need to know the specific version the alias is pointing to.


When you create an alias, you must specify the following properties:

  • (Required)aliasName:Indicates the alias name. This name must be unique under the current service and meet the following requirements:

    • The name can consist of letters, numbers, underscores (_), and hyphens (-).
    • The name must start with a letter or an underscore (_).
    • The name is case-sensitive.
    • The name must be between 1 to 128 characters in length.
    • The name must not be LATEST,LATEST is reserved by Function Compute as name of default version.
  • (Required)versionId:The version id alias is pointing to。The version id must not be Function Compute reserved version name, like LATEST.

  • (Optional)description:Description of the alias.

  • (Optional)additionalVersionWeight: The additional version and traffic shifting weight.

    • The additional version only takes effect during function invocation.
    • Pair of version number and traffic shifting weight. For example, 2:0.05 indicates shifting 5% of traffic to version 2 during invocation time.

Properties except aliasName can be changed.


Create alias

Please specify the major version of alias.

Create alias using console

Select the version from console “Version” dropdown button, and choose “Create alias” from “Operations” dropdown

Create alias using fcli

  1. fcli alias create -s my_service -a my_alias -v 1

Get alias

Get alias using console

Select alias from console “Version” dropdown button, and the service and functions you view belong to major version of selected alias.

Get alias using fcli

  1. fcli alias get -s my_service -a my_alias

Update alias

Update alias using console


Update alias using fcli

  1. fcli alias update -s my_service -a my_alias -v 2

Delete alias

Deleting alias removes only the alias, not the underlying version, or triggers pointing to it. Functions can not be invoke through this alias after deletion.

Delete alias using console

Select alias from Console, choose “Delete alias” from “Operations”.

Delete alias using fcli

  1. fcli alias delete -s my_service -a my_alias

Function Compute provides following APIs for alias operations:

Following APIs also support alias: