Enum DeletionProtection

java.lang.Object
java.lang.Enum<DeletionProtection>
software.amazon.awscdk.services.autoscaling.DeletionProtection
All Implemented Interfaces:
Serializable, Comparable<DeletionProtection>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-02T12:05:03.650Z") @Stability(Stable) public enum DeletionProtection extends Enum<DeletionProtection>
Deletion protection level for Auto Scaling group.

Example:

 Vpc vpc;
 AutoScalingGroup.Builder.create(this, "ASG")
         .vpc(vpc)
         .instanceType(InstanceType.of(InstanceClass.T3, InstanceSize.MICRO))
         .machineImage(MachineImage.latestAmazonLinux2())
         .deletionProtection(DeletionProtection.PREVENT_ALL_DELETION)
         .build();
 
  • Enum Constant Details

    • NONE

      @Stability(Stable) public static final DeletionProtection NONE
      No deletion protection.
    • PREVENT_FORCE_DELETION

      @Stability(Stable) public static final DeletionProtection PREVENT_FORCE_DELETION
      Block force delete operations.
    • PREVENT_ALL_DELETION

      @Stability(Stable) public static final DeletionProtection PREVENT_ALL_DELETION
      Block all delete operations.
  • Method Details

    • values

      public static DeletionProtection[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DeletionProtection valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null