All Products
Search
Document Center

Function Compute:ListLayerVersions

Last Updated:Jun 02, 2023

Queries the versions of a layer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /2021-04-06/layers/{layerName}/versions

Request parameters

ParameterTypeRequiredDescriptionExample
layerNamestringYes

The name of the layer.

MyLayer
startVersionintegerNo

The initial version of the layer.

1
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
X-Fc-Account-IdstringNo

The ID of your Alibaba Cloud account.

188077086902****
X-Fc-DatestringNo

The time when Function Compute API is called. Specify the time in the EEE,d MMM yyyy HH:mm:ss GMT format.

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

The trace ID of the request for Function Compute API.

rid281s******

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

layersarray

The information about layer versions.

Layer

The details of the layer.

None
nextVersioninteger

The initial version of the layer for the next query.

21

Examples

Sample success responses

JSONformat

{
  "layers": [
    {
      "layerName": "MyLayer",
      "version": 1,
      "description": "the first layer",
      "code": {
        "repositoryType": "OSS",
        "location": "https://xyz.oss-cnxxx.aliyuncs.com/xxx/xxx/xxx"
      },
      "codeSize": 421,
      "codeChecksum": "2825179536350****",
      "createTime": "2022-01-01T11:08:00Z",
      "acl": 0,
      "arn": "xxxxxxxx#Layer-name#1",
      "arnV2": "acs:fc:cn-beijing:186824xxxxxx:layers/fc_layer/versions/1",
      "license": "MIT",
      "compatibleRuntime": [
        "python3"
      ]
    }
  ],
  "nextVersion": 21
}

Error codes

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

Change history

Change timeSummary of changesOperation
2021-06-29The input parameters of the API operation change.
Change itemChange content
Input ParametersThe input parameters of the API operation change.
    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 input parameters of the API operation change.
Change itemChange content
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: X-Fc-Account-Id
2021-06-29The input parameters of the API operation change.
Change itemChange content
Input ParametersThe input parameters of the API operation change.
    delete Input Parameters: X-Fc-Account-Id