@Stability(value=Stable) public static final class CfnAutoScalingGroup.Builder extends Object implements software.amazon.jsii.Builder<CfnAutoScalingGroup>
CfnAutoScalingGroup.| Modifier and Type | Method and Description |
|---|---|
CfnAutoScalingGroup.Builder |
autoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
|
CfnAutoScalingGroup.Builder |
availabilityZones(List<String> availabilityZones)
A list of Availability Zones where instances in the Auto Scaling group can be created.
|
CfnAutoScalingGroup |
build() |
CfnAutoScalingGroup.Builder |
capacityRebalance(Boolean capacityRebalance)
Indicates whether Capacity Rebalancing is enabled.
|
CfnAutoScalingGroup.Builder |
capacityRebalance(IResolvable capacityRebalance)
Indicates whether Capacity Rebalancing is enabled.
|
CfnAutoScalingGroup.Builder |
context(String context)
Reserved.
|
CfnAutoScalingGroup.Builder |
cooldown(String cooldown)
The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
|
static CfnAutoScalingGroup.Builder |
create(software.constructs.Construct scope,
String id) |
CfnAutoScalingGroup.Builder |
desiredCapacity(String desiredCapacity)
The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain.
|
CfnAutoScalingGroup.Builder |
desiredCapacityType(String desiredCapacityType)
The unit of measurement for the value specified for desired capacity.
|
CfnAutoScalingGroup.Builder |
healthCheckGracePeriod(Number healthCheckGracePeriod)
The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check.
|
CfnAutoScalingGroup.Builder |
healthCheckType(String healthCheckType)
The service to use for the health checks.
|
CfnAutoScalingGroup.Builder |
instanceId(String instanceId)
The ID of the instance used to base the launch configuration on.
|
CfnAutoScalingGroup.Builder |
launchConfigurationName(String launchConfigurationName)
The name of the [launch configuration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html) to use to launch instances.
|
CfnAutoScalingGroup.Builder |
launchTemplate(CfnAutoScalingGroup.LaunchTemplateSpecificationProperty launchTemplate)
Properties used to specify the [launch template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html) and version to use to launch instances.
|
CfnAutoScalingGroup.Builder |
launchTemplate(IResolvable launchTemplate)
Properties used to specify the [launch template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html) and version to use to launch instances.
|
CfnAutoScalingGroup.Builder |
lifecycleHookSpecificationList(IResolvable lifecycleHookSpecificationList)
One or more lifecycle hooks for the group, which specify actions to perform when Amazon EC2 Auto Scaling launches or terminates instances.
|
CfnAutoScalingGroup.Builder |
lifecycleHookSpecificationList(List<? extends Object> lifecycleHookSpecificationList)
One or more lifecycle hooks for the group, which specify actions to perform when Amazon EC2 Auto Scaling launches or terminates instances.
|
CfnAutoScalingGroup.Builder |
loadBalancerNames(List<String> loadBalancerNames)
A list of Classic Load Balancers associated with this Auto Scaling group.
|
CfnAutoScalingGroup.Builder |
maxInstanceLifetime(Number maxInstanceLifetime)
The maximum amount of time, in seconds, that an instance can be in service.
|
CfnAutoScalingGroup.Builder |
maxSize(String maxSize)
The maximum size of the group.
|
CfnAutoScalingGroup.Builder |
metricsCollection(IResolvable metricsCollection)
Enables the monitoring of group metrics of an Auto Scaling group.
|
CfnAutoScalingGroup.Builder |
metricsCollection(List<? extends Object> metricsCollection)
Enables the monitoring of group metrics of an Auto Scaling group.
|
CfnAutoScalingGroup.Builder |
minSize(String minSize)
The minimum size of the group.
|
CfnAutoScalingGroup.Builder |
mixedInstancesPolicy(CfnAutoScalingGroup.MixedInstancesPolicyProperty mixedInstancesPolicy)
An embedded object that specifies a mixed instances policy.
|
CfnAutoScalingGroup.Builder |
mixedInstancesPolicy(IResolvable mixedInstancesPolicy)
An embedded object that specifies a mixed instances policy.
|
CfnAutoScalingGroup.Builder |
newInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn)
Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.
|
CfnAutoScalingGroup.Builder |
newInstancesProtectedFromScaleIn(IResolvable newInstancesProtectedFromScaleIn)
Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.
|
CfnAutoScalingGroup.Builder |
notificationConfigurations(IResolvable notificationConfigurations)
Configures an Auto Scaling group to send notifications when specified events take place.
|
CfnAutoScalingGroup.Builder |
notificationConfigurations(List<? extends Object> notificationConfigurations)
Configures an Auto Scaling group to send notifications when specified events take place.
|
CfnAutoScalingGroup.Builder |
placementGroup(String placementGroup)
The name of the placement group into which you want to launch your instances.
|
CfnAutoScalingGroup.Builder |
serviceLinkedRoleArn(String serviceLinkedRoleArn)
The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS services on your behalf.
|
CfnAutoScalingGroup.Builder |
tags(List<? extends CfnAutoScalingGroup.TagPropertyProperty> tags)
One or more tags.
|
CfnAutoScalingGroup.Builder |
targetGroupArns(List<String> targetGroupArns)
One or more Amazon Resource Names (ARN) of load balancer target groups to associate with the Auto Scaling group.
|
CfnAutoScalingGroup.Builder |
terminationPolicies(List<String> terminationPolicies)
A policy or a list of policies that are used to select the instances to terminate.
|
CfnAutoScalingGroup.Builder |
vpcZoneIdentifier(List<String> vpcZoneIdentifier)
A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created.
|
@Stability(value=Stable) public static CfnAutoScalingGroup.Builder create(software.constructs.Construct scope, String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.CfnAutoScalingGroup.AcceleratorCountRequestProperty.Builder.@Stability(value=Stable) public CfnAutoScalingGroup.Builder maxSize(String maxSize)
With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
MaxSizeto meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go aboveMaxSizeby more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).
maxSize - The maximum size of the group. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder minSize(String minSize)
minSize - The minimum size of the group. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder autoScalingGroupName(String autoScalingGroupName)
This name must be unique per Region per account.
autoScalingGroupName - The name of the Auto Scaling group. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder availabilityZones(List<String> availabilityZones)
You must specify one of the following properties: VPCZoneIdentifier or AvailabilityZones . If your account supports EC2-Classic and VPC, this property is required to create an Auto Scaling group that launches instances into EC2-Classic.
availabilityZones - A list of Availability Zones where instances in the Auto Scaling group can be created. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder capacityRebalance(Boolean capacityRebalance)
For more information, see Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the Amazon EC2 Auto Scaling User Guide .
capacityRebalance - Indicates whether Capacity Rebalancing is enabled. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder capacityRebalance(IResolvable capacityRebalance)
For more information, see Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the Amazon EC2 Auto Scaling User Guide .
capacityRebalance - Indicates whether Capacity Rebalancing is enabled. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder context(String context)
context - Reserved. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder cooldown(String cooldown)
The default value is 300 . This setting applies when using simple scaling policies, but not when using other scaling policies or scheduled scaling. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .
cooldown - The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder desiredCapacity(String desiredCapacity)
It can scale beyond this capacity if you configure automatic scaling.
The number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity when creating the stack, the default is the minimum size of the group.
CloudFormation marks the Auto Scaling group as successful (by setting its status to CREATE_COMPLETE) when the desired capacity is reached. However, if a maximum Spot price is set in the launch template or launch configuration that you specified, then desired capacity is not used as a criteria for success. Whether your request is fulfilled depends on Spot Instance capacity and your maximum price.
desiredCapacity - The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder desiredCapacityType(String desiredCapacityType)
Amazon EC2 Auto Scaling supports DesiredCapacityType for attribute-based instance type selection only. For more information, see Create an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide .
By default, Amazon EC2 Auto Scaling specifies units , which translates into number of instances.
Valid values: units | vcpu | memory-mib
desiredCapacityType - The unit of measurement for the value specified for desired capacity. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder healthCheckGracePeriod(Number healthCheckGracePeriod)
The default value is 0 . For more information, see Health checks for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide .
If you are adding an ELB health check, you must specify this property.
healthCheckGracePeriod - The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder healthCheckType(String healthCheckType)
The valid values are EC2 (default) and ELB . If you configure an Auto Scaling group to use load balancer (ELB) health checks, it considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks. For more information, see Health checks for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide .
healthCheckType - The service to use for the health checks. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder instanceId(String instanceId)
For more information, see Create an Auto Scaling group using an EC2 instance in the Amazon EC2 Auto Scaling User Guide .
If you specify LaunchTemplate , MixedInstancesPolicy , or LaunchConfigurationName , don't specify InstanceId .
instanceId - The ID of the instance used to base the launch configuration on. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder launchConfigurationName(String launchConfigurationName)
Required only if you don't specify LaunchTemplate , MixedInstancesPolicy , or InstanceId .
launchConfigurationName - The name of the [launch configuration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html) to use to launch instances. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder launchTemplate(CfnAutoScalingGroup.LaunchTemplateSpecificationProperty launchTemplate)
If you omit this property, you must specify MixedInstancesPolicy , LaunchConfigurationName , or InstanceId .
launchTemplate - Properties used to specify the [launch template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html) and version to use to launch instances. You can alternatively associate a launch template to the Auto Scaling group by specifying a `MixedInstancesPolicy` . This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder launchTemplate(IResolvable launchTemplate)
If you omit this property, you must specify MixedInstancesPolicy , LaunchConfigurationName , or InstanceId .
launchTemplate - Properties used to specify the [launch template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html) and version to use to launch instances. You can alternatively associate a launch template to the Auto Scaling group by specifying a `MixedInstancesPolicy` . This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder lifecycleHookSpecificationList(IResolvable lifecycleHookSpecificationList)
lifecycleHookSpecificationList - One or more lifecycle hooks for the group, which specify actions to perform when Amazon EC2 Auto Scaling launches or terminates instances. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder lifecycleHookSpecificationList(List<? extends Object> lifecycleHookSpecificationList)
lifecycleHookSpecificationList - One or more lifecycle hooks for the group, which specify actions to perform when Amazon EC2 Auto Scaling launches or terminates instances. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder loadBalancerNames(List<String> loadBalancerNames)
For Application Load Balancers, Network Load Balancers, and Gateway Load Balancers, specify the TargetGroupARNs property instead.
loadBalancerNames - A list of Classic Load Balancers associated with this Auto Scaling group. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder maxInstanceLifetime(Number maxInstanceLifetime)
The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see Replace Auto Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide .
maxInstanceLifetime - The maximum amount of time, in seconds, that an instance can be in service. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder metricsCollection(IResolvable metricsCollection)
By default, these metrics are disabled.
metricsCollection - Enables the monitoring of group metrics of an Auto Scaling group. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder metricsCollection(List<? extends Object> metricsCollection)
By default, these metrics are disabled.
metricsCollection - Enables the monitoring of group metrics of an Auto Scaling group. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder mixedInstancesPolicy(CfnAutoScalingGroup.MixedInstancesPolicyProperty mixedInstancesPolicy)
The policy includes properties that not only define the distribution of On-Demand Instances and Spot Instances, the maximum price to pay for Spot Instances (optional), and how the Auto Scaling group allocates instance types to fulfill On-Demand and Spot capacities, but also the properties that specify the instance configuration information—the launch template and instance types. The policy can also include a weight for each instance type and different launch templates for individual instance types.
For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide .
mixedInstancesPolicy - An embedded object that specifies a mixed instances policy. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder mixedInstancesPolicy(IResolvable mixedInstancesPolicy)
The policy includes properties that not only define the distribution of On-Demand Instances and Spot Instances, the maximum price to pay for Spot Instances (optional), and how the Auto Scaling group allocates instance types to fulfill On-Demand and Spot capacities, but also the properties that specify the instance configuration information—the launch template and instance types. The policy can also include a weight for each instance type and different launch templates for individual instance types.
For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide .
mixedInstancesPolicy - An embedded object that specifies a mixed instances policy. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder newInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn)
For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide .
newInstancesProtectedFromScaleIn - Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder newInstancesProtectedFromScaleIn(IResolvable newInstancesProtectedFromScaleIn)
For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide .
newInstancesProtectedFromScaleIn - Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder notificationConfigurations(IResolvable notificationConfigurations)
notificationConfigurations - Configures an Auto Scaling group to send notifications when specified events take place. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder notificationConfigurations(List<? extends Object> notificationConfigurations)
notificationConfigurations - Configures an Auto Scaling group to send notifications when specified events take place. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder placementGroup(String placementGroup)
For more information, see Placement groups in the Amazon EC2 User Guide for Linux Instances .
A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.
placementGroup - The name of the placement group into which you want to launch your instances. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder serviceLinkedRoleArn(String serviceLinkedRoleArn)
By default, Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling , which it creates if it does not exist. For more information, see Service-linked roles for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .
serviceLinkedRoleArn - The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS services on your behalf. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder tags(List<? extends CfnAutoScalingGroup.TagPropertyProperty> tags)
You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide .
tags - One or more tags. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder targetGroupArns(List<String> targetGroupArns)
Instances are registered as targets in a target group, and traffic is routed to the target group. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .
targetGroupArns - One or more Amazon Resource Names (ARN) of load balancer target groups to associate with the Auto Scaling group. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder terminationPolicies(List<String> terminationPolicies)
The policies are executed in the order that you list them. The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance , OldestLaunchConfiguration , NewestInstance , ClosestToNextInstanceHour , Default , OldestLaunchTemplate , and AllocationStrategy . For more information, see Control which Auto Scaling instances terminate during scale in in the Amazon EC2 Auto Scaling User Guide .
terminationPolicies - A policy or a list of policies that are used to select the instances to terminate. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup.Builder vpcZoneIdentifier(List<String> vpcZoneIdentifier)
If you specify VPCZoneIdentifier with AvailabilityZones , the subnets that you specify for this property must reside in those Availability Zones.
If this resource specifies public subnets and is also in a VPC that is defined in the same stack template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment .
When you update
VPCZoneIdentifier, this retains the same Auto Scaling group and replaces old instances with new ones, according to the specified subnets. You can optionally specify how CloudFormation handles these updates by using an UpdatePolicy attribute .
vpcZoneIdentifier - A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created. This parameter is required.this@Stability(value=Stable) public CfnAutoScalingGroup build()
build in interface software.amazon.jsii.Builder<CfnAutoScalingGroup>Copyright © 2022. All rights reserved.