DeletionProtection

class aws_cdk.aws_autoscaling.DeletionProtection(*values)

Bases: Enum

Deletion protection level for Auto Scaling group.

ExampleMetadata:

infused

Example:

# vpc: ec2.Vpc


autoscaling.AutoScalingGroup(self, "ASG",
    vpc=vpc,
    instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MICRO),
    machine_image=ec2.MachineImage.latest_amazon_linux2(),
    deletion_protection=autoscaling.DeletionProtection.PREVENT_ALL_DELETION
)

Attributes

NONE

No deletion protection.

PREVENT_ALL_DELETION

Block all delete operations.

PREVENT_FORCE_DELETION

Block force delete operations.