All Products
Search
Document Center

Edge Security Acceleration:CreateEdgeContainerAppVersion

Last Updated:Nov 15, 2025

Creates a version for a containerized application. You can iterate the application based on the version.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
esa:CreateEdgeContainerAppVersioncreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The application ID, which can be obtained by calling the ListEdgeContainerApps operation.

app-88068867578379****
NamestringYes

The version name, which must be 6 to 128 characters in length.

verson1
RemarksstringNo

The description of the version.

test app
Containersarray<object>Yes

The container group to be deployed for this version, which contains information about images.
The image data contains the image address, startup command, parameters, environment variables, and probe rules. You can specify one or more images. The parameter value is a JSON string.

[ { "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}" } ]
objectYes

The details of the container.

NamestringYes

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

lxg-demo-er
ImagestringYes

The address of the image.

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

Specifies whether the image is a Container Registry image.

false
ACRImageInfoobjectNo

The information about the Container Registry image.

IsEnterpriseRegistrybooleanNo

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

false
DomainstringNo

The domain name of the Container Registry image.

1500.***.net
InstanceIdstringNo

The ID of the Container Registry instance.

xcdn-9axbo****
RegionIdstringNo

The regions in which the Container Registry instance resides.

cn-shanghai
RepoIdstringNo

The ID of the image repository.

crr-h1ghghu60ct****
RepoNamestringNo

The name of the image repository.

test_71
RepoNamespacestringNo

The namespace to which the image repository belongs.

safeline
TagstringNo

The tag of the Container Registry image.

3.40.2
TagUrlstringNo

The URL of the Container Registry image tag.

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

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

1C2G
CommandstringNo

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

nginx
ArgsstringNo

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

-a
StoragestringYes

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

0.5G
EnvVariablesstringNo

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

VITE_APP_TITLE=My App
PostStartstringNo

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

sh poststart.sh "echo hello world"
PreStopstringNo

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

sh prestop.sh "echo hello world"
ProbeTypestringYes

The type of the probe. Valid values:

  • exec: the command type.
  • tcpSocket: the TCP probe type.
  • httpGet: the HTTP access type.
exec
ProbeContentobjectYes

The content of the container health probe.

InitialDelaySecondsintegerNo

The latency for container probe initialization.

1
TimeoutSecondsintegerNo

The timeout period of the container health check.

1
PeriodSecondsintegerNo

The interval between container health checks.

1
SuccessThresholdintegerNo

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

1
FailureThresholdintegerNo

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

3
CommandstringNo

The command of the exec type probe.

echo ok
PortintegerNo

The health check port.

9991
HoststringNo

The domain name that is used for health checks.

www.rewrite.com
PathstringNo

The health check path.

/
SchemestringNo

The protocol that the container health check request uses.

http
HttpHeadersstringNo

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

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

Response parameters

ParameterTypeDescriptionExample
object
VersionIdstring

The ID of the created version.

ver-87962637161651****
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.NameThe 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.
400InvalidParameter.PercentageThe 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.
400InvalidParameter.ImageThe 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 @.
400InvalidParameter.HttpHeadersThe 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 @.
400InvalidParameter.appidThe 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.
400InvalidParameterThe specified parameter is invalid.The specified parameter is invalid.
400ParameterAlreadyExistParameter uniqueness verification failed. Check for duplicate parameter values.Parameter uniqueness verification failed. Check for duplicate parameter values.
400NameAlreadyExistsThe name already exists.Name already exists.
404InvalidApp.NotFoundThe 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.
500InternalErrorFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.

For a list of error codes, visit the Service error codes.