All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroups

Last Updated:Mar 25, 2024

Queries information about multiple elastic container instances at a time.

Operation description

  • After an elastic container instance is terminated, its underlying computing resources are recycled. By default, other resources, such as elastic IP addresses (EIPs), that are created together with the instance are released together with the instance.

  • The metadata of an instance in the final status (Failed, Succeeded, or Expired) is retained based on the following rules:

    • All metadata information is retained within 1 hour since the instance enters the final status.
    • One hour after the instance enters the final status, only the latest 100 entries of metadata information in each region are retained.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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
eci:DescribeContainerGroupsLIST
  • containergroup
    acs:eci:{#regionId}:{#accountId}:containergroup/*
  • containergroup
    acs:eci:{#regionId}:{#accountId}:containergroup/{#containergroupId}
  • eci:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance.

cn-hangzhou
ZoneIdstringNo

The ID of the zone in which the elastic container instances are deployed. If you do not specify this parameter, the system selects a zone.

This parameter is empty by default.

cn-hangzhou-h
VSwitchIdstringNo

The ID of the vSwitch to which the elastic container instances are connected.

vsw-bp1jrgfqqy54kg5hc****
NextTokenstringNo

The token that determines the start point of the query. If this parameter is left empty, all results have been returned.

Note You do not need to specify this parameter in the first request. Starting from the second request, you can obtain the token from the result returned by the previous request.
d78f2dd8-5979-42fe-****-b16db43be5bc
LimitintegerNo

The maximum number of resources to return. Default value: 20. Maximum value: 20.

Note The number of returned resources is less than or equal to the specified number.
20
ContainerGroupIdsstringNo

The IDs of the elastic container instances in JSON format. You can specify up to 20 IDs.

["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"]
ContainerGroupNamestringNo

The name of the elastic container instance.

test
StatusstringNo

The status of the elastic container instance. Valid values:

  • Pending: The instance is being started.
  • Running: The instance is running.
  • Succeeded: The instance runs successfully.
  • Failed: The instance fails to run.
  • Scheduling: The instance is being created.
  • ScheduleFailed: The instance fails to be created.
  • Restarting: The instance is being restarted.
  • Updating: The instance is being updated.
  • Terminating: The instance is being terminated.
  • Expired: The instance expires.
Running
ResourceGroupIdstringNo

The ID of the resource group to which the instance belongs.

rg-aekzh43v*****
WithEventbooleanNo

Specify whether to return event information.

true
Tagobject []No

The tag of the instances.

KeystringNo

The tag key of the instances.

name
ValuestringNo

The tag value of the instances.

test
ComputeCategorystringNo

The computing power type of the elastic container instance. A value of economy specifies economic elastic container instances.

economy
SecurityGroupIdstringNo

The ID of the security group to which the instance belongs.

sg-uf66jeqopgqa9hdn****

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The number of queried instances.

1
NextTokenstring

The token that determines the start point of the query.

d78f2dd8-5979-42fe-****-b16db43be5bc
RequestIdstring

The ID of the request. The value is unique.

89945DD3-9072-47D0-A318-353284CFC7B3
ContainerGroupsobject []

Details about the elastic container instances.

Statusstring

The state of the instance. Valid values:

  • Pending: The instance is being started.
  • Running: The instance is running.
  • Succeeded: The instance successfully runs.
  • Failed: The instance fails to run.
  • Scheduling: The instance is being created.
  • ScheduleFailed: The instance fails to be created.
  • Restarting: The instance is being restarted.
  • Updating: The instance is being updated.
  • Terminating: The instance is being terminated.
  • Expired: The instance is expired.
Running
CreationTimestring

The time when the system created the elastic container instance after the system received the request. The time follows the RFC 3339 standard. The time is displayed in UTC.

2018-08-02T15:00:00Z
VpcIdstring

The ID of the VPC to which the instance belongs.

vpc-1vzjjflab6wvjox****
InternetIpstring

The public IP address.

192.0.XX.XX
TenantSecurityGroupIdstring

This parameter is not publicly available.

sg-xxx
SecurityGroupIdstring

The security group ID.

sg-bp12ujq5zpxuyjfo3o8r
HostAliasesobject []

The hostnames and IP addresses for a container that are added to the hosts file of the elastic container instance.

Hostnamesarray

The information about the hosts.

string

The hostnames.

['hehe.com', 'haha.com']
Ipstring

The IP address of the instance.

192.0.XX.XX
Tagsobject []

The tags of the instance.

Keystring

The tag key.

name
Valuestring

The tag value.

test-xh
Eventsobject []

The events of the elastic container instance. A maximum of 50 events can be returned.

Typestring

The type of the event. Valid values:

  • Normal
  • Warning
Normal
LastTimestampstring

The end time of the event.

2018-08-02T15:00:00Z
Messagestring

The event message.

Started container
Namestring

The category to which the event belongs.

test-xxx
Reasonstring

The event name.

Created
Countinteger

The number of the events.

20
FirstTimestampstring

The start time of the event.

2018-08-02T15:00:00Z
SucceededTimestring

The time when all containers exited on success. The time follows the RFC 3339 standard. The time is displayed in UTC.

2019-12-11T04:33:42Z
SpotStrategystring

The bid policy for the instance. Default value: NoSpot. Valid values:

  • NoSpot: The instance is a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a preemptible instance that has a maximum price.
  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is used as the bid price.
NoSpot
SpotPriceLimitdouble

The maximum hourly price for the preemptible elastic container instance.

This parameter is returned only when SpotStrategy is set to SpotWithPriceLimit.

0.025
EphemeralStorageinteger

The size of the temporary storage space. Unit: GiB.

20
TenantEniInstanceIdstring

This parameter is not publicly available.

i-xxx
Discountinteger

The discount.

9
RestartPolicystring

The restart policy of the elastic container instance. Valid values:

  • Never: Never restarts the instance if a container in the instance exits.
  • Always: Always restarts the instance if a container in the instance exits.
  • OnFailure: Restarts the instance only if a container in the instance exists upon failure with a status code of non-zero.
Never
Memoryfloat

The memory size of the instance. Unit: GiB.

4.0
TenantVSwitchIdstring

This parameter is not publicly available.

vsw-xxx
Containersobject []

The information about containers in the elastic container instance.

LivenessProbeobject

The liveness probe of the container.

SuccessThresholdinteger

The minimum number of consecutive successes that must occur for the check to be considered successful. Default value: 1. Set the value to 1.

1
InitialDelaySecondsinteger

The number of seconds between the time when the startup of the container ends and the time when the probe starts.

10
FailureThresholdinteger

The minimum number of consecutive failures that must occur for the check to be considered failed. Default value: 3.

3
TimeoutSecondsinteger

The timeout period of the check. Default value: 1. Minimum value: 1. Unit: seconds.

10
TcpSocketobject

The TCP socket method that is used to check the container.

Hoststring

The hostname.

1.2.3.4
Portinteger

The port number.

80
Execsarray

The commands that are used to check the containers.

string

The command that is used to check the container.

["/bin/sh", "-c", "echo Hello world > /usr/share/message"]
HttpGetobject

The HTTP GET method used to check the container.

Schemestring

The protocol type supported by the method. Valid values: HTTP and HTTPS.

HTTP
Pathstring

The path to which the system sends an HTTP GET request for a health check.

/usr/nginx/
Portinteger

The port to which the system sends an HTTP GET request for a health check.

80
PeriodSecondsinteger

The interval at which the health check is performed. Unit: seconds. Default value: 10. Minimum value: 1.

5
Commandsarray

The startup commands of the container.

string

The startup command of the container.

[/bin/sh echo]
VolumeMountsobject []

Information about the mounted volumes.

MountPropagationstring

The mount propagation settings of the volume. Mount propagation allows volumes that are mounted on one container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:

  • None: The volume mount does not receive subsequent mounts that are performed on the volume or on the subdirectories of the volume.
  • HostToCotainer: The volume mount receives subsequent mounts that are performed on this volume or the subdirectories of this volume.
  • Bidirectional: The volume mount behaves the same as the HostToContainer mount. The volume mount receives subsequent mounts that are performed on the volume or on the subdirectories of the volume. In addition, all volume mounts that are performed on the container are propagated back to the host and all containers of all pods that use the same volume.
None
MountPathstring

The directory of the volume that is mounted to the container. The data in this directory is overwritten by the data on the volume.

/usr/share/
ReadOnlyboolean

Indicates whether the volume is read-only.

false
Namestring

The volume name.

test-empty
SubPathstring

The subdirectory of the volume. You can use this parameter to mount the same volume to different subdirectories of the container.

/usr/sub
Argsarray

The arguments that are passed to the startup commands of the container.

string

The argument that is passed to the startup command of the container.

["hello"]
Imagestring

The image in the container.

mysql
Portsobject []

The exposed ports and protocols of the container.

Protocolstring

The protocol type.

TCP
Portinteger

The port number. Valid values: 1 to 65535.

8080
RestartCountinteger

The number of times that the container restarted.

0
ImagePullPolicystring

The image pulling policy. Valid values:

  • Always: Each time the instance is updated, image pulling is performed.
  • IfNotPresent: On-premises images are used first. If no on-premises images are available, image pulling is performed.
  • Never: On-premises images are always used. Image pulling is not performed.
Always
StdinOnceboolean

Indicates whether standard input streams are disconnected after a client is disconnected. If Stdin is set to true, standard input streams remain connected among multiple sessions. If StdinOnce is set to true, standard input streams are connected after the container is started, and remain idle until a client is connected to receive data. After the client is disconnected, streams are also disconnected, and remain disconnected until the container restarts.

true
Cpufloat

The number of vCPUs that are allocated to the container.

2.0
PreviousStateobject

The previous status of the container.

StartTimestring

The time when the container started to run.

2018-08-02T15:00:00Z
FinishTimestring

The time when the container stopped running.

2018-08-02T15:00:00Z
DetailStatusstring

The details of the container status.

working
Statestring

The container status. Valid values:

  • Waiting: The container is being started.
  • Running: The container is running.
  • Terminated: The container stops running.
Terminated
Messagestring

The message about the container status.

Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)
Signalinteger

The code of the container status.

1
ExitCodeinteger

The exit code of the container.

0
Reasonstring

The reason why the container is in this state.

Completed
Ttyboolean

Indicates whether interaction is enabled. Default value: false. If the value of the Command parameter is /bin/bash, the value of this parameter is true.

false
WorkingDirstring

The working directory of the container.

/usr/local/nginx
CurrentStateobject

The current container status.

StartTimestring

The time when the container started to run.

2019-12-19T12:05:02Z
FinishTimestring

The time when the container stopped running.

2018-08-02T15:00:00Z
DetailStatusstring

The details of the container status.

working
Statestring

The container status. Valid values:

  • Waiting
  • Running
  • Terminated
Terminated
Messagestring

The message about the container status.

Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)
Signalinteger

The code of the container status.

1
ExitCodeinteger

The exit code of the container.

0
Reasonstring

The reason why the container is in this state.

Started
Readyboolean

Indicates whether the container passed the readiness probe.

true
Gpuinteger

The number of GPUs.

1
SecurityContextobject

The security context of the elastic container instance.

ReadOnlyRootFilesystemboolean

Indicates whether permissions on the root file system are read-only.

true
RunAsUserlong

The user ID (UID) that is used to run the container.

1000
Capabilityobject

The permissions specific to the processes in the container.

Addsarray

The permissions specific to the processes in the container.

string

The permissions specific to the processes in the container.

[NET_ADMIN]
Memoryfloat

The memory size of the container. Unit: GiB.

2.0
Stdinboolean

Indicates whether the container allocates buffer resources to standard input streams when the container is running. If you do not specify this parameter, an end-of-file (EOF) error may occur when standard input streams in the container are read. Default value: false.

true
Namestring

The name of the container.

nginx
EnvironmentVarsobject []

The environment variables of the container.

Keystring

The name of the environment variable.

PATH
Valuestring

The value of the environment variable.

/usr/bin/
ValueFromobject

The source of the environment variable value. This parameter has a value only when the Value parameter is not empty.

FieldRefobject

The specified field.

FieldPathstring

The path of the field.

status.podIP
ReadinessProbeobject

The readiness probe that is used to check whether the container is ready to serve a request.

SuccessThresholdinteger

The minimum number of consecutive successes that must occur for the check to be considered successful. Default value: 1. Set the value to 1.

1
InitialDelaySecondsinteger

The number of seconds between the time when the startup of the container ends and the time when the probe starts.

5
FailureThresholdinteger

The minimum number of consecutive failures that must occur for the check to be considered failed. Default value: 3.

3
TimeoutSecondsinteger

The timeout period of the check. Default value: 1. Minimum value: 1. Unit: seconds.

1
TcpSocketobject

The TCP socket method that is used to check the container.

Hoststring

The hostname.

1.2.3.4
Portinteger

The port number.

8888
Execsarray

The commands that are run in the container when you use a CLI to perform health checks.

string

The command that is run in the container when you use a CLI to perform health checks.

["/bin/sh", "-c", "echo Hello world > /usr/share/message"]
HttpGetobject

The HTTP GET method that is used to check the container.

Schemestring

The protocol type supported by the method. Valid values: HTTP and HTTPS.

HTTP
Pathstring

The path to which the system sends an HTTP GET request for a health check.

/usr/local
Portinteger

The port to which the system sends an HTTP GET request for a health check.

8080
PeriodSecondsinteger

The interval at which the health check is performed. Unit: seconds. Default value: 10. Minimum value: 1.

1
EniInstanceIdstring

The ID of the elastic network interface (ENI).

eni-bp14rzqi6fd8satm****
InitContainersobject []

The information about the init containers.

VolumeMountsobject []

The information about the volumes that are mounted to the init container.

MountPropagationstring

The mount propagation settings of the volume. Mount propagation allows volumes that are mounted on one container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:

  • None: The volume mount does not receive subsequent mounts that are performed on the volume or on the subdirectories of the volume.
  • HostToCotainer: The volume mount receives subsequent mounts that are performed on this volume or the subdirectories of this volume.
  • Bidirectional: The volume mount behaves the same as the HostToContainer mount. The volume mount receives subsequent mounts that are performed on the volume or on the subdirectories of the volume. In addition, all volume mounts that are performed on the container are propagated back to the host and all containers of all pods that use the same volume.
None
MountPathstring

The directory of the volume that is mounted to the container. The data in this directory is overwritten by the data on the volume.

/usr/share/
ReadOnlyboolean

Default value: false.

false
Namestring

The name of the volume. The value of this parameter is the same as the name of the volume that you selected when you purchased the container.

test-empty
Argsarray

The arguments that are passed to the startup commands of the container.

string

The argument that is passed to the container startup command.

['hello world']
Imagestring

The image of the container.

nginx
Portsobject []

The exposed ports and protocols of the container.

Protocolstring

The protocol type.

TCP
Portinteger

The port number. Valid values: 1 to 65535.

8888
RestartCountinteger

The number of times the container restarted.

5
ImagePullPolicystring

The image pulling policy. Valid values:

  • Always: Each time the instance is updated, image pulling is performed.
  • IfNotPresent: On-premises images are used first. If no on-premises images are available, image pulling is performed.
  • Never: On-premises images are always used. Image pulling is not performed.
Always
PreviousStateobject

The previous state of the container.

StartTimestring

The time when the container started to run.

2019-12-24T05:35:44Z
FinishTimestring

The time when the container stopped running.

2019-12-24T05:35:44Z
DetailStatusstring

The details of the container status.

working
Statestring

The container status. Valid values: Waiting, Running, and Terminated.

Terminated
Messagestring

The message about the container status.

Started container
Signalinteger

The code of the container status.

1
ExitCodeinteger

The exit code of the container.

0
Reasonstring

The reason why the container is in this state.

completed
WorkingDirstring

The working directory of the container.

/usr/test
Cpufloat

The number of vCPUs that are allocated to the container.

1.0
CurrentStateobject

The current container status.

StartTimestring

The time when the container started to run.

2018-08-02T15:00:00Z
FinishTimestring

The time when the container stopped running.

2018-08-02T15:00:00Z
DetailStatusstring

The details of the container status.

working
Statestring

The container status. Valid values:

  • Waiting
  • Running
  • Terminated
Running
Messagestring

The event message.

Created container
Signalinteger

The code of the container status.

1
ExitCodeinteger

The exit code of the container.

0
Reasonstring

The reason why the container is in this state.

Started
Commandarray

The startup commands of the containers.

string

The startup command of the container.

[/bin/sh echo]
Readyboolean

Indicates whether the container passed the readiness probe.

true
Gpuinteger

The number of GPUs.

1
SecurityContextobject

The security context of the container.

ReadOnlyRootFilesystemboolean

Indicates whether permissions on the root file system are read-only.

true
RunAsUserlong

The UID this is used to run the entry point of the container process.

1557
Capabilityobject

The permissions specific to the processes in the container.

Addsarray

The permissions specific to the processes in the container.

string

The permission specific to the process in the container.

NET_ADMIN
Memoryfloat

The memory size of the init container. Unit: GiB.

2.0
Namestring

The name of the init container.

Init-xxx
EnvironmentVarsobject []

The environment variables of the container.

Keystring

The name of the environment variable.

PATH
Valuestring

The value of the environment variable.

/usr/local/bin
ValueFromobject

The source of the environment variable value. This parameter has a value only when the Value parameter is not empty.

FieldRefobject

The specified fields.

FieldPathstring

The path of the field. Only status.podIP is supported.

status.podIP
ContainerGroupIdstring

The instance ID.

eci-bp1jrgfqqy54kg5hc****
TenantEniIpstring

This parameter is not publicly available.

10.10.XX.XX
InstanceTypestring

The instance type of the specified Elastic Compute Service (ECS) instance.

ecs.g5.large
IntranetIpstring

The private IP address.

172.16.XX.XX
Ipv6Addressstring

The IPv6 address of the instance.

2001:XXXX:4:4:4:4:4:4
RegionIdstring

The region ID of the instance.

cn-hangzhou
DnsConfigobject

The Domain Name System (DNS) settings.

Searchesarray

The search domain of the DNS server.

string

The search domain of the DNS server.

svc.local.kubenetes
Optionsobject []

The options. Each option is a name-value pair. The value in the name-value pair is optional.

Valuestring

The variable value of the option.

value
Namestring

The variable name of the option.

name
NameServersarray

The IP addresses of DNS servers.

string

The IP address of the DNS server.

[10.2.*.*]
Volumesobject []

Information about the volumes.

Typestring

The type of the volume. Valid values:

  • EmptyDirVolume
  • NFSVolume
  • ConfigFileVolume
  • FlexVolume
EmptyDirVolume
DiskVolumeDiskIdstring

The ID of the disk when you set the Type parameter to DiskVolume.

d-xxxx
NFSVolumeReadOnlyboolean

Indicates whether the NFS volume is read-only.

false
ConfigFileVolumeConfigFileToPathsobject []

The path of the ConfigFile volume.

Pathstring

The relative path of the ConfigFile volume.

/usr/bin/
Contentstring

The content of the ConfigFile volume. Maximum size: 32 KB.

hello world
FlexVolumeFsTypestring

The file system type when you set the Type parameter to FlexVolume. The default value varies based on the script of the FlexVolume plug-in.

ntfs
FlexVolumeDriverstring

The name of the driver when you set the Type parameter to FlexVolume.

flexvolume
DiskVolumeFsTypestring

The file system type of the disk volume.

xfs
FlexVolumeOptionsstring

The options when you set the Type parameter to FlexVolume.

[nolock,tcp,noresvport]
NFSVolumeServerstring

The endpoint of the server when you set the Type parameter to NFSVolume.

0eafxxxxx-xxxxx.cn-hangzhou.nas.aliyuncs.com
NFSVolumePathstring

The path of the NFS volume.

/eci
Namestring

The volume name.

test-empty
EmptyDirVolumeMediumstring

The storage media for the emptyDir volume. This parameter is empty by default, indicating that the node file system is used as the storage media. Valid values:

Memory
EmptyDirVolumeSizeLimitstring

The storage size of the emptyDir volume.

256Mi
RamRoleNamestring

The name of the instance RAM role. The elastic container instance and the ECS instance share a RAM role. For more information, see Use an instance RAM role by calling API operations.

ram:PassRole
VSwitchIdstring

The ID of the vSwitch to which the instance is connected.

vsw-bp1vzjjflab6wvjox****
Cpufloat

The number of vCPUs that are allocated to the elastic container instance.

2.0
ExpiredTimestring

The time when the elastic container instance failed to run due to overdue payments. The time follows the RFC 3339 standard. The time is displayed in UTC.

2018-08-02T15:00:00Z
ResourceGroupIdstring

The ID of the resource group.

rg-8db03793gfrz****
ZoneIdstring

The zone to which the instance belongs.

cn-hangzhou-h
ContainerGroupNamestring

The instance name.

test
EciSecurityContextobject

The security context of the elastic container instance.

Sysctlsobject []

sysctl parameters.

Valuestring

The value of the Sysctl parameter.

65536
Namestring

The name of the Sysctl parameter.

kernel.msgmax
FailedTimestring

The time when the instance failed to run. The time follows the RFC 3339 standard. The time is displayed in UTC.

2018-08-02T15:00:00Z
ComputeCategorystring

The computing power type of the elastic container instance. A value of economy indicates economic instances.

economy

Examples

Sample success responses

JSONformat

{
  "TotalCount": 1,
  "NextToken": "d78f2dd8-5979-42fe-****-b16db43be5bc",
  "RequestId": "89945DD3-9072-47D0-A318-353284CFC7B3",
  "ContainerGroups": [
    {
      "Status": "Running",
      "CreationTime": "2018-08-02T15:00:00Z",
      "VpcId": "vpc-1vzjjflab6wvjox****",
      "InternetIp": "192.0.XX.XX",
      "TenantSecurityGroupId": "sg-xxx",
      "SecurityGroupId": "sg-bp12ujq5zpxuyjfo3o8r",
      "HostAliases": [
        {
          "Hostnames": [
            "['hehe.com', 'haha.com']"
          ],
          "Ip": "192.0.XX.XX"
        }
      ],
      "Tags": [
        {
          "Key": "name",
          "Value": "test-xh"
        }
      ],
      "Events": [
        {
          "Type": "Normal",
          "LastTimestamp": "2018-08-02T15:00:00Z",
          "Message": "Started container",
          "Name": "test-xxx",
          "Reason": "Created",
          "Count": 20,
          "FirstTimestamp": "2018-08-02T15:00:00Z"
        }
      ],
      "SucceededTime": "2019-12-11T04:33:42Z",
      "SpotStrategy": "NoSpot",
      "SpotPriceLimit": 0.025,
      "EphemeralStorage": 20,
      "TenantEniInstanceId": "i-xxx",
      "Discount": 9,
      "RestartPolicy": "Never",
      "Memory": 4,
      "TenantVSwitchId": "vsw-xxx",
      "Containers": [
        {
          "LivenessProbe": {
            "SuccessThreshold": 1,
            "InitialDelaySeconds": 10,
            "FailureThreshold": 3,
            "TimeoutSeconds": 10,
            "TcpSocket": {
              "Host": "1.2.3.4",
              "Port": 80
            },
            "Execs": [
              "[\"/bin/sh\", \"-c\", \"echo Hello world > /usr/share/message\"]"
            ],
            "HttpGet": {
              "Scheme": "HTTP",
              "Path": "/usr/nginx/",
              "Port": 80
            },
            "PeriodSeconds": 5
          },
          "Commands": [
            "[/bin/sh echo]"
          ],
          "VolumeMounts": [
            {
              "MountPropagation": "None",
              "MountPath": "/usr/share/",
              "ReadOnly": false,
              "Name": "test-empty",
              "SubPath": "/usr/sub"
            }
          ],
          "Args": [
            "[\"hello\"]"
          ],
          "Image": "mysql",
          "Ports": [
            {
              "Protocol": "TCP",
              "Port": 8080
            }
          ],
          "RestartCount": 0,
          "ImagePullPolicy": "Always",
          "StdinOnce": true,
          "Cpu": 2,
          "PreviousState": {
            "StartTime": "2018-08-02T15:00:00Z\t",
            "FinishTime": "2018-08-02T15:00:00Z\t",
            "DetailStatus": "working",
            "State": "Terminated",
            "Message": "Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)",
            "Signal": 1,
            "ExitCode": 0,
            "Reason": "Completed"
          },
          "Tty": false,
          "WorkingDir": "/usr/local/nginx",
          "CurrentState": {
            "StartTime": "2019-12-19T12:05:02Z",
            "FinishTime": "2018-08-02T15:00:00Z\t",
            "DetailStatus": "working",
            "State": "Terminated",
            "Message": "Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)",
            "Signal": 1,
            "ExitCode": 0,
            "Reason": "Started"
          },
          "Ready": true,
          "Gpu": 1,
          "SecurityContext": {
            "ReadOnlyRootFilesystem": true,
            "RunAsUser": 1000,
            "Capability": {
              "Adds": [
                "[NET_ADMIN]"
              ]
            }
          },
          "Memory": 2,
          "Stdin": true,
          "Name": "nginx",
          "EnvironmentVars": [
            {
              "Key": "PATH",
              "Value": "/usr/bin/",
              "ValueFrom": {
                "FieldRef": {
                  "FieldPath": "status.podIP"
                }
              }
            }
          ],
          "ReadinessProbe": {
            "SuccessThreshold": 1,
            "InitialDelaySeconds": 5,
            "FailureThreshold": 3,
            "TimeoutSeconds": 1,
            "TcpSocket": {
              "Host": "1.2.3.4",
              "Port": 8888
            },
            "Execs": [
              "[\"/bin/sh\", \"-c\", \"echo Hello world > /usr/share/message\"]"
            ],
            "HttpGet": {
              "Scheme": "HTTP",
              "Path": "/usr/local",
              "Port": 8080
            },
            "PeriodSeconds": 1
          }
        }
      ],
      "EniInstanceId": "eni-bp14rzqi6fd8satm****",
      "InitContainers": [
        {
          "VolumeMounts": [
            {
              "MountPropagation": "None",
              "MountPath": "/usr/share/",
              "ReadOnly": false,
              "Name": "test-empty"
            }
          ],
          "Args": [
            "['hello world']"
          ],
          "Image": "nginx",
          "Ports": [
            {
              "Protocol": "TCP",
              "Port": 8888
            }
          ],
          "RestartCount": 5,
          "ImagePullPolicy": "Always",
          "PreviousState": {
            "StartTime": "2019-12-24T05:35:44Z",
            "FinishTime": "2019-12-24T05:35:44Z",
            "DetailStatus": "working",
            "State": "Terminated",
            "Message": "Started container",
            "Signal": 1,
            "ExitCode": 0,
            "Reason": "completed"
          },
          "WorkingDir": "/usr/test",
          "Cpu": 1,
          "CurrentState": {
            "StartTime": "2018-08-02T15:00:00Z\t",
            "FinishTime": "2018-08-02T15:00:00Z\t",
            "DetailStatus": "working",
            "State": "Running",
            "Message": "Created container",
            "Signal": 1,
            "ExitCode": 0,
            "Reason": "Started"
          },
          "Command": [
            "[/bin/sh echo]"
          ],
          "Ready": true,
          "Gpu": 1,
          "SecurityContext": {
            "ReadOnlyRootFilesystem": true,
            "RunAsUser": 1557,
            "Capability": {
              "Adds": [
                "NET_ADMIN"
              ]
            }
          },
          "Memory": 2,
          "Name": "Init-xxx",
          "EnvironmentVars": [
            {
              "Key": "PATH",
              "Value": "/usr/local/bin",
              "ValueFrom": {
                "FieldRef": {
                  "FieldPath": "status.podIP"
                }
              }
            }
          ]
        }
      ],
      "ContainerGroupId": "eci-bp1jrgfqqy54kg5hc****",
      "TenantEniIp": "10.10.XX.XX",
      "InstanceType": "ecs.g5.large",
      "IntranetIp": "172.16.XX.XX",
      "Ipv6Address": "2001:XXXX:4:4:4:4:4:4",
      "RegionId": "cn-hangzhou",
      "DnsConfig": {
        "Searches": [
          "svc.local.kubenetes"
        ],
        "Options": [
          {
            "Value": "value",
            "Name": "name"
          }
        ],
        "NameServers": [
          "[10.2.*.*]"
        ]
      },
      "Volumes": [
        {
          "Type": "EmptyDirVolume",
          "DiskVolumeDiskId": "d-xxxx",
          "NFSVolumeReadOnly": false,
          "ConfigFileVolumeConfigFileToPaths": [
            {
              "Path": "/usr/bin/",
              "Content": "hello world"
            }
          ],
          "FlexVolumeFsType": "ntfs",
          "FlexVolumeDriver": "flexvolume",
          "DiskVolumeFsType": "xfs",
          "FlexVolumeOptions": "[nolock,tcp,noresvport]",
          "NFSVolumeServer": "0eafxxxxx-xxxxx.cn-hangzhou.nas.aliyuncs.com",
          "NFSVolumePath": "/eci",
          "Name": "test-empty",
          "EmptyDirVolumeMedium": "Memory",
          "EmptyDirVolumeSizeLimit": "256Mi"
        }
      ],
      "RamRoleName": "ram:PassRole",
      "VSwitchId": "vsw-bp1vzjjflab6wvjox****",
      "Cpu": 2,
      "ExpiredTime": "2018-08-02T15:00:00Z",
      "ResourceGroupId": "rg-8db03793gfrz****",
      "ZoneId": "cn-hangzhou-h",
      "ContainerGroupName": "test",
      "EciSecurityContext": {
        "Sysctls": [
          {
            "Value": "65536",
            "Name": "kernel.msgmax"
          }
        ]
      },
      "FailedTime": "2018-08-02T15:00:00Z",
      "ComputeCategory": "economy"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-12-27The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ComputeCategory
2023-12-25The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: SecurityGroupId
Output ParametersThe response structure of the API has changed.
2023-04-17The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-04-04The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.