Melepaskan versi lapisan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:CreateLayerVersion |
create |
*LayerVersion
|
None | None |
Sintaks permintaan
POST /2021-04-06/layers/{layerName}/versions HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| layerName |
string |
Yes |
Nama lapisan. Nama dapat memiliki panjang hingga 128 karakter. |
MyLayer |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Informasi tentang lapisan. |
|
| description |
string |
No |
The layer description. The description can be up to 256 characters in length. |
test |
| compatibleRuntime |
array |
No |
The runtimes that are supported by the layer. |
|
|
string |
No |
The runtime. Valid values: 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, and custom. |
python3 |
|
| Code | Code |
Yes |
The layer code. |
|
| X-Fc-Account-Id |
string |
No |
ID akun Alibaba Cloud Anda. |
188077086902**** |
| X-Fc-Date |
string |
No |
Waktu saat fungsi dipanggil. Nilai dalam format EEE, d MMM yyyy HH:mm:ss GMT. |
Wed, 11 May 2022 09:00:00 GMT |
| X-Fc-Trace-Id |
string |
No |
ID jejak permintaan pemanggilan Function Compute. |
r4isu4sls**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The details of the layer. |
||
| layerName |
string |
The layer name. |
MyLayer |
| version |
integer |
The layer version. |
1 |
| description |
string |
The description of the layer version. |
the first layer |
| code | OutputCodeLocation |
The information about the layer code package. |
|
| codesize |
integer |
The size of the layer code package. Unit: bytes. |
421 |
| codeChecksum |
string |
The CRC-64 value of the layer code package. The value is calculated based on the ECMA-182 standard. |
2825179536350**** |
| createTime |
string |
The time when the layer version was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format. |
2022-01-01T11:08:00Z |
| acl |
integer |
The access mode of the layer. A value of 0 indicates that the layer is private, and a value of 1 indicates that the layer is public. By default, official layers are public. Custom layers can be set to private or public. |
0 |
| compatibleRuntime |
array |
The runtimes that are supported by the layer. |
|
|
string |
The runtime. Valid values: 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, and custom. |
python3 |
|
| arn |
string |
The Alibaba Cloud Resource Name (ARN) of the layer. |
xxxxxxxx#Layer-name#1 |
Contoh
Respons sukses
JSONformat
{
"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"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.