获取层列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
fc:ListLayers |
get |
*全部资源
|
无 | 无 |
请求语法
GET /2021-04-06/layers HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| prefix |
string |
否 |
层名称的前缀。限定返回的资源名称,假设 Prefix 为 a,则返回的资源名必须以 a 开头。 |
prefix-Layer |
| startKey |
string |
否 |
起始层的名称。设定结果从 startKey 之后(包括 startKey)按字母排序的第一个开始返回。 |
start-layer-name |
| nextToken |
string |
否 |
用来返回更多结果。第一次查询不需要提供这个参数,后续查询的 Token 从返回结果中获取。 |
next-layer-name |
| limit |
integer |
否 |
限定此次返回资源的数量。如果不设定,默认返回 20,最大不能超过 100。返回结果可以小于指定的数量,但不会多于指定的数量。 |
20 |
| public |
boolean |
否 |
是否只获取公共层,默认为 false。 |
true |
| official |
boolean |
否 |
是否获取官方公共层,当 official 设为 true 时,public 字段不生效,默认为 false。 |
true |
| X-Fc-Account-Id |
string |
否 |
您的阿里云账号(主账号)ID。 |
188077086902**** |
| X-Fc-Date |
string |
否 |
调用开始日期,格式为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 |
层的详细信息。 |
无 |
|
| nextToken |
string |
剩余列表的起始层名,用来返回更多结果。 |
next-layer-name |
示例
正常返回示例
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"
]
}
],
"nextToken": "next-layer-name"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。