amazonka-autoscaling-2.0: Amazon Auto Scaling 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.AutoScaling.DetachInstances

Description

Removes one or more instances from the specified Auto Scaling group.

After the instances are detached, you can manage them independent of the Auto Scaling group.

If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are detached.

If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups.

For more information, see Detach EC2 instances from your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.

Synopsis

Creating a Request

data DetachInstances Source #

See: newDetachInstances smart constructor.

Constructors

DetachInstances' 

Fields

Instances

Instances details
ToHeaders DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

ToPath DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

ToQuery DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

AWSRequest DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Associated Types

type AWSResponse DetachInstances #

Generic DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Associated Types

type Rep DetachInstances :: Type -> Type #

Read DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Show DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

NFData DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Methods

rnf :: DetachInstances -> () #

Eq DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Hashable DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

type AWSResponse DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

type Rep DetachInstances Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

type Rep DetachInstances = D1 ('MetaData "DetachInstances" "Amazonka.AutoScaling.DetachInstances" "amazonka-autoscaling-2.0-IerpHfP4BA3Ir4ZL2IR1De" 'False) (C1 ('MetaCons "DetachInstances'" 'PrefixI 'True) (S1 ('MetaSel ('Just "instanceIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "autoScalingGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "shouldDecrementDesiredCapacity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))

newDetachInstances Source #

Create a value of DetachInstances 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:instanceIds:DetachInstances', detachInstances_instanceIds - The IDs of the instances. You can specify up to 20 instances.

DetachInstances, detachInstances_autoScalingGroupName - The name of the Auto Scaling group.

$sel:shouldDecrementDesiredCapacity:DetachInstances', detachInstances_shouldDecrementDesiredCapacity - Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.

Request Lenses

detachInstances_instanceIds :: Lens' DetachInstances (Maybe [Text]) Source #

The IDs of the instances. You can specify up to 20 instances.

detachInstances_shouldDecrementDesiredCapacity :: Lens' DetachInstances Bool Source #

Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.

Destructuring the Response

data DetachInstancesResponse Source #

See: newDetachInstancesResponse smart constructor.

Constructors

DetachInstancesResponse' 

Fields

Instances

Instances details
Generic DetachInstancesResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Associated Types

type Rep DetachInstancesResponse :: Type -> Type #

Read DetachInstancesResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Show DetachInstancesResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

NFData DetachInstancesResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

Methods

rnf :: DetachInstancesResponse -> () #

Eq DetachInstancesResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

type Rep DetachInstancesResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DetachInstances

type Rep DetachInstancesResponse = D1 ('MetaData "DetachInstancesResponse" "Amazonka.AutoScaling.DetachInstances" "amazonka-autoscaling-2.0-IerpHfP4BA3Ir4ZL2IR1De" 'False) (C1 ('MetaCons "DetachInstancesResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "activities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Activity])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newDetachInstancesResponse Source #

Create a value of DetachInstancesResponse 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:activities:DetachInstancesResponse', detachInstancesResponse_activities - The activities related to detaching the instances from the Auto Scaling group.

$sel:httpStatus:DetachInstancesResponse', detachInstancesResponse_httpStatus - The response's http status code.

Response Lenses

detachInstancesResponse_activities :: Lens' DetachInstancesResponse (Maybe [Activity]) Source #

The activities related to detaching the instances from the Auto Scaling group.