Interface AddAutoScalingGroupCapacityOptions

All Superinterfaces:
All Known Subinterfaces:
AddCapacityOptions, AsgCapacityProviderProps
All Known Implementing Classes:
AddAutoScalingGroupCapacityOptions.Jsii$Proxy, AddCapacityOptions.Jsii$Proxy, AsgCapacityProviderProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.966Z") @Stability(Stable) public interface AddAutoScalingGroupCapacityOptions extends
The properties for adding an AutoScalingGroup.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 Key key;
 AddAutoScalingGroupCapacityOptions addAutoScalingGroupCapacityOptions = AddAutoScalingGroupCapacityOptions.builder()
  • Method Details

    • getCanContainersAccessInstanceRole

      @Stability(Stable) @Nullable default Boolean getCanContainersAccessInstanceRole()
      Specifies whether the containers can access the container instance role.

      Default: false

    • getMachineImageType

      @Stability(Stable) @Nullable default MachineImageType getMachineImageType()
      What type of machine image this is.

      Depending on the setting, different UserData will automatically be added to the AutoScalingGroup to configure it properly for use with ECS.

      If you create an AutoScalingGroup yourself and are adding it via addAutoScalingGroup(), you must specify this value. If you are adding an autoScalingGroup via addCapacity, this value will be determined from the machineImage you pass.

      Default: - Automatically determined from `machineImage`, if available, otherwise `MachineImageType.AMAZON_LINUX_2`.

    • getSpotInstanceDraining

      @Stability(Stable) @Nullable default Boolean getSpotInstanceDraining()
      Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.

      For more information, see Using Spot Instances.

      Default: false

    • getTaskDrainTime

      @Stability(Deprecated) @Deprecated @Nullable default Duration getTaskDrainTime()
      The lifecycle draining hook is not configured if using the EC2 Capacity Provider. Enable managed termination protection instead.
      (deprecated) The time period to wait before force terminating an instance that is draining.

      This creates a Lambda function that is used by a lifecycle hook for the AutoScalingGroup that will delay instance termination until all ECS tasks have drained from the instance. Set to 0 to disable task draining.

      Set to 0 to disable task draining.

      Default: Duration.minutes(5)

    • getTopicEncryptionKey

      @Stability(Stable) @Nullable default IKey getTopicEncryptionKey()
      invalid @link
      is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See [SNS Data Encryption]( for more information.

      Default: The SNS Topic will not be encrypted.

    • builder

      @Stability(Stable) static AddAutoScalingGroupCapacityOptions.Builder builder()
      a AddAutoScalingGroupCapacityOptions.Builder of AddAutoScalingGroupCapacityOptions