Class CfnAutoScalingGroupPropsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.autoscaling.CfnAutoScalingGroupPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-19T12:55:17.073Z")
@Stability(Stable)
public class CfnAutoScalingGroupPropsMixin
extends Mixin
implements software.constructs.IMixin
The
AWS::AutoScaling::AutoScalingGroup resource defines an Amazon EC2 Auto Scaling group, which is a collection of Amazon EC2 instances that are treated as a logical grouping for the purposes of automatic scaling and management.
For more information about Amazon EC2 Auto Scaling, see the Amazon EC2 Auto Scaling User Guide .
Amazon EC2 Auto Scaling configures instances launched as part of an Auto Scaling group using either a launch template or a launch configuration. We strongly recommend that you do not use launch configurations. For more information, see Launch configurations in the Amazon EC2 Auto Scaling User Guide .
For help migrating from launch configurations to launch templates, see Migrate AWS CloudFormation stacks from launch configurations to launch templates in the Amazon EC2 Auto Scaling User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.autoscaling.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnAutoScalingGroupPropsMixin cfnAutoScalingGroupPropsMixin = CfnAutoScalingGroupPropsMixin.Builder.create(CfnAutoScalingGroupMixinProps.builder()
.autoScalingGroupName("autoScalingGroupName")
.availabilityZoneDistribution(AvailabilityZoneDistributionProperty.builder()
.capacityDistributionStrategy("capacityDistributionStrategy")
.build())
.availabilityZoneImpairmentPolicy(AvailabilityZoneImpairmentPolicyProperty.builder()
.impairedZoneHealthCheckBehavior("impairedZoneHealthCheckBehavior")
.zonalShiftEnabled(false)
.build())
.availabilityZones(List.of("availabilityZones"))
.capacityRebalance(false)
.capacityReservationSpecification(CapacityReservationSpecificationProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.capacityReservationTarget(CapacityReservationTargetProperty.builder()
.capacityReservationIds(List.of("capacityReservationIds"))
.capacityReservationResourceGroupArns(List.of("capacityReservationResourceGroupArns"))
.build())
.build())
.context("context")
.cooldown("cooldown")
.defaultInstanceWarmup(123)
.deletionProtection("deletionProtection")
.desiredCapacity("desiredCapacity")
.desiredCapacityType("desiredCapacityType")
.healthCheckGracePeriod(123)
.healthCheckType("healthCheckType")
.instanceId("instanceId")
.instanceLifecyclePolicy(InstanceLifecyclePolicyProperty.builder()
.retentionTriggers(RetentionTriggersProperty.builder()
.terminateHookAbandon("terminateHookAbandon")
.build())
.build())
.instanceMaintenancePolicy(InstanceMaintenancePolicyProperty.builder()
.maxHealthyPercentage(123)
.minHealthyPercentage(123)
.build())
.launchConfigurationName("launchConfigurationName")
.launchTemplate(LaunchTemplateSpecificationProperty.builder()
.launchTemplateId("launchTemplateId")
.launchTemplateName("launchTemplateName")
.version("version")
.build())
.lifecycleHookSpecificationList(List.of(LifecycleHookSpecificationProperty.builder()
.defaultResult("defaultResult")
.heartbeatTimeout(123)
.lifecycleHookName("lifecycleHookName")
.lifecycleTransition("lifecycleTransition")
.notificationMetadata("notificationMetadata")
.notificationTargetArn("notificationTargetArn")
.roleArn("roleArn")
.build()))
.loadBalancerNames(List.of("loadBalancerNames"))
.maxInstanceLifetime(123)
.maxSize("maxSize")
.metricsCollection(List.of(MetricsCollectionProperty.builder()
.granularity("granularity")
.metrics(List.of("metrics"))
.build()))
.minSize("minSize")
.mixedInstancesPolicy(MixedInstancesPolicyProperty.builder()
.instancesDistribution(InstancesDistributionProperty.builder()
.onDemandAllocationStrategy("onDemandAllocationStrategy")
.onDemandBaseCapacity(123)
.onDemandPercentageAboveBaseCapacity(123)
.spotAllocationStrategy("spotAllocationStrategy")
.spotInstancePools(123)
.spotMaxPrice("spotMaxPrice")
.build())
.launchTemplate(LaunchTemplateProperty.builder()
.launchTemplateSpecification(LaunchTemplateSpecificationProperty.builder()
.launchTemplateId("launchTemplateId")
.launchTemplateName("launchTemplateName")
.version("version")
.build())
.overrides(List.of(LaunchTemplateOverridesProperty.builder()
.imageId("imageId")
.instanceRequirements(InstanceRequirementsProperty.builder()
.acceleratorCount(AcceleratorCountRequestProperty.builder()
.max(123)
.min(123)
.build())
.acceleratorManufacturers(List.of("acceleratorManufacturers"))
.acceleratorNames(List.of("acceleratorNames"))
.acceleratorTotalMemoryMiB(AcceleratorTotalMemoryMiBRequestProperty.builder()
.max(123)
.min(123)
.build())
.acceleratorTypes(List.of("acceleratorTypes"))
.allowedInstanceTypes(List.of("allowedInstanceTypes"))
.bareMetal("bareMetal")
.baselineEbsBandwidthMbps(BaselineEbsBandwidthMbpsRequestProperty.builder()
.max(123)
.min(123)
.build())
.baselinePerformanceFactors(BaselinePerformanceFactorsRequestProperty.builder()
.cpu(CpuPerformanceFactorRequestProperty.builder()
.references(List.of(PerformanceFactorReferenceRequestProperty.builder()
.instanceFamily("instanceFamily")
.build()))
.build())
.build())
.burstablePerformance("burstablePerformance")
.cpuManufacturers(List.of("cpuManufacturers"))
.excludedInstanceTypes(List.of("excludedInstanceTypes"))
.instanceGenerations(List.of("instanceGenerations"))
.localStorage("localStorage")
.localStorageTypes(List.of("localStorageTypes"))
.maxSpotPriceAsPercentageOfOptimalOnDemandPrice(123)
.memoryGiBPerVCpu(MemoryGiBPerVCpuRequestProperty.builder()
.max(123)
.min(123)
.build())
.memoryMiB(MemoryMiBRequestProperty.builder()
.max(123)
.min(123)
.build())
.networkBandwidthGbps(NetworkBandwidthGbpsRequestProperty.builder()
.max(123)
.min(123)
.build())
.networkInterfaceCount(NetworkInterfaceCountRequestProperty.builder()
.max(123)
.min(123)
.build())
.onDemandMaxPricePercentageOverLowestPrice(123)
.requireHibernateSupport(false)
.spotMaxPricePercentageOverLowestPrice(123)
.totalLocalStorageGb(TotalLocalStorageGBRequestProperty.builder()
.max(123)
.min(123)
.build())
.vCpuCount(VCpuCountRequestProperty.builder()
.max(123)
.min(123)
.build())
.build())
.instanceType("instanceType")
.launchTemplateSpecification(LaunchTemplateSpecificationProperty.builder()
.launchTemplateId("launchTemplateId")
.launchTemplateName("launchTemplateName")
.version("version")
.build())
.weightedCapacity("weightedCapacity")
.build()))
.build())
.build())
.newInstancesProtectedFromScaleIn(false)
.notificationConfiguration(NotificationConfigurationProperty.builder()
.notificationTypes(List.of("notificationTypes"))
.topicArn("topicArn")
.build())
.notificationConfigurations(List.of(NotificationConfigurationProperty.builder()
.notificationTypes(List.of("notificationTypes"))
.topicArn("topicArn")
.build()))
.placementGroup("placementGroup")
.serviceLinkedRoleArn("serviceLinkedRoleArn")
.skipZonalShiftValidation(false)
.tags(List.of(TagPropertyProperty.builder()
.key("key")
.propagateAtLaunch(false)
.value("value")
.build()))
.targetGroupArns(List.of("targetGroupArns"))
.terminationPolicies(List.of("terminationPolicies"))
.trafficSources(List.of(TrafficSourceIdentifierProperty.builder()
.identifier("identifier")
.type("type")
.build()))
.vpcZoneIdentifier(List.of("vpcZoneIdentifier"))
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAcceleratorCountRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum number of accelerators for an instance type.static interfaceAcceleratorTotalMemoryMiBRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum total memory size for the accelerators for an instance type, in MiB.static interfaceAvailabilityZoneDistributionis a property of the AWS::AutoScaling::AutoScalingGroup resource.static interfaceDescribes an Availability Zone impairment policy.static interfaceBaselineEbsBandwidthMbpsRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum baseline bandwidth performance for an instance type, in Mbps.static interfaceThe baseline performance to consider, using an instance family as a baseline reference.static final classA fluent builder forCfnAutoScalingGroupPropsMixin.static interfaceDescribes the Capacity Reservation preference and targeting options.static interfaceThe target for the Capacity Reservation.static interfaceThe CPU performance to consider, using an instance family as the baseline reference.static interfaceThe instance lifecycle policy for the Auto Scaling group.static interfaceInstanceMaintenancePolicyis a property of the AWS::AutoScaling::AutoScalingGroup resource.static interfaceThe attributes for the instance types for a mixed instances policy.static interfaceUse this structure to specify the distribution of On-Demand Instances and Spot Instances and the allocation strategies used to fulfill On-Demand and Spot capacities for a mixed instances policy.static interfaceUse this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances policy: - Override the instance type that is specified in the launch template.static interfaceUse this structure to specify the launch templates and instance types (overrides) for a mixed instances policy.static interfaceSpecifies a launch template to use when provisioning EC2 instances for an Auto Scaling group.static interfaceLifecycleHookSpecificationspecifies a lifecycle hook for theLifecycleHookSpecificationListproperty of the AWS::AutoScaling::AutoScalingGroup resource.static interfaceMemoryGiBPerVCpuRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum amount of memory per vCPU for an instance type, in GiB.static interfaceMemoryMiBRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum instance memory size for an instance type, in MiB.static interfaceMetricsCollectionis a property of the AWS::AutoScaling::AutoScalingGroup resource that describes the group metrics that an Amazon EC2 Auto Scaling group sends to Amazon CloudWatch.static interfaceUse this structure to launch multiple instance types and On-Demand Instances and Spot Instances within a single Auto Scaling group.static interfaceNetworkBandwidthGbpsRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum network bandwidth for an instance type, in Gbps.static interfaceNetworkInterfaceCountRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum number of network interfaces for an instance type.static interfaceA structure that specifies an Amazon SNS notification configuration for theNotificationConfigurationsproperty of the AWS::AutoScaling::AutoScalingGroup resource.static interfaceSpecify an instance family to use as the baseline reference for CPU performance.static interfaceDefines the specific triggers that cause instances to be retained in a Retained state rather than terminated.static interfaceA structure that specifies a tag for theTagsproperty of AWS::AutoScaling::AutoScalingGroup resource.static interfaceTotalLocalStorageGBRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum total local storage size for an instance type, in GB.static interfaceIdentifying information for a traffic source.static interfaceVCpuCountRequestis a property of theInstanceRequirementsproperty of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum number of vCPUs for an instance type.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::AutoScaling::AutoScalingGroup.Create a mixin to apply properties toAWS::AutoScaling::AutoScalingGroup.protectedCfnAutoScalingGroupPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAutoScalingGroupPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnAutoScalingGroupMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnAutoScalingGroupPropsMixin
protected CfnAutoScalingGroupPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAutoScalingGroupPropsMixin
protected CfnAutoScalingGroupPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAutoScalingGroupPropsMixin
@Stability(Stable) public CfnAutoScalingGroupPropsMixin(@NotNull CfnAutoScalingGroupMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::AutoScaling::AutoScalingGroup.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnAutoScalingGroupPropsMixin
@Stability(Stable) public CfnAutoScalingGroupPropsMixin(@NotNull CfnAutoScalingGroupMixinProps props) Create a mixin to apply properties toAWS::AutoScaling::AutoScalingGroup.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-