amazonka-ecs-2.0: Amazon EC2 Container Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.ECS.DeregisterContainerInstance

Description

Deregisters an Amazon ECS container instance from the specified cluster. This instance is no longer available to run tasks.

If you intend to use the container instance for some other purpose after deregistration, we recommend that you stop all of the tasks running on the container instance before deregistration. That prevents any orphaned tasks from consuming resources.

Deregistering a container instance removes the instance from a cluster, but it doesn't terminate the EC2 instance. If you are finished using the instance, be sure to terminate it in the Amazon EC2 console to stop billing.

If you terminate a running container instance, Amazon ECS automatically deregisters the instance from your cluster (stopped container instances or instances with disconnected agents aren't automatically deregistered when terminated).

Synopsis

Creating a Request

data DeregisterContainerInstance Source #

See: newDeregisterContainerInstance smart constructor.

Constructors

DeregisterContainerInstance' 

Fields

  • cluster :: Maybe Text

    The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.

  • force :: Maybe Bool

    Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the force option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.

    Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.

  • containerInstance :: Text

    The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

Instances

Instances details
ToJSON DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

ToHeaders DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

ToPath DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

ToQuery DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

AWSRequest DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Generic DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Associated Types

type Rep DeregisterContainerInstance :: Type -> Type #

Read DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Show DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

NFData DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Eq DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Hashable DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

type AWSResponse DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

type Rep DeregisterContainerInstance Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

type Rep DeregisterContainerInstance = D1 ('MetaData "DeregisterContainerInstance" "Amazonka.ECS.DeregisterContainerInstance" "amazonka-ecs-2.0-3xFxVqi9x5nBZ44jBEC5G8" 'False) (C1 ('MetaCons "DeregisterContainerInstance'" 'PrefixI 'True) (S1 ('MetaSel ('Just "cluster") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "force") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "containerInstance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newDeregisterContainerInstance Source #

Create a value of DeregisterContainerInstance with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:cluster:DeregisterContainerInstance', deregisterContainerInstance_cluster - The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.

$sel:force:DeregisterContainerInstance', deregisterContainerInstance_force - Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the force option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.

Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.

DeregisterContainerInstance, deregisterContainerInstance_containerInstance - The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

Request Lenses

deregisterContainerInstance_cluster :: Lens' DeregisterContainerInstance (Maybe Text) Source #

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.

deregisterContainerInstance_force :: Lens' DeregisterContainerInstance (Maybe Bool) Source #

Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the force option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.

Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.

deregisterContainerInstance_containerInstance :: Lens' DeregisterContainerInstance Text Source #

The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

Destructuring the Response

data DeregisterContainerInstanceResponse Source #

Constructors

DeregisterContainerInstanceResponse' 

Fields

Instances

Instances details
Generic DeregisterContainerInstanceResponse Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Read DeregisterContainerInstanceResponse Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Show DeregisterContainerInstanceResponse Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

NFData DeregisterContainerInstanceResponse Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

Eq DeregisterContainerInstanceResponse Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

type Rep DeregisterContainerInstanceResponse Source # 
Instance details

Defined in Amazonka.ECS.DeregisterContainerInstance

type Rep DeregisterContainerInstanceResponse = D1 ('MetaData "DeregisterContainerInstanceResponse" "Amazonka.ECS.DeregisterContainerInstance" "amazonka-ecs-2.0-3xFxVqi9x5nBZ44jBEC5G8" 'False) (C1 ('MetaCons "DeregisterContainerInstanceResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "containerInstance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ContainerInstance)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newDeregisterContainerInstanceResponse Source #

Create a value of DeregisterContainerInstanceResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

DeregisterContainerInstance, deregisterContainerInstanceResponse_containerInstance - The container instance that was deregistered.

$sel:httpStatus:DeregisterContainerInstanceResponse', deregisterContainerInstanceResponse_httpStatus - The response's http status code.

Response Lenses