Creates a version for a containerized application. You can iterate the application based on the version.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:CreateEdgeContainerAppVersion |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The application ID, which can be obtained by calling the ListEdgeContainerApps operation. |
app-88068867578379**** |
| Name |
string |
Yes |
The version name, which must be 6 to 128 characters in length. |
verson1 |
| Remarks |
string |
No |
The description of the version. |
test app |
| Containers |
array<object> |
Yes |
The container group to be deployed for this version, which contains information about images. |
[ { "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 |
| ProbeContent |
object |
Yes |
The content of the container health probe. |
For specific fields, refer to the official Kubernetes readiness probe definition. |
| 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\"}] |
Response elements
|
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 |
Examples
Success response
JSON format
{
"VersionId": "ver-87962637161651****",
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}
Error codes
|
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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.