Class AsgCapacityProviderProps.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecs.AsgCapacityProviderProps.Jsii$Proxy
All Implemented Interfaces:
AddAutoScalingGroupCapacityOptions, AsgCapacityProviderProps, software.amazon.jsii.JsiiSerializable
Enclosing interface:
AsgCapacityProviderProps

@Stability(Stable) @Internal public static final class AsgCapacityProviderProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AsgCapacityProviderProps
An implementation for AsgCapacityProviderProps
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
      Constructor that initializes the object based on values retrieved from the JsiiObject.
      Parameters:
      objRef - Reference to the JSII managed object.
    • Jsii$Proxy

      protected Jsii$Proxy(AsgCapacityProviderProps.Builder builder)
      Constructor that initializes the object based on literal property values passed by the AsgCapacityProviderProps.Builder.
  • Method Details

    • getAutoScalingGroup

      public final IAutoScalingGroup getAutoScalingGroup()
      Description copied from interface: AsgCapacityProviderProps
      The autoscaling group to add as a Capacity Provider.

      Warning: When passing an imported resource using AutoScalingGroup.fromAutoScalingGroupName along with enableManagedTerminationProtection: true, the AsgCapacityProvider construct will not be able to enforce the option newInstancesProtectedFromScaleIn of the AutoScalingGroup. In this case the constructor of AsgCapacityProvider will throw an exception.

      Specified by:
      getAutoScalingGroup in interface AsgCapacityProviderProps
    • getCapacityProviderName

      public final String getCapacityProviderName()
      Description copied from interface: AsgCapacityProviderProps
      The name of the capacity provider.

      If a name is specified, it cannot start with aws, ecs, or fargate. If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used. If the stack name starts with aws, ecs, or fargate, a unique resource name is generated that starts with cp-.

      Default: CloudFormation-generated name

      Specified by:
      getCapacityProviderName in interface AsgCapacityProviderProps
    • getEnableManagedDraining

      public final Boolean getEnableManagedDraining()
      Description copied from interface: AsgCapacityProviderProps
      Managed instance draining facilitates graceful termination of Amazon ECS instances.

      This allows your service workloads to stop safely and be rescheduled to non-terminating instances. Infrastructure maintenance and updates are preformed without disruptions to workloads. To use managed instance draining, set enableManagedDraining to true.

      Default: true

      Specified by:
      getEnableManagedDraining in interface AsgCapacityProviderProps
    • getEnableManagedScaling

      public final Boolean getEnableManagedScaling()
      Description copied from interface: AsgCapacityProviderProps
      When enabled the scale-in and scale-out actions of the cluster's Auto Scaling Group will be managed for you.

      This means your cluster will automatically scale instances based on the load your tasks put on the cluster. For more information, see Using Managed Scaling in the ECS Developer Guide.

      Default: true

      Specified by:
      getEnableManagedScaling in interface AsgCapacityProviderProps
    • getEnableManagedTerminationProtection

      public final Boolean getEnableManagedTerminationProtection()
      Description copied from interface: AsgCapacityProviderProps
      When enabled the Auto Scaling Group will only terminate EC2 instances that no longer have running non-daemon tasks.

      Scale-in protection will be automatically enabled on instances. When all non-daemon tasks are stopped on an instance, ECS initiates the scale-in process and turns off scale-in protection for the instance. The Auto Scaling Group can then terminate the instance. For more information see Managed termination protection in the ECS Developer Guide.

      Managed scaling must also be enabled.

      Default: true

      Specified by:
      getEnableManagedTerminationProtection in interface AsgCapacityProviderProps
    • getInstanceWarmupPeriod

      public final Number getInstanceWarmupPeriod()
      Description copied from interface: AsgCapacityProviderProps
      The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group.

      Must be between 0 and 10000.

      Default: 300

      Specified by:
      getInstanceWarmupPeriod in interface AsgCapacityProviderProps
    • getMaximumScalingStepSize

      public final Number getMaximumScalingStepSize()
      Description copied from interface: AsgCapacityProviderProps
      Maximum scaling step size.

      In most cases this should be left alone.

      Default: 1000

      Specified by:
      getMaximumScalingStepSize in interface AsgCapacityProviderProps
    • getMinimumScalingStepSize

      public final Number getMinimumScalingStepSize()
      Description copied from interface: AsgCapacityProviderProps
      Minimum scaling step size.

      In most cases this should be left alone.

      Default: 1

      Specified by:
      getMinimumScalingStepSize in interface AsgCapacityProviderProps
    • getTargetCapacityPercent

      public final Number getTargetCapacityPercent()
      Description copied from interface: AsgCapacityProviderProps
      Target capacity percent.

      In most cases this should be left alone.

      Default: 100

      Specified by:
      getTargetCapacityPercent in interface AsgCapacityProviderProps
    • getCanContainersAccessInstanceRole

      public final Boolean getCanContainersAccessInstanceRole()
      Description copied from interface: AddAutoScalingGroupCapacityOptions
      Specifies whether the containers can access the container instance role.

      Default: false

      Specified by:
      getCanContainersAccessInstanceRole in interface AddAutoScalingGroupCapacityOptions
    • getMachineImageType

      public final MachineImageType getMachineImageType()
      Description copied from interface: AddAutoScalingGroupCapacityOptions
      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`.

      Specified by:
      getMachineImageType in interface AddAutoScalingGroupCapacityOptions
    • getSpotInstanceDraining

      public final Boolean getSpotInstanceDraining()
      Description copied from interface: AddAutoScalingGroupCapacityOptions
      Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.

      For more information, see Using Spot Instances.

      Default: false

      Specified by:
      getSpotInstanceDraining in interface AddAutoScalingGroupCapacityOptions
    • getTopicEncryptionKey

      public final IKey getTopicEncryptionKey()
      Description copied from interface: AddAutoScalingGroupCapacityOptions
      If AddAutoScalingGroupCapacityOptions.taskDrainTime 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.

      Specified by:
      getTopicEncryptionKey in interface AddAutoScalingGroupCapacityOptions
    • $jsii$toJson

      @Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
      Specified by:
      $jsii$toJson in interface software.amazon.jsii.JsiiSerializable
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object