AWS Classic

v4.30.0 published on Tuesday, Nov 30, 2021 by Pulumi

Policy

Provides an AutoScaling Scaling Policy resource.

NOTE: You may want to omit desired_capacity attribute from attached aws.autoscaling.Group when using autoscaling policies. It’s good practice to pick either manual or dynamic (policy-based) scaling.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var bar = new Aws.AutoScaling.Group("bar", new Aws.AutoScaling.GroupArgs
        {
            AvailabilityZones = 
            {
                "us-east-1a",
            },
            MaxSize = 5,
            MinSize = 2,
            HealthCheckGracePeriod = 300,
            HealthCheckType = "ELB",
            ForceDelete = true,
            LaunchConfiguration = aws_launch_configuration.Foo.Name,
        });
        var bat = new Aws.AutoScaling.Policy("bat", new Aws.AutoScaling.PolicyArgs
        {
            ScalingAdjustment = 4,
            AdjustmentType = "ChangeInCapacity",
            Cooldown = 300,
            AutoscalingGroupName = bar.Name,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/autoscaling"
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		bar, err := autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{
			AvailabilityZones: pulumi.StringArray{
				pulumi.String("us-east-1a"),
			},
			MaxSize:                pulumi.Int(5),
			MinSize:                pulumi.Int(2),
			HealthCheckGracePeriod: pulumi.Int(300),
			HealthCheckType:        pulumi.String("ELB"),
			ForceDelete:            pulumi.Bool(true),
			LaunchConfiguration:    pulumi.Any(aws_launch_configuration.Foo.Name),
		})
		if err != nil {
			return err
		}
		_, err = autoscaling.NewPolicy(ctx, "bat", &autoscaling.PolicyArgs{
			ScalingAdjustment:    pulumi.Int(4),
			AdjustmentType:       pulumi.String("ChangeInCapacity"),
			Cooldown:             pulumi.Int(300),
			AutoscalingGroupName: bar.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

bar = aws.autoscaling.Group("bar",
    availability_zones=["us-east-1a"],
    max_size=5,
    min_size=2,
    health_check_grace_period=300,
    health_check_type="ELB",
    force_delete=True,
    launch_configuration=aws_launch_configuration["foo"]["name"])
bat = aws.autoscaling.Policy("bat",
    scaling_adjustment=4,
    adjustment_type="ChangeInCapacity",
    cooldown=300,
    autoscaling_group_name=bar.name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const bar = new aws.autoscaling.Group("bar", {
    availabilityZones: ["us-east-1a"],
    maxSize: 5,
    minSize: 2,
    healthCheckGracePeriod: 300,
    healthCheckType: "ELB",
    forceDelete: true,
    launchConfiguration: aws_launch_configuration.foo.name,
});
const bat = new aws.autoscaling.Policy("bat", {
    scalingAdjustment: 4,
    adjustmentType: "ChangeInCapacity",
    cooldown: 300,
    autoscalingGroupName: bar.name,
});

Create a Policy Resource

new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
@overload
def Policy(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           adjustment_type: Optional[str] = None,
           autoscaling_group_name: Optional[str] = None,
           cooldown: Optional[int] = None,
           estimated_instance_warmup: Optional[int] = None,
           metric_aggregation_type: Optional[str] = None,
           min_adjustment_magnitude: Optional[int] = None,
           name: Optional[str] = None,
           policy_type: Optional[str] = None,
           predictive_scaling_configuration: Optional[PolicyPredictiveScalingConfigurationArgs] = None,
           scaling_adjustment: Optional[int] = None,
           step_adjustments: Optional[Sequence[PolicyStepAdjustmentArgs]] = None,
           target_tracking_configuration: Optional[PolicyTargetTrackingConfigurationArgs] = None)
@overload
def Policy(resource_name: str,
           args: PolicyArgs,
           opts: Optional[ResourceOptions] = None)
func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Policy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Policy resource accepts the following input properties:

AutoscalingGroupName string
The name of the autoscaling group.
AdjustmentType string
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
Cooldown int
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
EstimatedInstanceWarmup int
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
MetricAggregationType string
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
MinAdjustmentMagnitude int
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Name string
The name of the dimension.
PolicyType string
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
PredictiveScalingConfiguration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
ScalingAdjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
StepAdjustments List<PolicyStepAdjustmentArgs>
A set of adjustments that manage group scaling. These have the following structure:
TargetTrackingConfiguration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:
AutoscalingGroupName string
The name of the autoscaling group.
AdjustmentType string
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
Cooldown int
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
EstimatedInstanceWarmup int
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
MetricAggregationType string
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
MinAdjustmentMagnitude int
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Name string
The name of the dimension.
PolicyType string
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
PredictiveScalingConfiguration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
ScalingAdjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
StepAdjustments []PolicyStepAdjustmentArgs
A set of adjustments that manage group scaling. These have the following structure:
TargetTrackingConfiguration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:
autoscalingGroupName string
The name of the autoscaling group.
adjustmentType string
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
cooldown number
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
estimatedInstanceWarmup number
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
metricAggregationType string
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
minAdjustmentMagnitude number
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
name string
The name of the dimension.
policyType string
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
predictiveScalingConfiguration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
scalingAdjustment number
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
stepAdjustments PolicyStepAdjustmentArgs[]
A set of adjustments that manage group scaling. These have the following structure:
targetTrackingConfiguration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:
autoscaling_group_name str
The name of the autoscaling group.
adjustment_type str
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
cooldown int
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
estimated_instance_warmup int
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
metric_aggregation_type str
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
min_adjustment_magnitude int
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
name str
The name of the dimension.
policy_type str
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
predictive_scaling_configuration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
scaling_adjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
step_adjustments Sequence[PolicyStepAdjustmentArgs]
A set of adjustments that manage group scaling. These have the following structure:
target_tracking_configuration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:

Outputs

All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:

Arn string
The ARN assigned by AWS to the scaling policy.
Id string
The provider-assigned unique ID for this managed resource.
Arn string
The ARN assigned by AWS to the scaling policy.
Id string
The provider-assigned unique ID for this managed resource.
arn string
The ARN assigned by AWS to the scaling policy.
id string
The provider-assigned unique ID for this managed resource.
arn str
The ARN assigned by AWS to the scaling policy.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Policy Resource

Get an existing Policy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PolicyState, opts?: CustomResourceOptions): Policy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        adjustment_type: Optional[str] = None,
        arn: Optional[str] = None,
        autoscaling_group_name: Optional[str] = None,
        cooldown: Optional[int] = None,
        estimated_instance_warmup: Optional[int] = None,
        metric_aggregation_type: Optional[str] = None,
        min_adjustment_magnitude: Optional[int] = None,
        name: Optional[str] = None,
        policy_type: Optional[str] = None,
        predictive_scaling_configuration: Optional[PolicyPredictiveScalingConfigurationArgs] = None,
        scaling_adjustment: Optional[int] = None,
        step_adjustments: Optional[Sequence[PolicyStepAdjustmentArgs]] = None,
        target_tracking_configuration: Optional[PolicyTargetTrackingConfigurationArgs] = None) -> Policy
func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AdjustmentType string
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
Arn string
The ARN assigned by AWS to the scaling policy.
AutoscalingGroupName string
The name of the autoscaling group.
Cooldown int
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
EstimatedInstanceWarmup int
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
MetricAggregationType string
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
MinAdjustmentMagnitude int
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Name string
The name of the dimension.
PolicyType string
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
PredictiveScalingConfiguration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
ScalingAdjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
StepAdjustments List<PolicyStepAdjustmentArgs>
A set of adjustments that manage group scaling. These have the following structure:
TargetTrackingConfiguration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:
AdjustmentType string
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
Arn string
The ARN assigned by AWS to the scaling policy.
AutoscalingGroupName string
The name of the autoscaling group.
Cooldown int
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
EstimatedInstanceWarmup int
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
MetricAggregationType string
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
MinAdjustmentMagnitude int
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Name string
The name of the dimension.
PolicyType string
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
PredictiveScalingConfiguration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
ScalingAdjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
StepAdjustments []PolicyStepAdjustmentArgs
A set of adjustments that manage group scaling. These have the following structure:
TargetTrackingConfiguration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:
adjustmentType string
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
arn string
The ARN assigned by AWS to the scaling policy.
autoscalingGroupName string
The name of the autoscaling group.
cooldown number
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
estimatedInstanceWarmup number
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
metricAggregationType string
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
minAdjustmentMagnitude number
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
name string
The name of the dimension.
policyType string
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
predictiveScalingConfiguration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
scalingAdjustment number
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
stepAdjustments PolicyStepAdjustmentArgs[]
A set of adjustments that manage group scaling. These have the following structure:
targetTrackingConfiguration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:
adjustment_type str
Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
arn str
The ARN assigned by AWS to the scaling policy.
autoscaling_group_name str
The name of the autoscaling group.
cooldown int
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
estimated_instance_warmup int
The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
metric_aggregation_type str
The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
min_adjustment_magnitude int
Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
name str
The name of the dimension.
policy_type str
The policy type, either “SimpleScaling”, “StepScaling”, “TargetTrackingScaling”, or “PredictiveScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
predictive_scaling_configuration PolicyPredictiveScalingConfigurationArgs
The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
scaling_adjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
step_adjustments Sequence[PolicyStepAdjustmentArgs]
A set of adjustments that manage group scaling. These have the following structure:
target_tracking_configuration PolicyTargetTrackingConfigurationArgs
A target tracking policy. These have the following structure:

Supporting Types

PolicyPredictiveScalingConfiguration

MetricSpecification PolicyPredictiveScalingConfigurationMetricSpecification
This structure includes the metrics and target utilization to use for predictive scaling.
MaxCapacityBreachBehavior string
Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are HonorMaxCapacity or IncreaseMaxCapacity. Default is HonorMaxCapacity.
MaxCapacityBuffer string
The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is 0 to 100. If set to 0, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.
Mode string
The predictive scaling mode. Valid values are ForecastAndScale and ForecastOnly. Default is ForecastOnly.
SchedulingBufferTime string
The amount of time, in seconds, by which the instance launch time can be advanced. Minimum is 0.
MetricSpecification PolicyPredictiveScalingConfigurationMetricSpecification
This structure includes the metrics and target utilization to use for predictive scaling.
MaxCapacityBreachBehavior string
Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are HonorMaxCapacity or IncreaseMaxCapacity. Default is HonorMaxCapacity.
MaxCapacityBuffer string
The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is 0 to 100. If set to 0, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.
Mode string
The predictive scaling mode. Valid values are ForecastAndScale and ForecastOnly. Default is ForecastOnly.
SchedulingBufferTime string
The amount of time, in seconds, by which the instance launch time can be advanced. Minimum is 0.
metricSpecification PolicyPredictiveScalingConfigurationMetricSpecification
This structure includes the metrics and target utilization to use for predictive scaling.
maxCapacityBreachBehavior string
Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are HonorMaxCapacity or IncreaseMaxCapacity. Default is HonorMaxCapacity.
maxCapacityBuffer string
The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is 0 to 100. If set to 0, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.
mode string
The predictive scaling mode. Valid values are ForecastAndScale and ForecastOnly. Default is ForecastOnly.
schedulingBufferTime string
The amount of time, in seconds, by which the instance launch time can be advanced. Minimum is 0.
metric_specification PolicyPredictiveScalingConfigurationMetricSpecification
This structure includes the metrics and target utilization to use for predictive scaling.
max_capacity_breach_behavior str
Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are HonorMaxCapacity or IncreaseMaxCapacity. Default is HonorMaxCapacity.
max_capacity_buffer str
The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is 0 to 100. If set to 0, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.
mode str
The predictive scaling mode. Valid values are ForecastAndScale and ForecastOnly. Default is ForecastOnly.
scheduling_buffer_time str
The amount of time, in seconds, by which the instance launch time can be advanced. Minimum is 0.

PolicyPredictiveScalingConfigurationMetricSpecification

PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification

PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefined_metric_type str
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resource_label str
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.

PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification

PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefined_metric_type str
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resource_label str
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.

PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification

PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefined_metric_type str
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resource_label str
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.

PolicyStepAdjustment

ScalingAdjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
MetricIntervalLowerBound string
The lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity.
MetricIntervalUpperBound string
The upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity. The upper bound must be greater than the lower bound.
ScalingAdjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
MetricIntervalLowerBound string
The lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity.
MetricIntervalUpperBound string
The upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity. The upper bound must be greater than the lower bound.
scalingAdjustment number
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
metricIntervalLowerBound string
The lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity.
metricIntervalUpperBound string
The upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity. The upper bound must be greater than the lower bound.
scaling_adjustment int
The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
metric_interval_lower_bound str
The lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity.
metric_interval_upper_bound str
The upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity. The upper bound must be greater than the lower bound.

PolicyTargetTrackingConfiguration

TargetValue double
The target value for the metric.
CustomizedMetricSpecification PolicyTargetTrackingConfigurationCustomizedMetricSpecification
A customized metric. Conflicts with predefined_metric_specification.
DisableScaleIn bool
Indicates whether scale in by the target tracking policy is disabled.
PredefinedMetricSpecification PolicyTargetTrackingConfigurationPredefinedMetricSpecification
A predefined metric. Conflicts with customized_metric_specification.
TargetValue float64
The target value for the metric.
CustomizedMetricSpecification PolicyTargetTrackingConfigurationCustomizedMetricSpecification
A customized metric. Conflicts with predefined_metric_specification.
DisableScaleIn bool
Indicates whether scale in by the target tracking policy is disabled.
PredefinedMetricSpecification PolicyTargetTrackingConfigurationPredefinedMetricSpecification
A predefined metric. Conflicts with customized_metric_specification.
targetValue number
The target value for the metric.
customizedMetricSpecification PolicyTargetTrackingConfigurationCustomizedMetricSpecification
A customized metric. Conflicts with predefined_metric_specification.
disableScaleIn boolean
Indicates whether scale in by the target tracking policy is disabled.
predefinedMetricSpecification PolicyTargetTrackingConfigurationPredefinedMetricSpecification
A predefined metric. Conflicts with customized_metric_specification.
target_value float
The target value for the metric.
customized_metric_specification PolicyTargetTrackingConfigurationCustomizedMetricSpecification
A customized metric. Conflicts with predefined_metric_specification.
disable_scale_in bool
Indicates whether scale in by the target tracking policy is disabled.
predefined_metric_specification PolicyTargetTrackingConfigurationPredefinedMetricSpecification
A predefined metric. Conflicts with customized_metric_specification.

PolicyTargetTrackingConfigurationCustomizedMetricSpecification

MetricName string
The name of the metric.
Namespace string
The namespace of the metric.
Statistic string
The statistic of the metric.
MetricDimensions List<PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension>
The dimensions of the metric.
Unit string
The unit of the metric.
MetricName string
The name of the metric.
Namespace string
The namespace of the metric.
Statistic string
The statistic of the metric.
MetricDimensions []PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension
The dimensions of the metric.
Unit string
The unit of the metric.
metricName string
The name of the metric.
namespace string
The namespace of the metric.
statistic string
The statistic of the metric.
metricDimensions PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension[]
The dimensions of the metric.
unit string
The unit of the metric.
metric_name str
The name of the metric.
namespace str
The namespace of the metric.
statistic str
The statistic of the metric.
metric_dimensions Sequence[PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension]
The dimensions of the metric.
unit str
The unit of the metric.

PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension

Name string
The name of the dimension.
Value string
The value of the dimension.
Name string
The name of the dimension.
Value string
The value of the dimension.
name string
The name of the dimension.
value string
The value of the dimension.
name str
The name of the dimension.
value str
The value of the dimension.

PolicyTargetTrackingConfigurationPredefinedMetricSpecification

PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
PredefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
ResourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefinedMetricType string
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resourceLabel string
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
predefined_metric_type str
Describes a scaling metric for a predictive scaling policy. Valid values are ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, or ALBRequestCountPerTarget.
resource_label str
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.

Import

AutoScaling scaling policy can be imported using the role autoscaling_group_name and name separated by /.

 $ pulumi import aws:autoscaling/policy:Policy test-policy asg-name/policy-name

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.