All Products
Search
Document Center

Function Compute:ListAliases

Last Updated:Aug 21, 2025

You can call this operation to view the list of aliases.

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 

Request parameters

Parameter

Type

Position

Required

Example

Description

serviceName

String

Path

Yes

service_name

The name of the service.

limit

Integer

Query

No

20

The maximum number of resources to return. Default value: 20. Maximum value: 100. The number of returned resources is smaller than or equal to the specified number.

nextToken

String

Query

No

nextService

The token used to obtain more results. If the number of resources exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent invocations to obtain more results. You do not need to provide this parameter in the first invocation.

prefix

String

Query

No

prefix_text

The prefix that the names of returned resources must contain. For example, if Prefix is a, all returned resource names start with a.

startKey

String

Query

No

nextService

The starting position of the result list. Results are sorted in the alphabetical order and those results following startKey (inclusive) are listed.

Response parameters

Parameter

Type

Example

Description

aliases

Array

The list of aliases.

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-04-21T09:08:44Z

The time when the alias was created.

description

String

test_description

The description of the alias.

lastModifiedTime

String

2020-04-21T09:08:44Z

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.

nextToken

String

nextService

The token used to obtain more results. If this value is not returned, all results are returned.

Examples

Sample requests

GET /2016-08-15/services/service_name/aliases HTTP/1.1            

Sample success responses

JSON format

HTTP/1.1 200 OK 
Common response headers {
   "aliases": [
     {
       "aliasName": "alias_test",
       "versionId": "2",
       "description":"test_description ",
       "additionalVersionWeight": {},
       "createdTime": "2020-04-21T09:08:44Z",
       "lastModifiedTime": "2020-04-21T09:08:44Z"
     },
     {
       "aliasName": "alias_test",
       "versionId": "2",
       "description":"test_description",
      "additionalVersionWeight": null,
       "createdTime": "2020-07-27T06:37:29Z",
       "lastModifiedTime": "2020-07-27T06:37:29Z"
     }   ] }