All Products
Search
Document Center

Function Compute (2.0):ListAliases

Last Updated:Apr 18, 2024

Queries all aliases of a service.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /2021-04-06/services/{serviceName}/aliases

Request parameters

ParameterTypeRequiredDescriptionExample
serviceNamestringYes

The name of the service.

demo-service
limitintegerNo

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

20
nextTokenstringNo

The token required to obtain more results. If the number of resources exceeds the limit, the nextToken parameter is returned. You can include the parameter in subsequent calls to obtain more results. You do not need to provide this parameter in the first call.

caeba0be03****f84eb48b699f0a4883
prefixstringNo

The prefix that the names of returned resources must contain.

prefix_text
startKeystringNo

The starting position of the result list. The returned resources are sorted in alphabetical order, and the resources that include and follow the resource specified by the startKey parameter are returned.

nextkey
X-Fc-Account-IdstringNo

The ID of your Alibaba Cloud account.

188077086902****
X-Fc-DatestringNo

The time on which the function is invoked. The format of the value is: EEE,d MMM yyyy HH:mm:ss GMT.

Wed, 11 May 2022 09:00:00 GMT
X-Fc-Trace-IdstringNo

The trace ID of the invocation request of Function Compute.

r9s89isisi****

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

aliasesobject []

The list of aliases.

additionalVersionWeightobject

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 a specific weight. For example, 2:0.05 indicates that when a function is invoked, Version 2 is the canary release version, 5% of the traffic is distributed to the canary release version, and 95% of the traffic is distributed to the major version.
float

The traffic weight. Valid values: 0 to 1.

1
aliasNamestring

The name of the alias.

test
createdTimestring

The time when the ConfigMaps were created.

2016-08-15T16:06:05.000+0000
descriptionstring

The description of the alias.

Sample alias.
lastModifiedTimestring

The time at which the system parameter was last modified.

2016-08-15T16:06:05.000+0000
versionIdstring

The ID of the version.

1
resolvePolicystring

The canary release mode. Valid values:

  • Random: random canary release. This is the default value.
  • Content: rule-based canary release.
Random
routePolicyRoutePolicy

The canary release rule. Traffic that meets the canary release rule is routed to the canary release instance.

nextTokenstring

The token used to obtain more results.

8bj81uI8n****

Examples

Sample success responses

JSONformat

{
  "aliases": [
    {
      "additionalVersionWeight": {
        "key": 1
      },
      "aliasName": "test",
      "createdTime": "2016-08-15T16:06:05.000+0000",
      "description": "Sample alias.\n",
      "lastModifiedTime": "2016-08-15T16:06:05.000+0000",
      "versionId": "1",
      "resolvePolicy": "Random",
      "routePolicy": {
        "condition": "AND",
        "policyItems": [
          {
            "type": "Header",
            "key": "x-test-uid",
            "value": "11111",
            "operator": "="
          }
        ]
      }
    }
  ],
  "nextToken": "8bj81uI8n****"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-08-04The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2021-06-29The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: X-Fc-Account-Id
    Added Input Parameters: X-Fc-Code-Checksum
    Added Input Parameters: X-Fc-Log-Type
    Added Input Parameters: X-Fc-Invocation-Type
    Added Input Parameters: X-Fc-Date
    Added Input Parameters: X-Fc-Trace-Id
2021-06-29The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: X-Fc-Account-Id
2021-06-29The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    delete Input Parameters: X-Fc-Account-Id