Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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, you should 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 does not 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 are not automatically deregistered when terminated).
Synopsis
- data DeregisterContainerInstance = DeregisterContainerInstance' {}
- newDeregisterContainerInstance :: Text -> DeregisterContainerInstance
- deregisterContainerInstance_cluster :: Lens' DeregisterContainerInstance (Maybe Text)
- deregisterContainerInstance_force :: Lens' DeregisterContainerInstance (Maybe Bool)
- deregisterContainerInstance_containerInstance :: Lens' DeregisterContainerInstance Text
- data DeregisterContainerInstanceResponse = DeregisterContainerInstanceResponse' {}
- newDeregisterContainerInstanceResponse :: Int -> DeregisterContainerInstanceResponse
- deregisterContainerInstanceResponse_containerInstance :: Lens' DeregisterContainerInstanceResponse (Maybe ContainerInstance)
- deregisterContainerInstanceResponse_httpStatus :: Lens' DeregisterContainerInstanceResponse Int
Creating a Request
data DeregisterContainerInstance Source #
See: newDeregisterContainerInstance
smart constructor.
DeregisterContainerInstance' | |
|
Instances
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 deregistration of the container instance. 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 are
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.
$sel:containerInstance:DeregisterContainerInstance'
, deregisterContainerInstance_containerInstance
- The container instance ID or full ARN of the container instance to
deregister. The ARN contains the arn:aws:ecs
namespace, followed by
the Region of the container instance, the Amazon Web Services account ID
of the container instance owner, the container-instance
namespace, and
then the container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
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 deregistration of the container instance. 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 are
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. The ARN contains the arn:aws:ecs
namespace, followed by
the Region of the container instance, the Amazon Web Services account ID
of the container instance owner, the container-instance
namespace, and
then the container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
Destructuring the Response
data DeregisterContainerInstanceResponse Source #
See: newDeregisterContainerInstanceResponse
smart constructor.
DeregisterContainerInstanceResponse' | |
|
Instances
Eq DeregisterContainerInstanceResponse Source # | |
Read DeregisterContainerInstanceResponse Source # | |
Show DeregisterContainerInstanceResponse Source # | |
Generic DeregisterContainerInstanceResponse Source # | |
NFData DeregisterContainerInstanceResponse Source # | |
Defined in Amazonka.ECS.DeregisterContainerInstance rnf :: DeregisterContainerInstanceResponse -> () # | |
type Rep DeregisterContainerInstanceResponse Source # | |
Defined in Amazonka.ECS.DeregisterContainerInstance type Rep DeregisterContainerInstanceResponse = D1 ('MetaData "DeregisterContainerInstanceResponse" "Amazonka.ECS.DeregisterContainerInstance" "libZSservicesZSamazonka-ecsZSamazonka-ecs" '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:
$sel:containerInstance:DeregisterContainerInstance'
, deregisterContainerInstanceResponse_containerInstance
- The container instance that was deregistered.
$sel:httpStatus:DeregisterContainerInstanceResponse'
, deregisterContainerInstanceResponse_httpStatus
- The response's http status code.
Response Lenses
deregisterContainerInstanceResponse_containerInstance :: Lens' DeregisterContainerInstanceResponse (Maybe ContainerInstance) Source #
The container instance that was deregistered.
deregisterContainerInstanceResponse_httpStatus :: Lens' DeregisterContainerInstanceResponse Int Source #
The response's http status code.