获取层的版本列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
fc:ListLayerVersions |
get |
*全部资源
|
无 | 无 |
请求语法
GET /2021-04-06/layers/{layerName}/versions HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| layerName |
string |
是 |
层的名称。仅支持查询自定义层版本,不支持查询官方公共层版本。 |
MyLayer |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| startVersion |
integer |
否 |
层的起始版本。 |
1 |
| limit |
integer |
否 |
限定此次返回资源的数量。如果不设定,默认返回 20,最大不能超过 100。返回结果可以小于指定的数量,但不会多于指定的数量。 |
20 |
| X-Fc-Account-Id |
string |
否 |
您的阿里云账号(主账号)ID。 |
188077086902**** |
| X-Fc-Date |
string |
否 |
API 调用时间,格式为EEE,d MMM yyyy HH:mm:ss GMT。 |
Wed, 11 May 2022 09:00:00 GMT |
| X-Fc-Trace-Id |
string |
否 |
请求的调用链 ID。 |
rid281s****** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
响应结构体。 |
||
| layers |
array |
层版本列表。 |
|
| Layer |
层的详细信息。 |
无 |
|
| nextVersion |
integer |
剩余列表起始版本号。 |
21 |
示例
正常返回示例
JSON格式
{
"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
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。