All Products
Search
Document Center

Function Compute:GetAlias

更新时间:Aug 20, 2025

You can call this operation to view information about an alias.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /services/{serviceName}/aliases/{aliasName} 

Request parameters

Parameter Type Position Required Example Description
serviceName String Path Yes service_name

The name of the service.

aliasName String Path Yes alias_test

The name of the alias.

Response parameters

Parameter Type Example Description
additionalVersionWeight Map

The additional version to which the alias points and the weight of the additional version.

  • The additional version takes effect only when the function is invoked.
  • The value consists of a version number and the corresponding weight. For example, 2:0.05 indicates that when a function is invoked, version 2 is the additional version, 5% of the traffic is distributed to the additional version, and 95% of the traffic is distributed to the major version.
Float 1

The traffic weight. Valid values: 0 to 1.

aliasName String alias_test

The name of the alias.

createdTime String 2020-07-27T06:37:29Z

The time when the alias was created.

description String test_description

The description of the alias.

lastModifiedTime String 2020-07-27T06:37:29Z

The last time when the alias was updated.

serviceName String service_name

The name of the service.

versionId String 2

The version to which the alias points.

Examples

Sample requests

GET /2016-08-15/services/service_name/aliases/alias_test HTTP/1.1
Common request headers

Sample success responses

JSON format

HTTP/1.1 200 OK
Common request headers
{
  "aliasName": "alias_test",
  "versionId": "2",
  "description": "test_description",
  "additionalVersionWeight": null,
  "createdTime": "2020-07-27T06:37:29Z",
  "lastModifiedTime": "2020-07-27T06:37:29Z"
}

Error codes

For a list of error codes, visit the API Error Center.