CmdID

CmdID / aws / aws ecs

aws ecs deregister-container-instance

Deregisters an Amazon ECS container instance from the specified cluster. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To deregister a container instance from a cluster

The following deregister-container-instance example deregisters a container instance from the specified cluster. If there are still tasks running in the container instance, you must either stop those tasks before deregistering, or use the --force option.

aws ecs deregister-container-instance --cluster arn:aws:ecs:us-west-2:123456789012:cluster/MyCluster --container-instance arn:aws:ecs:us-west-2:123456789012:container-instance/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 --forceIdentify
--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister.
--container-instanceThe container instance ID or full ARN of the container instance to deregister.
--forceForces the container instance to be deregistered.
Its output, shortened
{
    "containerInstance": {
        "remainingResources": [
            {
                "integerValue": 1024,
                "doubleValue": 0.0,
                "type": "INTEGER",
                "longValue": 0,
                "name": "CPU"
            },
            {
                "integerValue": 985,
                "doubleValue": 0.0,
                "type": "INTEGER",
                "longValue": 0,
                "name": "MEMORY"
            },
            {
                "type": "STRINGSET",
                "integerValue": 0,
                "name": "PORTS",
                "stringSetValue": [
                    "22",
                    "2376",
                    "2375",
                    "51678",
                    "51679"
                ],
                "longValue": 0,
                "doubleValue": 0.0
… 219 more lines

For more information, see Deregistering an Amazon ECS container instance in the Amazon ECS Developer Guide.

Options

3 in the AWS CLI reference
--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister.
--container-instanceThe container instance ID or full ARN of the container instance to deregister.
--forceForces the container instance to be deregistered.