This topic describes the response parameters in Elastic Container Instance API responses.

Parameter Description
ContainerGroup The container group.
ImageRegistryCredential The information for logging on to the image repository.
Volume The volume.
Event The event.
Tag The tag of the container.
DNSConfig The Domain Name System (DNS) settings.
Container The container.
ContainerState The state of the container.
VolumeMount The mount point of the volume.
EnvironmentVar The environment variable of the container.
ContainerPort The port of the container.
SecurityContext The security context of the elastic container instance.
ReadinessProbe The readiness probe.
LivenessProbe The liveness probe.

ContainerGroup

Parameter Type Description
RegionId String The region ID of the elastic container instance.
ZoneId String The ID of the zone where the elastic container instance is deployed. If you do not specify this parameter, the system assigns a zone ID for the elastic container instance. This parameter is empty by default.
SecurityGroupId String The ID of the security group to which the elastic container instance belongs. Instances in the same security group can communicate with each other.
VSwitchId String The ID of the vSwitch.
ContainerGroupName String The name of the container group.
ContainerGroupId String The ID of the container group.
ImageRegistryCredentials ImageRegistryCredential[] The logon information for image repositories. A maximum of 10 sets of information can be returned.
Volumes Volume[] The information about volumes. A maximum of 20 volumes can be returned.
RestartPolicy String The restart policy. Valid values:
  • Always
  • OnFailure
  • Never
Cpu Float The maximum number of vCPUs for the container group.
Memory Float The amount of memory resources allocated to the container group. Unit: GiB.
InitContainers Container[] The list of init containers. A maximum of five init containers can be returned.
Containers Container[] The list of containers. A maximum of five containers can be returned.
Events Event[] The event information. A maximum of 50 events can be returned.
DNSConfig DNSConfig The DNS settings.
InternetIp String The public IP address.
IntranetIP String The internal IP address.
Tags Tag[] The tags attached to the elastic container instance. Each tag is a key-value pair. A maximum of 20 tags can be returned.
Status String The creation state of the container group. Valid values:
  • Pending
  • Running
  • Succeeded
  • Failed
  • Scheduling
  • ScheduleFailed
CreationTime String The time when the system created the container group after the system received the request. The time follows the RFC 3339 standard and is displayed in UTC. Example: 2018-08-02T15:00:00Z.
SucceededTime String The time when all containers in the container group completed running the specified tasks. The time follows the RFC 3339 standard and is displayed in UTC. Example: 2018-08-02T15:00:00Z.
EniInstanceId String The ID of the Elastic Network Interface (ENI).
ExpiredTime String The time when the container failed to run due to overdue payments. The time follows the RFC 3339 standard and is displayed in UTC. Example: 2018-08-02T15:00:00Z.
FailedTime String The time when the container failed to run tasks. The time follows the RFC 3339 standard and is displayed in UTC. Example: 2018-08-02T15:00:00Z.

ImageRegistryCredential

Parameter Type Required Description
Server String Yes The URL of the image repository, without the http:// or https:// prefix.
UserName String Yes The username used to log on to the image repository.
Password String Yes The password used to log on to the image repository.

Volume

Parameter Type Required Description
Type String Yes The type of the volume. Valid values:
  • EmptyDirVolume
  • NFSVolume
  • ConfigFileVolume
  • FlexVolume
  • DiskVolume
Name String Yes The name of the volume.
NFSVolume.Server String No The endpoint of the Network File System (NFS) server.
NFSVolume.Path String No The path of the NFS volume.
NFSVolume.ReadOnly Boolean No Indicates whether the NFS volume is read-only. Default value: False.
ConfigFileVolume.ConfigFileToPath ConfigFileToPath[] No The path of the configuration file.
EmptyDirVolume.Medium String No The storage medium of the emptyDir volume. This parameter is empty by default, which indicates that the emptyDir volume stores data in the file system of a node. You can also set the value to Memory to use the memory as storage.

ConfigFileToPath

Parameter Type Required Description
Path String Yes The relative path of the configuration file.
Content String No The content of the configuration file. The maximum size of the file can be 32 KB.

Event

Parameter Type Description
Count Integer The number of events.
FirstTimestamp String The time when the event started.
LastTimestamp String The time when the event ended.
Message String The message of the event.
Name String The name of the object to which the event belongs.
Type String The type of the event. Valid values:
  • Normal
  • Warning
Reason String The name of the event.

Tag

Parameter Type Required Description
Key String Yes The key of the tag.
Value String No The value of the tag.

DNSConfig

Parameter Type Description
Nameservers String[] The IP addresses of DNS servers.
Searches String[] The DNS search domains.
Options Option[] The objects. Each object is a name-value pair. The value is optional.

For more information, see DNS.

Option

Parameter Type Description
Name String The name of the object.
Value String The value of the object.

Container

Parameter Type Required Description
Commands String[] No The commands used to start the container. A maximum of 20 commands can be specified to start a container. Each command must be a string and can be up to 256 characters in length.
Args String[] No The startup arguments of the container. A maximum of 10 startup arguments can be specified to start a container.
EnvironmentVars EnvironmentVar[] No The environment variables in the operating system in which you run the container. Each environment variable is a key-value pair. A maximum of 100 environment variables can be returned. Key indicates the name of a variable and Value indicates the value of the variable.
Image String Yes The image of the container.
Name String Yes The name of the container.
Cpu Float Yes The number of vCPUs for the container.
Memory Float Yes The amount of memory resources allocated to the container. Unit: GiB.
ImagePullPolicy String No The image pulling policy.
VolumeMounts VolumeMount[] No The volumes mounted to the container. A maximum of 16 volumes can be returned.
CurrentState ContainerState No The current state of the container.
PreviousState ContainerState No The previous state of the container.
RestartCount Integer No The number of times that the container restarted.
WorkingDir String No The working directory of the container.
Ports Port[] No The exposed ports and protocols of the container. A maximum of 100 port and protocol combinations can be returned.
LivenessProbe LivenessProbe No The liveness probe of the container.
ReadinessProbe ReadinessProbe No The readiness probe of the container.
SecurityContext SecurityContext No The security context of the elastic container instance.

ContainerState

Parameter Type Description
StartTime Timestamp The time when the container started to run.
State String The state of the container. Valid values:
  • Waiting
  • Running
  • Terminated
DetailStatus String The details of the container state.
FinishTime Timestamp The time when the container stopped running.
ExitCode Integer The exit code of the container.
Reason String The reason why the container is in its current state.
Message String The information about the container state.
Signal Integer The code of the container state.

VolumeMount

Parameter Type Required Description
Name String Yes The name of the volume. The name is the same as that of the volume you selected when you purchased the container.
MountPath String Yes The directory to which the volume is mounted. Data under this directory is overwritten by the data on the volume.
ReadOnly Boolean Yes Indicates whether the volume is read-only. Default value: False.

EnvironmentVar

Parameter Type Required Description
Key String Yes 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.
Value String No The value of the environment variable. The value must be 0 to 256 characters in length.
FieldRef.FieldPath String No The source of the environment variable value. Valid value: status.podIP.

Port

Parameter Type Description
Port Integer The port number. Valid values: 1 to 65535.
Protocol String The type of the protocol. Valid values:
  • TCP
  • UDP

SecurityContext

Parameter Type Description
Capability Capability The permissions granted to processes in the container. Only NET_ADMIN and NET_RAW are supported. By default, NET_RAW is not supported. If you want to use NET_RAW, submit a ticket.
RunAsUser Int The ID of the user that runs the container. The parameter settings override the USER command in the Dockerfile.
ReadOnlyRootFilesystem Bool Indicates whether the root file system is read-only. Valid value: true.

Capability

Parameter Type Description
Adds String[] Only NET_ADMIN and NET_RAW are supported. By default, NET_RAW is not supported. If you want to use NET_RAW, submit a ticket.

ReadinessProbe

Parameter Type Description
ReadinessProbe.HttpGet.Path String The path to which HTTP GET requests are sent for health checks.
ReadinessProbe.HttpGet.Port Integer The port to which HTTP GET requests are sent for health checks.
ReadinessProbe.HttpGet.Scheme String The protocol type of HTTP GET requests when HTTP requests are used for health checks. Valid values:
  • HTTP
  • HTTPS
ReadinessProbe.Exec.Commands String[] The commands that are executed in the container when health checks are performed by using the command line.
ReadinessProbe.TcpSocket.Port Integer The port detected by TCP sockets when TCP sockets are used for health checks.
ReadinessProbe.InitialDelaySeconds Integer The number of seconds to wait after the container was started before a check was started.
ReadinessProbe.PeriodSeconds Integer The interval at which the container was checked. Default value: 10. Minimum value: 1. Unit: seconds.
ReadinessProbe.SuccessThreshold Integer The minimum number of consecutive successes that must occur for the check to be considered successful. Default value: 1. The value must be 1.
ReadinessProbe.FailureThreshold Integer The minimum number of consecutive failures that must occur for the check to be considered failed. Default value: 3.
ReadinessProbe.TimeoutSeconds Integer The timeout period of the check. Default value: 1. Minimum value: 1. Unit: seconds.

LivenessProbe

Parameter Type Description
LivenessProbe.HttpGet.Path String The path to which HTTP GET requests are sent for health checks.
LivenessProbe.HttpGet.Port Integer The port to which HTTP GET requests are sent for health checks.
LivenessProbe.HttpGet.Scheme String The protocol type of HTTP GET requests when HTTP requests are used for health checks. Valid values:
  • HTTP
  • HTTPS
LivenessProbe.Exec.Commands String[] The commands that are executed in the container when health checks are performed by using the command line.
LivenessProbe.TcpSocket.Port Integer The port detected by TCP sockets when TCP sockets are used for health checks.
LivenessProbe.InitialDelaySeconds Integer The number of seconds to wait after the container was started before a check was started.
LivenessProbe.PeriodSeconds Integer The interval at which the container was checked. Default value: 10. Minimum value: 1. Unit: seconds.
LivenessProbe.SuccessThreshold Integer The minimum number of consecutive successes that must occur for the check to be considered successful. Default value: 1. The value must be 1.
LivenessProbe.FailureThreshold Integer The minimum number of consecutive failures that must occur for the check to be considered failed. Default value: 3.
LivenessProbe.TimeoutSeconds Integer The timeout period of the check. Default value: 1. Minimum value: 1. Unit: seconds.