AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Write-ASScalingPolicy-AutoScalingGroupName <String>-PolicyName <String>-AdjustmentType <String>-Cooldown <Int32>-CustomizedMetricSpecification_Dimension <MetricDimension[]>-TargetTrackingConfiguration_DisableScaleIn <Boolean>-Enabled <Boolean>-EstimatedInstanceWarmup <Int32>-PredictiveScalingConfiguration_MaxCapacityBreachBehavior <PredictiveScalingMaxCapacityBreachBehavior>-PredictiveScalingConfiguration_MaxCapacityBuffer <Int32>-MetricAggregationType <String>-CustomizedMetricSpecification_MetricName <String>-CustomizedMetricSpecification_Metric <TargetTrackingMetricDataQuery[]>-PredictiveScalingConfiguration_MetricSpecification <PredictiveScalingMetricSpecification[]>-MinAdjustmentMagnitude <Int32>-MinAdjustmentStep <Int32>-PredictiveScalingConfiguration_Mode <PredictiveScalingMode>-CustomizedMetricSpecification_Namespace <String>-PolicyType <String>-PredefinedMetricSpecification_PredefinedMetricType <MetricType>-PredefinedMetricSpecification_ResourceLabel <String>-ScalingAdjustment <Int32>-PredictiveScalingConfiguration_SchedulingBufferTime <Int32>-CustomizedMetricSpecification_Statistic <MetricStatistic>-StepAdjustment <StepAdjustment[]>-TargetTrackingConfiguration_TargetValue <Double>-CustomizedMetricSpecification_Unit <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonAutoScalingConfig>
ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.Required if the policy type is StepScaling
or SimpleScaling
. For more information, see Scaling adjustment types in the Amazon EC2 Auto Scaling User Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | True |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
SimpleScaling
. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.Default: None Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_CustomizedMetricSpecification_Dimensions |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_CustomizedMetricSpecification_Metrics |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_CustomizedMetricSpecification_MetricName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_CustomizedMetricSpecification_Namespace |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_CustomizedMetricSpecification_Statistic |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_CustomizedMetricSpecification_Unit |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
TargetTrackingScaling
or StepScaling
.The default is to use the value for the default instance warmup defined for the group. If default instance warmup is null, then EstimatedInstanceWarmup
falls back to the value of default cooldown. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Minimum
, Maximum
, and Average
. If the aggregation type is null, the value is treated as Average
.Valid only if the policy type is StepScaling
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
PercentChangeInCapacity
. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude
of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude
of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.Valid only if the policy type is StepScaling
or SimpleScaling
. For more information, see Scaling adjustment types in the Amazon EC2 Auto Scaling User Guide.Some Auto Scaling groups use instance weights. In this case, set the MinAdjustmentMagnitude
to a value that is at least as large as your largest instance weight. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
MinAdjustmentMagnitude
instead. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | True |
Position? | 2 |
Accept pipeline input? | True (ByPropertyName) |
TargetTrackingScaling
StepScaling
SimpleScaling
(default)PredictiveScaling
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
ASGAverageCPUUtilization
- Average CPU utilization of the Auto Scaling group.ASGAverageNetworkIn
- Average number of bytes received on all network interfaces by the Auto Scaling group.ASGAverageNetworkOut
- Average number of bytes sent out on all network interfaces by the Auto Scaling group.ALBRequestCountPerTarget
- Average Application Load Balancer request count per target for your Auto Scaling group.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_PredefinedMetricSpecification_PredefinedMetricType |
app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff
.Where:Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TargetTrackingConfiguration_PredefinedMetricSpecification_ResourceLabel |
HonorMaxCapacity
if not specified.The following are possible values:HonorMaxCapacity
- Amazon EC2 Auto Scaling cannot scale out capacity higher than the maximum capacity. The maximum capacity is enforced as a hard limit.IncreaseMaxCapacity
- Amazon EC2 Auto Scaling can scale out capacity higher than the maximum capacity when the forecast capacity is close to or exceeds the maximum capacity. The upper limit is determined by the forecasted capacity and the value for MaxCapacityBuffer
.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
MaxCapacityBreachBehavior
property is set to IncreaseMaxCapacity
, and cannot be used otherwise. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | PredictiveScalingConfiguration_MetricSpecifications |
ForecastOnly
if not specified. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
SimpleScaling
. (Not used with any other policy type.) Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
StepScaling
. (Not used with any other policy type.) Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StepAdjustments |
false
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
Write-ASScalingPolicy -AutoScalingGroupName my-asg -AdjustmentType "ChangeInCapacity" -PolicyName "myScaleInPolicy" -ScalingAdjustment -1
arn:aws:autoscaling:us-west-2:123456789012:scalingPolicy:aa3836ab-5462-42c7-adab-e1d769fc24ef:autoScalingGroupName/my-asg
:policyName/myScaleInPolicyThis example adds the specified policy to the specified Auto Scaling group. The specified adjustment type determines how to interpret the ScalingAdjustment parameter. With 'ChangeInCapacity', a positive value increases the capacity by the specified number of instances and a negative value decreases the capacity by the specified number of instances.
AWS Tools for PowerShell: 2.x.y.z