All Products
Search
Document Center

DeleteContainerGroup

Last Updated: Oct 25, 2018

You can call this operation to delete a container group.

Request parameters

Name Type Required Description
Action String Yes The operation that you want to perform. Set the value to DeleteContainerGroup.
RegionId String Yes The ID of the region in which the instance resides.
ContainerGroupId String Yes The ID of the container group.

Response parameters

All response parameters of this API operation are the same as the common response parameters.

Examples

Sample requests

  1. http://eci.aliyuncs.com/?&Action=DeleteContainerGroup
  2. &RegionId=cn-shanghai
  3. &ContainerGroupId=eci-uf6fonnghi50valsr7yw
  4. <Common request parameters>

Sample responses

JSON format
  1. {
  2. "RequestId":"45D5B0AD-3B00-4A9B-9911-6D5303B06712"
  3. }

Definitions

Name Description
ContainerGroup The container group.
Container The container.
ContainerState The status of the container.
Event The event of the container group.
ImageRegistryCredential The information for logging on to the container image registry.
Volume The data volume.
VolumeMount The volume mount point.
Tag The tag of the container.

ContainerGroup

Name Type Required Description
RegionId String Yes The ID of the region in which the instance resides.
ZoneId String No The ID of the zone in which the instance resides. If you leave the parameter blank, the system assigns a zone for you. The default value is blank.
SecurityGroupId String Yes The ID of the security group to which the instance belongs. Instances in the same security group can access one another.
VSwitchId String Yes The ID of the specified VSwitch. Currently, ECI instances can only be deployed in VPCs.
ContainerGroupName String Yes The name of the container group.
ContainerGroupID String No The ID of the container group.
ImageRegistryCredentials ImageRegistryCredential[] No The information for logging on to the container image registry. You can set a maximum 10 sets of image registry logon information for each account.
Volumes Volume[] No The data volume. You can configure a maximum of 20 data volumes.
RestartPolicy String No The policy for restarting the container. Valid values: Always, OnFailure, and Never.
Containers Container[] Yes The list of containers. You can configure a maximum of five containers in a container group.
Events Event[] No The event details.
IntranetIP String No The internal network IP address.
Tags Tag[] No The instance tag in the format of a key/value pair. You can define a maximum of 20 tags for each instance.
Status String No The creation status of the container. Valid values: Pending, Running, Succeeded, Failed, Scheduling, and ScheduleFailed.
CreationTime String No The time at which the system receives the request for creating the container group. The time stamp must be in UTC and follow the RFC 3339 format. For example, 2018-08-02T15:00:00Z.
SucceededTime String No The time at which all containers in the same container group exit after executing specified tasks. The time stamp must be in UTC and follow the RFC 3339 format. For example, 2018-08-02T15:00:00Z.
Container
Name Type Required Description
Commands String[] No The commands run by the container. You can define a maximum of 20 commands. Minimum length per string: 256 characters
Args String[] No The arguments passed to the commands. Maximum: 10.
EnvironmentVars EnvironmentVar[] No The environment variables in the operating system in which you operate the container. The environment variables are key/value pairs, and both the key and the value are strings. Maximum: 100. Key indicates the name of the environment variable. Value indicates the value of the environment variable.
Image String Yes The container image.
Name String Yes The name of the container.
Cpu Float Yes The central processing unit (CPU) assigned to the container.
Memory Float Yes The memory assigned to the container. Unit: GiB.
VolumeMounts VolumeMount[] No The number of data volumes that are mounted onto the container. Maximum: 16.
CurrentState ContainerState No The current status of the container.
PreviousState ContainerState No The previous status of the container.
RestartCount Integer No The number of restarts.
WorkingDir String No The working directory for the container.
Ports ContainerPort[] No The container ports or protocols to be exposed. You can expose a maximum of 100 container ports (protocols).

ContainerState

The following parameters are response parameters only.

Name Type Description
StartTime Timestamp The time at which the container starts running.
State String The status of the container. Valid values: Waiting, Running, and Terminated.
DetailStatus String The details for the container status.
FinishTime Timestamp The time at which the container stops running.
ExitCode Integer The exit code for the container.

Event

The following parameters are response parameters only.

Name Type Description
Count Integer The number of occurrences of the event.
FirstTimestamp String The time at which the event starts.
LastTimestamp String The time at which the event finishes.
Message String The event message.
Name String The name of the event.
Type String The type of the event. Valid values: Normal and Warning.

ImageRegistryCredential

Name Type Required Description
Server String Yes The URL for the image registry without http:// or https:// prefix.
UserName String Yes The username for the image registry.
Password String Yes The password for the image registry.

Volume

Name Type Required Description
Type String Yes The type of the data volume. Valid values: EmptyDirVolume, NFSVolume, and ConfigFileVolume.
Name String Yes The name of the data volume.
NFSVolume.Server String No The address for the NFS server.
NFSVolume.Path String No The path to the NFS volume.
NFSVolume.ReadOnly Boolean No Default value: False.
ConfigFileVolume.ConfigFileToPath ConfigFileToPath[] No The path to the configuration file.
EmptyDirVolume.Enable Boolean No Default value: False.

ConfigFileToPath

Name Type Required Description
Path String Yes The relative file path.
Content String No The content of the configuration file. Maximum size: 32 KB.

VolumeMount

Name Type Required Description
Name String Yes The name of the data volume.
MountPath String Yes The volume mount point.
ReadOnly Boolean Yes Default value: False.

Tag

Name Type Required Description
Key String Yes The keyword of the tag.
Value String No The value of the tag.

Error codes

Error codes specific to this API operation are as follows. For more information about the error codes that are common to all ECI API operations, see Common error codes.

Error code Error message HTTP status code Description
400 InvalidParameter The specified parameter {ParameterName} is not valid. The error message returned when the parameter value is invalid.
400 MissingParameter The input parameter {ParameterName} that is mandatory for processing this request is not supplied. The error message returned when a required parameter is not specified.