All Products
Search
Document Center

Edge Security Acceleration:CreateEdgeContainerAppVersion

Last Updated:Jun 11, 2026

Membuat versi untuk aplikasi terkontainerisasi. Anda dapat melakukan iterasi aplikasi berdasarkan versi tersebut.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

esa:CreateEdgeContainerAppVersion

create

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

AppId

string

Yes

ID aplikasi, yang dapat diperoleh dengan memanggil operasi ListEdgeContainerApps.

app-88068867578379****

Name

string

Yes

Nama versi, yang harus memiliki panjang 6 hingga 128 karakter.

verson1

Remarks

string

No

Deskripsi versi.

test app

Containers

array<object>

Yes

Kelompok kontainer yang akan diterapkan untuk versi ini, yang berisi informasi tentang image.
Data image berisi alamat image, perintah startup, parameter, variabel lingkungan, dan aturan probe. Anda dapat menentukan satu atau beberapa image. Nilai parameter adalah string JSON.

[ { "Name": "container1", "Image": "image1", "Spec": "1C2G", "Command": "/bin/sh", "Args": "-c hello", "ProbeType": "tcpSocket", "ProbeContent": "{\"Port\":8080}" }, { "Name": "container2", "Image": "image2", "Spec": "2C4G", "ProbeType": "httpGet", "ProbeContent": "{\"Path\":\"/\",\"Port\":80,\"InitialDelaySeconds\":10}" } ]

array<object>

Yes

The details of the container.

Name

string

Yes

The name of the container. The name must be unique in the same container group.

lxg-demo-er

Image

string

Yes

The address of the image.

registry-vpc.cn-shenzhen.aliyuncs.com/lihe****h/ea****ts_serv****am:3.**

IsACRImage

boolean

Yes

Specifies whether the image is a Container Registry image.

false

ACRImageInfo

object

No

The information about the Container Registry image.

IsEnterpriseRegistry

boolean

No

Specifies whether the image is an enterprise-level Container Registry image.

false

Domain

string

No

The domain name of the Container Registry image.

1500.***.net

InstanceId

string

No

The ID of the Container Registry instance.

xcdn-9axbo****

RegionId

string

No

The regions in which the Container Registry instance resides.

cn-shanghai

RepoId

string

No

The ID of the image repository.

crr-h1ghghu60ct****

RepoName

string

No

The name of the image repository.

test_71

RepoNamespace

string

No

The namespace to which the image repository belongs.

safeline

Tag

string

No

The tag of the Container Registry image.

3.40.2

TagUrl

string

No

The URL of the Container Registry image tag.

registry-vpc.cn-shenzhen.aliyuncs.com/****/eas***m:31

Spec

string

Yes

The compute specification of the container. Valid values: 1C2G, 2C4G, 2C8G, 4C8G, 4C16G, 8C16G, and 8C32G.

1C2G

Command

string

No

The command that is used to start the container. Separate the arguments with spaces.

nginx

Args

string

No

The arguments that are passed to the container startup command. Separate the parameters with spaces.

-a

Storage

string

Yes

The storage capacity. Valid values: 0.5G, 10G, 20G, and 30G.

0.5G

EnvVariables

string

No

The environment variables. Separate the environment variables with commas (,).

VITE_APP_TITLE=My App

PostStart

string

No

The command that is run before the container is started. Separate the arguments with spaces.

sh poststart.sh "echo hello world"

PreStop

string

No

The command that is run before the container is stopped. Separate the arguments with spaces.

sh prestop.sh "echo hello world"

ProbeType

string

Yes

The type of the probe. Valid values:

  • exec: the command type.

  • tcpSocket: the TCP probe type.

  • httpGet: the HTTP access type.

exec

ProbeContent

object

Yes

The content of the container health probe.

具体字段可参照k8s官方就绪探针的定义。

InitialDelaySeconds

integer

No

The latency for container probe initialization.

1

TimeoutSeconds

integer

No

The timeout period of the container health check.

1

PeriodSeconds

integer

No

The interval between container health checks.

1

SuccessThreshold

integer

No

The number of consecutive successful health checks required for a container to be considered as healthy.

1

FailureThreshold

integer

No

The number of consecutive failed health checks required for a container to be considered as unhealthy.

3

Command

string

No

The command of the exec type probe.

echo ok

Port

integer

No

The health check port.

9991

Host

string

No

The domain name that is used for health checks.

www.rewrite.com

Path

string

No

The health check path.

/

Scheme

string

No

The protocol that the container health check request uses.

http

HttpHeaders

string

No

The request headers that are included in the container health check request.

[{\"Content-Type\":\"application/json\"}]

Elemen respons

Element

Type

Description

Example

object

VersionId

string

The ID of the created version.

ver-87962637161651****

RequestId

string

The request ID.

04F0F334-1335-436C-A1D7-6C044FE73368

Contoh

Respons sukses

JSONformat

{
  "VersionId": "ver-87962637161651****",
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParameter.Name The specified Name is invalid. Please check the Name parameter, which must be between 6 and 128 characters. Kindly make the necessary modifications and call the interface again. The Name parameter is not valid. Check the Name parameter, which is between 6 and 128 characters. After modification, call the interface again.
400 InvalidParameter.Percentage The Percentage parameter is invalid. Please check the Percentage parameter, which should be in the range of 1-100. Modify it accordingly and call the interface again. The Percentage parameter is invalid. Check the Percentage parameter. The parameter range is 1-100. Modify the parameter and call the interface again.
400 InvalidParameter.Image The specified Image is invalid. Please check the Image parameter and make the necessary modifications and call the interface again. Illegal Image parameter. Please check the Image parameter, which cannot be assigned to illegal characters such @.
400 InvalidParameter.HttpHeaders The specified HttpHeaders is invalid. Please check the HttpHeaders parameter. Please make the necessary changes and call the interface again. The HttpHeaders parameter is invalid. Please check whether the HttpHeaders parameter is filled in. The parameter cannot contain @.
400 InvalidParameter.appid The format of the application ID is invalid. You can call ListEdgeContainerApps to obtain the application ID. The format of the application ID is invalid. You can call ListEdgeContainerApps to obtain the application ID.
400 InvalidParameter The specified parameter is invalid. The specified parameter is invalid.
400 ParameterAlreadyExist Parameter uniqueness verification failed. Check for duplicate parameter values. Parameter uniqueness verification failed. Check for duplicate parameter values.
400 NameAlreadyExists The name already exists. Name already exists.
500 InternalError Failed to call the service. Try again later or contact technical support. Failed to call the service. Try again later or contact technical support.
404 InvalidApp.NotFound The application does not exist. Check whether the application ID you specified is correct and try again. The application does not exist. Check whether the application ID you specified is correct and try again.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.