Enum CapacityDistributionStrategy
java.lang.Object
java.lang.Enum<CapacityDistributionStrategy>
software.amazon.awscdk.services.autoscaling.CapacityDistributionStrategy
- All Implemented Interfaces:
Serializable
,Comparable<CapacityDistributionStrategy>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-07-24T11:33:09.302Z")
@Stability(Stable)
public enum CapacityDistributionStrategy
extends Enum<CapacityDistributionStrategy>
The strategies for when launches fail in an Availability Zone.
Example:
Vpc vpc; InstanceType instanceType; IMachineImage machineImage; AutoScalingGroup.Builder.create(this, "ASG") .vpc(vpc) .instanceType(instanceType) .machineImage(machineImage) // ... .azCapacityDistributionStrategy(CapacityDistributionStrategy.BALANCED_ONLY) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIf launches fail in an Availability Zone, Auto Scaling will attempt to launch in another healthy Availability Zone instead.If launches fail in an Availability Zone, Auto Scaling will continue to attempt to launch in the unhealthy zone to preserve a balanced distribution. -
Method Summary
Modifier and TypeMethodDescriptionstatic CapacityDistributionStrategy
Returns the enum constant of this type with the specified name.static CapacityDistributionStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BALANCED_ONLY
If launches fail in an Availability Zone, Auto Scaling will continue to attempt to launch in the unhealthy zone to preserve a balanced distribution. -
BALANCED_BEST_EFFORT
If launches fail in an Availability Zone, Auto Scaling will attempt to launch in another healthy Availability Zone instead.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-