发布层版本。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
POST /2021-04-06/layers/{layerName}/versions
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
layerName | string | 是 | 层的名称。最大长度为 128 个字符。 | MyLayer |
body | object | 否 | 层的信息。 | |
description | string | 否 | 层的描述信息。最大长度为 256 个字符。 | test |
compatibleRuntime | array | 否 | 层支持的运行时环境列表。 | |
string | 否 | 运行时名称。当前支持 nodejs20、nodejs18、nodejs16、nodejs14、nodejs12、nodejs10、nodejs8、nodejs6、python3.10、python3.9、python3、python2.7、java11、java8、php7.2、go1、dotnetcore3.1、dotnetcore2.1、custom.debian10和 custom。 | python3 | |
Code | Code | 是 | 层的代码。 | |
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。 | r4isu4sls**** |
返回参数
示例
正常返回示例
JSON
格式
{
"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,
"compatibleRuntime": [
"python3"
],
"arn": "xxxxxxxx#Layer-name#1"
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2022-12-16 | API 内部配置变更,不影响调用 | 看变更集 | ||||||||||||||
| ||||||||||||||||
2021-06-30 | OpenAPI 入参发生变更 | 看变更集 | ||||||||||||||
| ||||||||||||||||
2021-06-30 | OpenAPI 入参发生变更 | 看变更集 | ||||||||||||||
| ||||||||||||||||
2021-06-30 | OpenAPI 入参发生变更 | 看变更集 | ||||||||||||||
|