Gets a list of layer versions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:ListLayerVersions |
get |
*All Resource
|
None | None |
Request syntax
GET /2021-04-06/layers/{layerName}/versions HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| layerName |
string |
Yes |
The layer name. You can query only custom layer versions. You cannot query versions of official public layers. |
MyLayer |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| startVersion |
integer |
No |
The initial version of the layer. |
1 |
| limit |
integer |
No |
The maximum number of resources to return. Default value: 20. The value cannot exceed 100. The number of returned configurations is less than or equal to the specified number. |
20 |
| X-Fc-Account-Id |
string |
No |
The ID of your Alibaba Cloud account. |
188077086902**** |
| X-Fc-Date |
string |
No |
The time when the operation is called. The format is: EEE,d MMM yyyy HH:mm:ss GMT. |
Wed, 11 May 2022 09:00:00 GMT |
| X-Fc-Trace-Id |
string |
No |
The trace ID of the request for Function Compute API. |
rid281s****** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data struct returned. |
||
| layers |
array |
The list of layer versions. |
|
| Layer |
The details of the layer. |
None |
|
| nextVersion |
integer |
The initial version of the layer for the next query. |
21 |
Examples
Success response
JSON format
{
"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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.