CreateContainerGroup
Creates an Elastic Container Instance (ECI) container group.
Operation description
When you call the CreateContainerGroup operation to create an ECI instance, the system automatically creates a service-linked role named AliyunServiceRoleForECI for you to access related cloud services such as ECS and VPC. For more information, see Service-linked role for Elastic Container Instance.
When you create an ECI instance, you can configure features such as instances, images, and storage as needed. For the parameters and descriptions related to each feature, see the following documentation:
Instances
ECI supports the following two methods to create instances:
Both creation methods support the following features:
Images
Networking
Storage
Container configuration
Logging and O&M
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eci:CreateContainerGroup |
create |
*ContainerGroup
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| ZoneId |
string |
No |
The zone to which the instance belongs. If this parameter is left empty, the system selects a zone. Default value: empty. |
cn-hangzhou-b |
| SecurityGroupId |
string |
No |
The ID of the security group to which the instance belongs. Instances within the same security group can access each other. If no security group is specified, the system automatically uses the default security group in the selected region. You must ensure that the inbound rules of this security group include the protocols and ports that the containers need to expose. If no default security group exists in the region, the system performs automatic creation of a default security group and adds the declared container protocols and ports to the inbound rules of the security group. |
sg-uf66jeqopgqa9hdn**** |
| VSwitchId |
string |
No |
The ID of the vSwitch to which the instance belongs. You can specify multiple vSwitch IDs. A maximum of 10 vSwitch IDs can be specified at a time. Separate multiple vSwitch IDs with commas (,), for example, If no vSwitch is specified, the system automatically uses the default vSwitch in the default VPC of the selected region. If no default VPC or default vSwitch exists in the region, the system performs automatic creation of a default VPC and a default vSwitch. Note
The number of IP addresses in the vSwitch CIDR block determines the maximum number of ECI instances that can be created in the vSwitch. Plan the CIDR block in advance. |
vsw-bp1xpiowfm5vo8o3c****,vsw-bp1rkyjgr1xwoho6k**** |
| ContainerGroupName |
string |
Yes |
The name of the ECI instance, which is the name of the container group. The name must meet the following requirements:
|
nginx-test |
| RestartPolicy |
string |
No |
The restart policy of the instance. Valid values:
Default value: Always. |
Always |
| EipInstanceId |
string |
No |
The ID of the Elastic IP Address (EIP). |
eip-uf66jeqopgqa9hdn**** |
| Cpu |
number |
No |
The number of vCPUs for the instance. Unit: cores. |
1.0 |
| Memory |
number |
No |
The memory size for the instance. Unit: GiB. |
2.0 |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-uf66jeqopgqa9hdn**** |
| DnsPolicy |
string |
No |
The DNS policy. Valid values:
|
Default |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
123e4567-xxxx-12d3-xxxx-426655440000 |
| InstanceType |
string |
No |
The ECS instance type. Multiple instance types are supported. For more information, see Create an instance by specifying an ECS instance type. |
ecs.c5.xlarge |
| ImageSnapshotId |
string |
No |
The ID of the image cache. For more information, see Use an image cache to accelerate instance creation. |
imc-2zebxkiifuyzzlhl**** |
| RamRoleName |
string |
No |
The name of the RAM role for the instance. ECI and ECS share the same instance RAM roles. For more information, see Use an instance RAM role by calling API operations. |
RamTestRole |
| TerminationGracePeriodSeconds |
integer |
No |
The grace period for the program to handle operations before shutdown. Unit: seconds. |
60 |
| AutoMatchImageCache |
boolean |
No |
Specifies whether to automatically match an image cache. Default value: false. |
false |
| Ipv6AddressCount |
integer |
No |
The number of IPv6 addresses. Set the value to 1, which indicates that an ECI instance can be associated with one IPv6 address. |
1 |
| ActiveDeadlineSeconds |
integer |
No |
The validity period of the ECI instance. After this period expires, the instance is forcibly terminated. Unit: seconds. |
1000 |
| SpotStrategy |
string |
No |
The preemption policy for the instance. Valid values:
Default value: NoSpot. |
SpotWithPriceLimit |
| SpotPriceLimit |
number |
No |
The maximum hourly price for the spot instance. The value can be accurate to three decimal places. This parameter is required when SpotStrategy is set to SpotWithPriceLimit. |
0.025 |
| ScheduleStrategy |
string |
No |
The scheduling policy for the ECI instance when multiple zones are configured by specifying multiple vSwitches in the VSwitchId parameter. Valid values:
For more information, see Create an instance in multiple zones. |
VSwitchOrdered |
| CorePattern |
string |
No |
The custom directory for saving core files generated by coredump. For more information, see Save core files to a volume. Note
The configured path cannot start with |
/xx/xx/core |
| ShareProcessNamespace |
boolean |
No |
Specifies whether to use a shared namespace. Default value: false. |
false |
| AutoCreateEip |
boolean |
No |
Specifies whether automatic creation of an EIP is performed and the EIP is attached to the ECI instance. |
true |
| EipBandwidth |
integer |
No |
The bandwidth of the EIP. Default value: 5 Mbit/s. |
5 |
| EipISP |
string |
No |
The line type of the EIP. Valid values:
|
BGP |
| EipCommonBandwidthPackage |
string |
No |
The ID of the existing Internet Shared Bandwidth instance to associate. |
cbwp-2zeukbj916scmj51m**** |
| HostName |
string |
No |
The hostname. |
test |
| IngressBandwidth |
integer |
No |
The inbound bandwidth limit. Unit: Bps. |
1024000 |
| EgressBandwidth |
integer |
No |
The outbound bandwidth limit. Unit: Bps. |
1024000 |
| CpuOptionsCore |
integer |
No |
The number of physical CPU cores. Custom settings are supported only for specific instance types. |
2 |
| CpuOptionsThreadsPerCore |
integer |
No |
The number of threads per core. Custom settings are supported only for specific instance types. A value of 1 indicates that hyper-threading is disabled. |
2 |
| CpuOptionsNuma |
string |
No |
This parameter is not supported. |
1 |
| EphemeralStorage |
integer |
No |
The size of the additional temporary storage space. Unit: GiB. |
20 |
| Tag |
array<object> |
No |
The list of tags. You can bind up to 20 tags. For more information, see Use tags to manage instances. |
|
|
object |
No |
The list of tags. You can bind up to 20 tags. For more information, see Use tags to manage instances. |
||
| Key |
string |
No |
The tag key. If you specify this parameter, it cannot be an empty string and must be unique. The tag key can be up to 64 characters in length. It cannot start with |
version |
| Value |
string |
No |
The tag value. If you specify this parameter, it can be an empty string. The tag value can be up to 128 characters in length. It cannot start with |
3 |
| ImageRegistryCredential |
array<object> |
No |
The information about the image repository. |
|
|
object |
No |
The information about the image repository. |
||
| Password |
string |
No |
The password for the image repository. |
yourpassword |
| Server |
string |
No |
The address of the image repository. |
registry-vpc.cn-shanghai.aliyuncs.com |
| UserName |
string |
No |
The username for the image repository. |
yourusername |
| Container |
array<object> |
Yes |
The container information. |
|
|
array<object> |
No |
The container information. |
||
| ReadinessProbe.TimeoutSeconds |
integer |
No |
The timeout period for the readiness probe. Default value: 1 second. Minimum value: 1 second. |
1 |
| ReadinessProbe.SuccessThreshold |
integer |
No |
The minimum consecutive successes for the probe to be considered successful after having failed. Default value: 1. The value must be 1. |
1 |
| SecurityContext.Capability.Add |
array |
No |
Grants specific privileges to processes in the container. Valid values: NET_ADMIN and NET_RAW. Note
NET_RAW is not supported by default. To use NET_RAW, submit a ticket. |
|
|
string |
No |
Grants specific privileges to processes in the container. Valid values: NET_ADMIN and NET_RAW. Note
NET_RAW is not supported by default. To use NET_RAW, submit a ticket. |
NET_ADMIN |
|
| ReadinessProbe.TcpSocket.Port |
integer |
No |
The port number for the TCP socket check when you use a TCP socket to perform health checks. Note
When you configure the ReadinessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
8000 |
| ReadinessProbe.HttpGet.Scheme |
string |
No |
The protocol type for the HTTP GET request when you use an HTTP request to perform health checks. Valid values:
Note
When you configure the ReadinessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
HTTP |
| LivenessProbe.PeriodSeconds |
integer |
No |
The interval at which the liveness probe is performed. Default value: 10 seconds. Minimum value: 1 second. |
5 |
| SecurityContext.ReadOnlyRootFilesystem |
boolean |
No |
Specifies whether the root file system of the container is read-only. Valid value: true. |
true |
| EnvironmentVar |
array<object> |
No |
The environment variables of the container. |
|
|
object |
No |
The environment variables of the container. |
||
| Key |
string |
No |
The name of the environment variable. The name must be 1 to 128 characters in length and can contain letters, digits, and underscores (_). It cannot start with a digit. |
PATH |
| Value |
string |
No |
The value of the environment variable. The value can be up to 256 characters in length. |
/usr/local/bin |
| FieldRef.FieldPath |
string |
No |
The reference for the environment variable value. Valid value: status.podIP. |
status.podIP |
| LivenessProbe.TcpSocket.Port |
integer |
No |
The port number for the TCP socket check when you use a TCP socket to perform health checks. Note
When you configure the LivenessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
8080 |
| Tty |
boolean |
No |
Specifies whether to allocate a TTY for the container. Default value: false. Set this parameter to true when the Command parameter is set to /bin/bash. |
false |
| WorkingDir |
string |
No |
The working directory of the container. |
/usr/local/ |
| Arg |
array |
No |
The arguments for the startup command of the container. You can specify up to 10 arguments. |
100 |
|
string |
No |
The arguments for the startup command of the container. You can specify up to 10 arguments. |
100 |
|
| Stdin |
boolean |
No |
Specifies whether to allocate a buffer for standard input during the container runtime. If this parameter is not specified, a read from the standard input of the container results in an EOF. Default value: false. |
false |
| LivenessProbe.InitialDelaySeconds |
integer |
No |
The number of seconds after the container has started before the liveness probe is initiated. |
5 |
| VolumeMount |
array<object> |
No |
The volume mount information. |
|
|
object |
No |
The volume mount information. |
||
| MountPropagation |
string |
No |
The mount propagation setting for the volume. Mount propagation allows volumes mounted by a container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:
Default value: None. |
None |
| MountPath |
string |
No |
The directory in the container where the volume is mounted. Note
The content in the mount directory of the container is directly overwritten by the content of the volume. Proceed with caution. |
/pod/data |
| ReadOnly |
boolean |
No |
Specifies whether the volume is read-only. Default value: false. |
false |
| SubPath |
string |
No |
The subpath of the volume. |
data2/ |
| Name |
string |
No |
The name of the volume. The value must be the same as the Name parameter in Volume. |
default-volume1 |
| ImagePullPolicy |
string |
No |
Pull image pull policy. Valid values:
|
Always |
| StdinOnce |
boolean |
No |
Specifies whether the standard input stream remains in the enabling status across multiple attached sessions when standard input is set to true. |
false |
| LifecyclePreStopHandlerTcpSocketPort |
integer |
No |
The port number for the TCP socket check when you use a TCP socket for the preStop callback function Settings. |
90 |
| LifecyclePostStartHandlerHttpGetScheme |
string |
No |
The protocol type for the HTTP GET request when you use an HTTP request for the postStart callback function Settings. Valid values:
|
HTTPS |
| ReadinessProbe.PeriodSeconds |
integer |
No |
The interval at which the liveness probe is performed. Default value: 10 seconds. Minimum value: 1 second. |
3 |
| LivenessProbe.SuccessThreshold |
integer |
No |
The minimum consecutive successes for the probe to be considered successful after having failed. Default value: 1. The value must be 1. |
1 |
| Command |
array |
No |
The startup commands of the container. You can specify up to 20 commands. Each command can be up to 256 characters in length. |
sleep |
|
string |
No |
The startup commands of the container. You can specify up to 20 commands. Each command can be up to 256 characters in length. |
sleep |
|
| LifecyclePostStartHandlerHttpGetHost |
string |
No |
The host address that accepts the HTTP GET request when you use an HTTP request for the postStart callback function Settings. |
10.0.XX.XX |
| TerminationMessagePolicy |
string |
No |
The message notification policy. Default value: empty. Currently, only message notifications of MSMQ are supported. |
FallbackToLogsOnError |
| ReadinessProbe.HttpGet.Path |
string |
No |
The path for the HTTP GET request when you use an HTTP request to perform health checks. Note
When you configure the ReadinessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
/healthz |
| LivenessProbe.Exec.Command |
array |
No |
The command executed in the container when you use a command line to perform health checks. Note
When you configure the LivenessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
|
|
string |
No |
The command executed in the container when you use a command line to perform health checks. |
cat /tmp/healthy |
|
| LifecyclePostStartHandlerTcpSocketPort |
integer |
No |
The port number for the TCP socket check when you use a TCP socket for the postStart callback function Settings. |
80 |
| LifecyclePostStartHandlerHttpGetPath |
string |
No |
The path for the HTTP GET request when you use an HTTP request for the postStart callback function Settings. |
/healthyz |
| LifecyclePostStartHandlerExec |
array |
No |
The command executed in the container when you use a command line for the postStart callback function Settings. |
["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] |
|
string |
No |
The command executed in the container when you use a command line for the postStart callback function Settings. |
["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] |
|
| LifecyclePreStopHandlerHttpGetPath |
string |
No |
The path for the HTTP GET request when you use an HTTP request for the preStop callback function Settings. |
/healthyz |
| Port |
array<object> |
No |
The port number. |
|
|
object |
No |
The port number. |
||
| Protocol |
string |
No |
The protocol type. Valid values:
|
TCP |
| Port |
integer |
No |
The port number. Valid values: 1 to 65535. |
80 |
| TerminationMessagePath |
string |
No |
The path for the termination message of the container. |
/tmp/termination-log |
| LifecyclePreStopHandlerHttpGetScheme |
string |
No |
The protocol type for the HTTP GET request when you use an HTTP request for the preStop callback function Settings. Valid values:
|
HTTP |
| LivenessProbe.HttpGet.Scheme |
string |
No |
The protocol type for the HTTP GET request when you use an HTTP request to perform health checks. Valid values:
Note
When you configure the LivenessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
HTTP |
| ReadinessProbe.HttpGet.Port |
integer |
No |
The port number for the HTTP GET request when you use an HTTP request to perform health checks. Note
When you configure the ReadinessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
8080 |
| LifecyclePostStartHandlerTcpSocketHost |
string |
No |
The host address for the TCP socket check when you use a TCP socket for the postStart callback function Settings. |
10.0.XX.XX |
| Gpu |
integer |
No |
The number of GPUs allocated to the container. |
1 |
| ReadinessProbe.InitialDelaySeconds |
integer |
No |
The number of seconds after the container has started before the liveness probe is initiated. |
3 |
| LifecyclePreStopHandlerExec |
array |
No |
The command executed in the container when you use a command line for the preStop callback function Settings. |
["/bin/sh", "-c","echo Hello from the preStop handler > /usr/share/message"] |
|
string |
No |
The command executed in the container when you use a command line for the preStop callback function Settings. |
["/bin/sh", "-c","echo Hello from the preStop handler > /usr/share/message"] |
|
| Memory |
number |
No |
The memory size of the container. Unit: GiB. |
0.5 |
| Name |
string |
Yes |
The name of the container. |
nginx |
| LifecyclePreStopHandlerHttpGetHost |
string |
No |
The host address that accepts the HTTP GET request when you use an HTTP request for the preStop callback function Settings. |
10.0.XX.XX |
| LifecyclePreStopHandlerTcpSocketHost |
string |
No |
The host address for the TCP socket check when you use a TCP socket for the preStop callback function Settings. |
10.0.XX.XX |
| Image |
string |
Yes |
The container image. |
registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest |
| LifecyclePreStopHandlerHttpGetPort |
integer |
No |
The port number for the HTTP GET request when you use an HTTP request for the preStop callback function Settings. |
88 |
| LivenessProbe.FailureThreshold |
integer |
No |
The minimum consecutive failures for the probe to be considered failed after having succeeded. Default value: 3. |
3 |
| ReadinessProbe.Exec.Command |
array |
No |
The command executed in the container when you use a command line to perform health checks. Note
When you configure the ReadinessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
|
|
string |
No |
The command executed in the container when you use a command line to perform health checks. |
cat /tmp/healthy |
|
| LifecyclePreStopHandlerHttpGetHttpHeader |
array<object> |
No |
The generated HTTP request header parameters. |
|
|
object |
No |
The generated HTTP request header parameters. |
||
| Value |
string |
No |
The custom field value in the HTTP GET request header when you use an HTTP request for the preStop callback function Settings. |
test-preStop |
| Name |
string |
No |
The custom field name in the HTTP GET request header when you use an HTTP request for the preStop callback function Settings. |
Xiao-Custom-Header |
| ReadinessProbe.FailureThreshold |
integer |
No |
The minimum consecutive failures for the probe to be considered failed after having succeeded. Default value: 3. |
3 |
| Cpu |
number |
No |
The number of vCPUs allocated to the container. Unit: cores. |
0.25 |
| LivenessProbe.HttpGet.Port |
integer |
No |
The port number for the HTTP GET request when you use an HTTP request to perform health checks. Note
When you configure the LivenessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
8888 |
| LivenessProbe.HttpGet.Path |
string |
No |
The path for the HTTP GET request when you use an HTTP request to perform health checks. Note
When you configure the LivenessProbe parameter, you can specify only one of the following check methods: HttpGet, Exec, and TcpSocket. |
/healthz |
| LivenessProbe.TimeoutSeconds |
integer |
No |
The timeout period for the readiness probe. Default value: 1 second. Minimum value: 1 second. |
1 |
| SecurityContext.RunAsUser |
integer |
No |
The user ID used to run the container. |
1000 |
| LifecyclePostStartHandlerHttpGetPort |
integer |
No |
The port number for the HTTP GET request when you use an HTTP request for the postStart callback function Settings. |
5050 |
| LifecyclePostStartHandlerHttpGetHttpHeader |
array<object> |
No |
The generated HTTP request header parameters. |
|
|
object |
No |
The generated HTTP request header parameters. |
||
| Value |
string |
No |
The value of the custom field in the HTTP GET request header when the postStart callback function is configured by using an HTTP request. |
test-postStart |
| Name |
string |
No |
The name of the custom field in the HTTP GET request header when the postStart callback function is configured by using an HTTP request. |
Xiao-Custom-Header |
| EnvironmentVarHide |
boolean |
No |
Specifies whether to hide environment variable information when you query the details of an elastic container instance. Valid values:
|
false |
| SecurityContextRunAsGroup |
integer |
No |
The user group used to run the container. |
3000 |
| SecurityContextRunAsNonRoot |
boolean |
No |
Specifies whether to run the container in non-root mode. Valid values:
|
true |
| SecurityContextPrivileged |
boolean |
No |
Specifies whether to enable privileged mode for the container. Valid values:
Note
The privileged container feature is in invitational preview. To use this feature, submit a ticket. |
true |
| Volume |
array<object> |
No |
The volume mount information. |
|
|
array<object> |
No |
The volume mount information. |
||
| Type |
string |
No |
The type of the volume. Valid values:
|
ConfigFileVolume |
| DiskVolume.DiskSize |
integer |
No |
The size of the DiskVolume. Unit: GiB. |
15 |
| NFSVolume.Path |
string |
No |
The path of the NFS volume. |
/share |
| DiskVolume.FsType |
string |
No |
The file system type of the DiskVolume. |
xfs |
| FlexVolume.FsType |
string |
No |
The file system type of the mounted volume. The default value depends on the FlexVolume script. |
ext4 |
| HostPathVolume.Type |
string |
No |
The type of the HostPath volume. Valid values:
Note
HostPath volumes are available only to allowlisted users. |
Directory |
| ConfigFileVolume.DefaultMode |
integer |
No |
The default permissions of the ConfigFileVolume. |
0644 |
| NFSVolume.ReadOnly |
boolean |
No |
Specifies whether the NFS volume is read-only. Default value: false. |
false |
| ConfigFileVolume.ConfigFileToPath |
array<object> |
No |
The information about the ConfigFile volume. If multiple ConfigFileToPath items are configured, the total length of the corresponding Content values cannot exceed 60 KB. |
|
|
object |
No |
The information about the ConfigFile volume. |
||
| Path |
string |
No |
The relative path of the configuration file relative to the mount directory. |
test/config-test.cnf |
| Mode |
integer |
No |
The permissions of the configuration file. If this parameter is not specified, the value of ConfigFileVolume.DefaultMode is used. The value is a four-digit octal number. For example, 0644 indicates that the permissions are rw-r--r--, which means the user has read and write permissions, the group has read permissions, and others have read permissions. The permissions are described as follows:
|
0644 |
| Content |
string |
No |
The content of the configuration file. The content must be Base64-encoded. |
bGl1bWk= |
| HostPathVolume.Path |
string |
No |
The directory path of the HostPath volume on the host. |
/pod/data |
| FlexVolume.Options |
string |
No |
The list of options for the FlexVolume object. The options are in key-value pairs and passed in JSON format. For example, when you use FlexVolume to mount a cloud disk, Options represents the configuration parameters of the cloud disk. You can configure the following parameters:
|
{"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"} |
| FlexVolume.Driver |
string |
No |
The driver type used when you use the FlexVolume plug-in to mount a volume. Valid values:
|
alicloud/disk |
| NFSVolume.Server |
string |
No |
The address of the NFS server. |
3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com |
| DiskVolume.DiskId |
string |
No |
The ID of the DiskVolume. |
d-xx |
| Name |
string |
No |
The name of the volume. |
default-volume1 |
| EmptyDirVolume.Medium |
string |
No |
The storage medium of the EmptyDirVolume. The default value is empty, which indicates that the node file system is used. The value can be set to memory, which indicates that memory is used. |
memory |
| EmptyDirVolume.SizeLimit |
string |
No |
The size of the EmptyDirVolume. Unit: GiB. |
2 |
| InitContainer |
array<object> |
No |
The list of init containers. |
|
|
array<object> |
No |
The list of init containers. |
||
| SecurityContext.Capability.Add |
array |
No |
Grants specific privileges to processes in the container. Valid values: NET_ADMIN and NET_RAW. Note
NET_RAW is not supported by default. To use NET_RAW, submit a ticket. |
|
|
string |
No |
Grants specific privileges to processes in the container. Valid values: NET_ADMIN and NET_RAW. Note
NET_RAW is not supported by default. To use NET_RAW, submit a ticket. |
NET_ADMIN |
|
| Image |
string |
No |
The image used by the container. |
nginx |
| VolumeMount |
array<object> |
No |
The list of mounted volumes. |
|
|
object |
No |
The list of mounted volumes. |
||
| MountPropagation |
string |
No |
The mount propagation setting for the volume. Mount propagation allows volumes mounted by a container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:
Default value: None. |
None |
| MountPath |
string |
No |
The mount directory. The content in the mount directory of the container is directly overwritten by the content of the volume. Use this parameter with caution. |
/usr/share/ |
| ReadOnly |
boolean |
No |
Specifies whether the mount path is read-only. Default value: false. |
false |
| SubPath |
string |
No |
The subdirectory under the volume. This allows a pod to mount different directories under the same volume to different directories in the container. |
/usr/sub/ |
| Name |
string |
No |
The name of the mounted volume. |
test-empty |
| Port |
array<object> |
No |
The port number of the init container. |
|
|
object |
No |
The port number of the init container. |
||
| Protocol |
string |
No |
The protocol type. Valid values:
|
TCP |
| Port |
integer |
No |
The port number. Valid values: 1 to 65535. |
8888 |
| SecurityContext.ReadOnlyRootFilesystem |
boolean |
No |
Specifies whether the root file system of the container is read-only. Currently, you can only set this parameter to true. |
true |
| TerminationMessagePath |
string |
No |
The source of the termination message when the container exits. When the container exits, the termination message is retrieved from the specified termination message file. |
/tmp/termination-log |
| EnvironmentVar |
array<object> |
No |
The list of environment variables for the container. |
|
|
object |
No |
The list of environment variables for the container. |
||
| Key |
string |
No |
The name of the environment variable. The name must be 1 to 128 characters in length and can contain letters, digits, and underscores (_). It cannot start with a digit. |
Path |
| Value |
string |
No |
The value of the environment variable. The value can be up to 256 characters in length. |
/usr/bin/ |
| FieldRef.FieldPath |
string |
No |
The reference for the environment variable value. Valid value: status.podIP. |
status.podIP |
| ImagePullPolicy |
string |
No |
Pull image pull policy. Valid values:
|
Always |
| WorkingDir |
string |
No |
The working directory. |
/usr/local |
| Cpu |
number |
No |
The number of vCPUs allocated to the container. Unit: cores. |
0.5 |
| Arg |
array |
No |
The startup arguments of the container. |
10 |
|
string |
No |
The startup arguments of the container. |
10 |
|
| Command |
array |
No |
The startup commands of the container. |
sleep |
|
string |
No |
The startup commands of the container. |
sleep |
|
| Gpu |
integer |
No |
The number of GPUs allocated to the container. |
1 |
| SecurityContext.RunAsUser |
integer |
No |
The user ID used to run the container. |
587 |
| Memory |
number |
No |
The memory size of the container. Unit: GiB. |
1.0 |
| TerminationMessagePolicy |
string |
No |
The mount information. Default value: empty. |
***** |
| Name |
string |
No |
The name of the container. |
test-init |
| DnsConfig.NameServer |
array |
No |
The list of IP addresses of DNS servers. |
172.10.*.** |
|
string |
No |
The list of IP addresses of DNS servers. |
172.10.*.** |
|
| DnsConfig.Search |
array |
No |
The list of DNS search domains. |
svc.local.kubenetes |
|
string |
No |
The list of DNS search domains. |
svc.local.kubernetes |
|
| DnsConfig.Option |
array<object> |
No |
The list of options for the object. |
|
|
object |
No |
The list of options for the object. |
||
| Value |
string |
No |
The value of the option. |
value |
| Name |
string |
No |
The name of the option. |
name |
| HostAliase |
array<object> |
No |
The alias of the ECI. |
|
|
object |
No |
The alias of the ECI. |
||
| Ip |
string |
No |
The IP address to be added. |
1.1.1.1 |
| Hostname |
array |
No |
The hostname to be added. |
hehe.com |
|
string |
No |
The hostname to be added. |
hehe.com |
|
| SecurityContext.Sysctl |
array<object> |
No |
Modifies safe sysctl parameters through the security context. For more information, see Configure a security context. |
|
|
object |
No |
Modifies safe sysctl parameters through the security context. For more information, see Configure a security context. |
||
| Value |
string |
No |
The value of the safe sysctl parameter when you modify sysctl parameters through the security context. |
65536 |
| Name |
string |
No |
The name of the safe sysctl parameter when you modify sysctl parameters through the security context. Valid values:
|
net.ipv4.ping_group_range |
| HostSecurityContext.Sysctl |
array<object> |
No |
Modifies unsafe sysctl parameters through the security context. For more information, see Configure a security context. |
|
|
object |
No |
Modifies unsafe sysctl parameters through the security context. For more information, see Configure a security context. |
||
| Value |
string |
No |
The value of the unsafe sysctl parameter when you modify sysctl parameters through the security context. |
65536 |
| Name |
string |
No |
The name of the unsafe sysctl parameter when you modify sysctl parameters through the security context. Valid values:
|
kernel.msgmax |
| NtpServer |
array |
No |
The NTP server. |
ntp.cloud.aliyuncs.com |
|
string |
No |
The NTP server. |
ntp.cloud.aliyuncs.com |
|
| AcrRegistryInfo |
array<object> |
No |
The list of ACR Enterprise instance information. For more information, see Pull ACR images without a password. |
|
|
object |
No |
The list of ACR Enterprise instance information. |
||
| Domain |
array |
No |
The domain name of the ACR Enterprise instance. By default, all domain names of the instance are used. You can specify one or more domain names. Separate multiple domain names with commas. |
*****-****-registry.cn-beijing.cr.aliyuncs.com |
|
string |
No |
The domain name of the ACR Enterprise instance. By default, all domain names of the instance are used. You can specify one or more domain names. Separate multiple domain names with commas. |
*****-****-registry.cn-beijing.cr.aliyuncs.com |
|
| InstanceName |
string |
No |
The name of the ACR Enterprise instance. |
acr-test |
| InstanceId |
string |
No |
The instance ID of the ACR Enterprise instance. |
cri-nwj395hgf6f3**** |
| RegionId |
string |
No |
The region ID of the ACR Enterprise instance. |
cn-beijing |
| ArnService |
string |
No |
The ARN of the RAM role in the account of resource ownership for resources such as ECI instances. |
acs:ram::1609982529******:role/role-assume |
| ArnUser |
string |
No |
The ARN of the RAM role in the account that owns the ACR instance. |
acs:ram::1298452580******:role/role-acr |
| SpotDuration |
integer |
No |
The protection period of the spot instance. Unit: hours. Default value: 1. A value of 0 indicates that no protection period is configured. |
1 |
| StrictSpot |
boolean |
No |
Specifies whether to execute the task periodically. Valid values:
|
true |
| PlainHttpRegistry |
string |
No |
The address of the self-pull image repository. When you create an ECI instance by using an image from a self-pull image repository that uses the HTTP protocol, you must configure this parameter so that ECI uses the HTTP protocol to pull the image. This prevents image pull failures caused by protocol mismatches. |
"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80" |
| InsecureRegistry |
string |
No |
The address of the self-managed image repository. When you create an ECI instance by using an image from a self-managed image repository that uses a self-signed certificate, you must configure this parameter to skip certificate verification. This prevents image pull failures caused by certificate verification failures. |
"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80" |
| ImageAccelerateMode |
string |
No |
The image acceleration mode. Valid values:
|
imc |
| Ipv6GatewayBandwidthEnable |
boolean |
No |
Specifies whether to enable IPv6 Internet communication for the ECI instance. |
true |
| Ipv6GatewayBandwidth |
string |
No |
The peak Internet bandwidth of the IPv6 address. This parameter takes effect only when Ipv6GatewayBandwidthEnable is set to true. Valid values:
|
100 |
| ContainerResourceView |
boolean |
No |
Specifies whether to enable the container resource view feature. When the allocated ECI specifications are higher than the requested specifications, you can enable this feature to ensure that the resources visible in the container match the requested resources. |
false |
| FixedIp |
string |
No |
Specifies whether to enable a fixed IP address for the instance. A value of true indicates that a fixed IP address is enabled. For more information, see Configure a fixed IP address for an ECI instance. |
true |
| FixedIpRetainHour |
integer |
No |
The retention period of the fixed IP address after it becomes idle. This is the retention period of the fixed IP address after the instance with the fixed IP address is released. Unit: hours. Default value: 48. |
24 |
| DataCacheBucket |
string |
No |
The data cache bucket. |
default |
| DataCachePL |
string |
No |
The performance level of the cloud disk used for data caching. ESSDs are preferred. Default value: PL1. |
PL1 |
| DataCacheProvisionedIops |
integer |
No |
The provisioned read and write IOPS of the ESSD AutoPL disk used for data caching. Valid values: 0 to min{50000, 1000 × Capacity - Baseline performance}. Baseline performance = min{1800 + 50 × Capacity, 50000}. For more information, see ESSD AutoPL disks. |
40000 |
| DataCacheBurstingEnabled |
boolean |
No |
Specifies whether to enable the burst feature for the ESSD AutoPL disk used for data caching. For more information, see ESSD AutoPL disks. |
false |
| DryRun |
boolean |
No |
Specifies whether to only precheck the request. Valid values:
|
false |
| PrivateIpAddress |
string |
No |
The private IP address of the ECI instance. Only IPv4 addresses are supported. Make sure that the IP address is not in use. |
172.16.0.1 |
| OsType |
string |
No |
The operating system of the ECI instance. Valid values:
Note
Windows instances are in invitational preview. To use Windows instances, submit a ticket. |
Windows |
| CpuArchitecture |
string |
No |
The CPU architecture of the ECI instance. Valid values:
|
ARM64 |
| ComputeCategory |
array |
No |
The computing power category. For more information, see Create an instance by specifying a computing power category. |
|
|
string |
No |
The computing power category. Valid values:
|
economy |
|
| GpuDriverVersion |
string |
No |
The GPU driver version. Note
Only specific instance types support switching the GPU driver version. For more information, see Create an instance by specifying GPU specifications. |
tesla=535 |
| MaxPendingMinute |
integer |
No |
The maximum pending duration of the ECI instance. Unit: minutes. Valid values: 10 to 1440. If the pending duration exceeds this value, the system automatically terminates the instance. Default value: 240. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which uniquely identifies the request. |
89945DD3-9072-47D0-A318-353284CFC7B3 |
| ContainerGroupId |
string |
The instance ID, which is the container group ID. |
eci-uf6fonnghi50u374**** |
Examples
Success response
JSON format
{
"RequestId": "89945DD3-9072-47D0-A318-353284CFC7B3",
"ContainerGroupId": "eci-uf6fonnghi50u374****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Account.Arrearage | Your account has an outstanding payment. | Your account has an outstanding payment. |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | Request validation has been passed with DryRun flag set. |
| 400 | InvalidParameter.CPU.Memory | The specified cpu and memory are not allowed | |
| 400 | InvalidParameter.DuplicatedName | The container group include containers with duplicate names. | The container group contains containers with duplicate names. |
| 400 | InvalidParameter.DuplicatedVolumeName | The container group includes volumes with duplicate names. | The container group includes volumes with duplicate names. |
| 400 | IncorrectStatus | %s | The specified instance status is invalid. |
| 400 | ServiceNotEnabled | %s | The service on which this request depends has not been activated. Please activate and try again. |
| 400 | ImageSnapshot.IncorrectStatus | %s | The status of the specified snapshot is invalid. |
| 400 | ImageSnapshot.NotSupport | %s | Image caching based on data disk snapshots is not available for all users. If you want to enable this function, contact us. |
| 400 | DiskVolume.NotSupport | The disk volume is not supported. | Disk volume does not support your structure. If you want to enable this function, contact us. |
| 400 | RamRole.NotSupport | The RAM role is not supported. | The RAM role is not supported. |
| 400 | DiskNumber.LimitExceed | The maximum number of disks in an instance is exceeded. | The maximum number of disks in an instance is exceeded. |
| 400 | InvalidPaymentMethod.InsufficientBalance | No payment method is specified for your account. We recommend that you add a payment method or add funds to the prepayment balance. | No payment method is specified for your account. We recommend that you add a payment method or add funds to the prepayment balance. |
| 400 | DiskVolume.NotInSameZone | The instance to be created and the disk are not in the same zone. | The instance to be created and the disk are not in the same zone. |
| 400 | NoPermission | You are not authorized to use the "Product on ECI" feature. | |
| 400 | HighCpuMemConfigRequired | You need to apply to be added to the whitelist of the specified CPU and memory. | You need to apply to be added to the whitelist of the specified CPU and memory. |
| 400 | RecommendEmpty.InstanceTypeFamilyNotMatched | The recommended instance type is unavailable in the current zone. Try again later. | No recommended instance types are available in the current zone. Try again later or create instances in another zone. |
| 400 | LocalDiskAmountNotMatch | The number of local volumes does not match the instance type. | The number of local disks does not match the instance type. |
| 400 | Payfor.CreditPayInsufficientBalance | Your payment credit line is insufficient. | Your payment credit line is insufficient. |
| 400 | InvalidOperation.KMS.InstanceTypeNotSupport | The specified instance is invalid. Only I/O optimized instances support KMS key. | The specified instance is invalid. Only I/O optimized instances support KMS key. |
| 400 | InvalidParameter.Encrypted.KmsNotEnabled | KMS must be enabled for encrypted disks. | Encrypted cloud disks require Key Management Service to be enabled. |
| 400 | InvalidParameter.KMS.EncryptedIllegal | After configuring the parameter KmsKeyId, you must enable encryption. | After configuring the parameter KmsKeyId, you must enable encryption. |
| 400 | InvalidSpotCpuMemorySpec | The specified CPU and memory are not allowed. You must create spot ECI using standard ECS specifications for CPU and memory. | A standard ECS instance type must be used to create a spot elastic container instance. |
| 400 | Ipv6AddressNotSupportVsw | IPv6 is not supported in the specified vSwitch. | The vSwitch does not have IPv6 enabled. |
| 400 | Ipv6AddressNotSupport | Ipv6 is not supported in specified region. | The current region does not support IPv6 addresses. |
| 400 | Ipv6AddressNotSupportInstanceType | IPv6 is not supported for the specified instance type. | The specified instance type does not support IPv6. |
| 400 | EipPayInsufficientBalance | Your account does not have enough balance to purchase eip. | The current account balance is insufficient to purchase an EIP. |
| 400 | EipPurchaseFlowControl | Request was denied due to eip frequent purchase. | EIP purchases are too frequent. Try again later. |
| 400 | Throttling | You have made too many requests within a short time; your request is denied due to request throttling | |
| 400 | JobInstanceBatchCreateNotSupport | ECI job instance not support batch create | |
| 400 | JobInstanceDiskNotSupport | ECI job instance not support disk volume | |
| 400 | JobInstanceEipNotSupport | ECI job instance not support eip | |
| 400 | JobInstanceFeatureNotMatch | ECI job instance feature not match | |
| 400 | JobInstanceImageCacheNotSupport | ECI job instance not support image cache | |
| 400 | JobInstanceIPv6NotSupport | ECI job instance not support IPv6 | |
| 400 | JobInstanceRamRoleNotSupport | ECI job instance not support ram role | |
| 400 | JobInstanceRegionNotSupport | ECI job instance not support in this region | |
| 400 | JobInstanceSpotNotSupport | ECI job instance not support spot | |
| 400 | InvalidInstanceTypeForEciSpotDurationBuy | Current instance type does not support spot duration instance. | The specified instance type does not support spot instances with custom duration. |
| 400 | InvalidInstanceTypeForEciBuy | Sales of this current instance type is not supported in eci. | The specified instance type is not within the range of container group types available for sale. |
| 400 | InstanceTypeNotMatchCpuArch | %s. | The CPU architecture of the specified ECS instance type does not match the specified CPU architecture. |
| 400 | JobInstanceEcsInstanceTypeNotSupport | Job-optimized elastic container instances cannot be created by specifying ECS instance types. | Job-optimized container group instances do not support creation with a specified ECS instance type. |
| 400 | PrivatePoolInstanceSpotNotSupport | Spot is not supported for PrivatePool. | |
| 400 | DryRun.Success | This request is a dryrun request with successful result. | The dry run request has passed validation. |
| 400 | PrivateIpAddress.Already.InUse | The specific PrivateIpAddress already in use. | The private IP address is already in use. |
| 400 | IncorrectOperation | %s | You cannot perform this operation on the specified resource. |
| 400 | FeatureBasedConstraintConflict | A conflict occurs in specified feature constraints: [%s]. | A conflict occurs in specified feature constraints |
| 400 | OperationFailed.RiskControl | %s. | We have detected that your account has security risks. Please contact customer service personnel for details. |
| 400 | RISK.RISK_CONTROL_REJECTION | To protect the security of your account, your request has been denied by the risk control system. Please contact Alibaba Cloud Customer Service for details. | In order to protect the security of your account, your request was rejected by the wind control system. Please contact customer service for details. |
| 400 | InvalidInstanceTypeForRaid | %s. | The current specification does not support Raid. |
| 400 | RegionDissolved | %s. | Alibaba Cloud is scheduled to make adjustments in this region. ECI service in this region will be suspended. |
| 400 | MultiAttachedCloudDiskNotSupport | %s. | You cannot mount a cloud disk with the multi-mount function enabled (that is, an NVMe shared disk). |
| 400 | InvalidParameter.ValueExceeded | ecs instance type or vcpu quota exceeded. | Specifications exceed the specified quota range |
| 403 | OperationDenied.VswZoneMisMatch | The specified VSwitchId is not in the specified Zone. | |
| 403 | QuotaExceeded | %s quota exceeded. | |
| 403 | Zone.NotOnSale | The specified zone is not available for purchase. | The zone in which you want to create the instance is no longer available for purchase. Use a different zone, or the vSwitch of the specified VPC cannot be used in this zone. |
| 403 | Forbidden.RiskControl | This operation has been identified as an abnormal operation and cannot be processed. | This operation has been identified as abnormal and cannot be processed. |
| 403 | Forbidden.SubUser | The specified action is not available for you. | |
| 403 | Forbidden.OnlyForInvitedTest | Eci create action is only open to invited users during public beta. | |
| 403 | OperationDenied.SecurityGroupMisMatch | The specified VSwitchId and SecurityGroupId are not in the same VPC. | |
| 403 | InvalidVSwitchId.IpNotEnough | The specified VSwitch does not have enough IP addresses. | |
| 403 | Forbidden.UserBussinessStatus | This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again. | The operation is forbidden because the account has an overdue payment. Top up your account and try again. |
| 403 | Forbidden.UserNotRealNameAuthentication | This operation is not allowed, because you have not passed the real-name verification. | The operation is forbidden because the user has not completed real-name verification. |
| 403 | InvalidUser.PassRoleForbidden | The RAM user is not authorized to assume a RAM role. | The RAM user is not authorized to assume a RAM role. |
| 403 | NoPermission | The RAM role does not belong to ECS. | |
| 403 | OperationDenied.NoStock | Sales of this resource are temporarily suspended in the specified zone. We recommend that you use the multi-zone creation function to avoid the risk of insufficient resource. For more information, see https://help.aliyun.com/document_detail/157290.html | |
| 403 | InvalidParameter.KMS.KeyId.Forbidden | You are not authorized to access the specified KMSKeyId. | You are not authorized to access the specified KMSKeyId. |
| 403 | Forbidden.AccountClosed | The operation is forbidden. Your account has been closed. | The operation is forbidden because the user account has been deregistered. |
| 403 | InvalidOperation.ResourceManagedByCloudProduct | The operation is forbidden. The security group has been managed by another cloud product. | The security group is managed by another cloud service and cannot be modified. |
| 403 | Spot.NotMatched | %s. We recommend that you use the create multi-zone function to avoid insufficient inventory. For more information, see https://help.aliyun.com/document_detail/157290.html | |
| 403 | SecurityRisk.3DVerification | We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. | A security risk has been detected on your default credit or debit card. Verify your card by using the link in the email. |
| 403 | CreateServiceLinkedRole.Denied | Please make sure the account has ram:CreateServiceLinkedRole permission. | Please make sure the account has ram:CreateServiceLinkedRole permission. |
| 403 | Throttling.Vcpu.PerDay | The maximum number of request for the day has been exceeded. | The maximum number of request for the day has been exceeded. |
| 403 | FeatureAccessRestricted | Access to this feature:[%s] is restricted. Please contact Alibaba Cloud ECI support to request access. | Access to this feature is restricted. Please contact Alibaba Cloud ECI support to request access. |
| 404 | ImageSnapshot.NotFound | The specified snapshot does not exist. | The snapshot for the image cache does not exist. |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | The specified cloud disk does not exist. |
| 404 | InvalidParameter.KMS.KeyId.NotFound | The specified KMSKeyId does not exist. | The specified KMSKeyId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.