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.DeleteAutoScalingGroup

Description

Deletes the specified Auto Scaling group.

If the group has instances or scaling activities in progress, you must specify the option to force the deletion in order for it to succeed. The force delete operation will also terminate the EC2 instances. If the group has a warm pool, the force delete option also deletes the warm pool.

To remove instances from the Auto Scaling group before deleting it, call the DetachInstances API with the list of instances and the option to decrement the desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch replacement instances.

To terminate all instances before deleting the Auto Scaling group, call the UpdateAutoScalingGroup API and set the minimum size and desired capacity of the Auto Scaling group to zero.

If the group has scaling policies, deleting the group deletes the policies, the underlying alarm actions, and any alarm that no longer has an associated action.

For more information, see Delete your Auto Scaling infrastructure in the Amazon EC2 Auto Scaling User Guide.

Synopsis

Creating a Request

data DeleteAutoScalingGroup Source #

See: newDeleteAutoScalingGroup smart constructor.

Constructors

DeleteAutoScalingGroup' 

Fields

  • forceDelete :: Maybe Bool

    Specifies that the group is to be deleted along with all instances associated with the group, without waiting for all instances to be terminated. This action also deletes any outstanding lifecycle actions associated with the group.

  • autoScalingGroupName :: Text

    The name of the Auto Scaling group.

Instances

Instances details
ToHeaders DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

ToPath DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

ToQuery DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

AWSRequest DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Associated Types

type AWSResponse DeleteAutoScalingGroup #

Generic DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Associated Types

type Rep DeleteAutoScalingGroup :: Type -> Type #

Read DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Show DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

NFData DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Methods

rnf :: DeleteAutoScalingGroup -> () #

Eq DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Hashable DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

type AWSResponse DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

type Rep DeleteAutoScalingGroup Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

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

newDeleteAutoScalingGroup Source #

Create a value of DeleteAutoScalingGroup 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:forceDelete:DeleteAutoScalingGroup', deleteAutoScalingGroup_forceDelete - Specifies that the group is to be deleted along with all instances associated with the group, without waiting for all instances to be terminated. This action also deletes any outstanding lifecycle actions associated with the group.

DeleteAutoScalingGroup, deleteAutoScalingGroup_autoScalingGroupName - The name of the Auto Scaling group.

Request Lenses

deleteAutoScalingGroup_forceDelete :: Lens' DeleteAutoScalingGroup (Maybe Bool) Source #

Specifies that the group is to be deleted along with all instances associated with the group, without waiting for all instances to be terminated. This action also deletes any outstanding lifecycle actions associated with the group.

Destructuring the Response

data DeleteAutoScalingGroupResponse Source #

See: newDeleteAutoScalingGroupResponse smart constructor.

Instances

Instances details
Generic DeleteAutoScalingGroupResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Associated Types

type Rep DeleteAutoScalingGroupResponse :: Type -> Type #

Read DeleteAutoScalingGroupResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Show DeleteAutoScalingGroupResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

NFData DeleteAutoScalingGroupResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

Eq DeleteAutoScalingGroupResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

type Rep DeleteAutoScalingGroupResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.DeleteAutoScalingGroup

type Rep DeleteAutoScalingGroupResponse = D1 ('MetaData "DeleteAutoScalingGroupResponse" "Amazonka.AutoScaling.DeleteAutoScalingGroup" "amazonka-autoscaling-2.0-IerpHfP4BA3Ir4ZL2IR1De" 'False) (C1 ('MetaCons "DeleteAutoScalingGroupResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDeleteAutoScalingGroupResponse :: DeleteAutoScalingGroupResponse Source #

Create a value of DeleteAutoScalingGroupResponse with all optional fields omitted.

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