Function Compute allows you to create an alias for a service version. As a resource in Function Compute, an alias can be considered as a pointer to a specific service version. This topic describes how to create, update, view, and delete an alias in the Function Compute console.

Create an alias

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Services and Functions. In the Services pane, click the service that you require.
  4. On the Services and Functions page, click the service that you require. Then, click the Versions tab.
    version
  5. On the Versions tab, find the version for which you want to create an alias and click Create alias in the Actions column.
    Create alias
  6. In the Create alias dialog box, set the parameters and click OK.
    alias-information

    The following table describes the parameters.

    Parameter Required Description Example
    Alias name Yes The name of the alias. alias
    Description No The description of the alias. N/A
    Version No The version for which you want to create the alias. You do not need to set this parameter. 1
    Additional version ID No To route some requests to a canary release version for processing, you can select the canary release version from the Additional version ID drop-down list. 2
    Weight No To route some requests to a canary release version for processing, you must set this parameter. Enter the weight of the canary release version. 30
    On the Versions tab, click Alias. You can view the created alias. In this example, the alias points to version 1, the canary release version is version 2, and the weight of the canary release version is 30%.result-alias

View an alias

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Services and Functions. In the Services pane, click the service that you require.
  4. On the Services and Functions page, click the service that you require. Then, click the Versions tab.
    version
  5. On the Versions tab, click Alias to view the created alias.
    check-alias

Update an alias

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Services and Functions. In the Services pane, click the service that you require.
  4. On the Services and Functions page, click the service that you require. Then, click the Versions tab.
    version
  5. On the Versions tab, click the Alias tab.
    alias
  6. On the Alias tab, find the alias that you want to update and click Update alias in the Actions column.
    update-alias
  7. In the Update alias dialog box, modify the parameters and click OK.

    For more information about the parameters, see #table_0l6_dcm_iz6.

Delete an alias

When you delete an alias, only the alias is deleted. The version to which the alias points and triggers that points to the alias are retained. We recommend that you modify the alias associated with a trigger before you delete the alias.

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Services and Functions. In the Services pane, click the service that you require.
  4. On the Services and Functions page, click the service that you require. Then, click the Versions tab.
    version
  5. On the Versions tab, click the Alias tab.
    alias
  6. On the Alias tab, find the alias that you want to delete and click Delete alias in the Actions column. In the message that appears, click OK.
    delete-alias

API reference

Function Compute provides the following API operations to manage aliases:

The following API operations are related to aliases: