1. Packages
  2. AWS
  3. API Docs
  4. appautoscaling
  5. Policy
AWS v7.8.0 published on Tuesday, Oct 7, 2025 by Pulumi

aws.appautoscaling.Policy

Explore with Pulumi AI

aws logo
AWS v7.8.0 published on Tuesday, Oct 7, 2025 by Pulumi

    Provides an Application AutoScaling Policy resource.

    Example Usage

    DynamoDB Table Autoscaling

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const dynamodbTableReadTarget = new aws.appautoscaling.Target("dynamodb_table_read_target", {
        maxCapacity: 100,
        minCapacity: 5,
        resourceId: "table/tableName",
        scalableDimension: "dynamodb:table:ReadCapacityUnits",
        serviceNamespace: "dynamodb",
    });
    const dynamodbTableReadPolicy = new aws.appautoscaling.Policy("dynamodb_table_read_policy", {
        name: pulumi.interpolate`DynamoDBReadCapacityUtilization:${dynamodbTableReadTarget.resourceId}`,
        policyType: "TargetTrackingScaling",
        resourceId: dynamodbTableReadTarget.resourceId,
        scalableDimension: dynamodbTableReadTarget.scalableDimension,
        serviceNamespace: dynamodbTableReadTarget.serviceNamespace,
        targetTrackingScalingPolicyConfiguration: {
            predefinedMetricSpecification: {
                predefinedMetricType: "DynamoDBReadCapacityUtilization",
            },
            targetValue: 70,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    dynamodb_table_read_target = aws.appautoscaling.Target("dynamodb_table_read_target",
        max_capacity=100,
        min_capacity=5,
        resource_id="table/tableName",
        scalable_dimension="dynamodb:table:ReadCapacityUnits",
        service_namespace="dynamodb")
    dynamodb_table_read_policy = aws.appautoscaling.Policy("dynamodb_table_read_policy",
        name=dynamodb_table_read_target.resource_id.apply(lambda resource_id: f"DynamoDBReadCapacityUtilization:{resource_id}"),
        policy_type="TargetTrackingScaling",
        resource_id=dynamodb_table_read_target.resource_id,
        scalable_dimension=dynamodb_table_read_target.scalable_dimension,
        service_namespace=dynamodb_table_read_target.service_namespace,
        target_tracking_scaling_policy_configuration={
            "predefined_metric_specification": {
                "predefined_metric_type": "DynamoDBReadCapacityUtilization",
            },
            "target_value": 70,
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		dynamodbTableReadTarget, err := appautoscaling.NewTarget(ctx, "dynamodb_table_read_target", &appautoscaling.TargetArgs{
    			MaxCapacity:       pulumi.Int(100),
    			MinCapacity:       pulumi.Int(5),
    			ResourceId:        pulumi.String("table/tableName"),
    			ScalableDimension: pulumi.String("dynamodb:table:ReadCapacityUnits"),
    			ServiceNamespace:  pulumi.String("dynamodb"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appautoscaling.NewPolicy(ctx, "dynamodb_table_read_policy", &appautoscaling.PolicyArgs{
    			Name: dynamodbTableReadTarget.ResourceId.ApplyT(func(resourceId string) (string, error) {
    				return fmt.Sprintf("DynamoDBReadCapacityUtilization:%v", resourceId), nil
    			}).(pulumi.StringOutput),
    			PolicyType:        pulumi.String("TargetTrackingScaling"),
    			ResourceId:        dynamodbTableReadTarget.ResourceId,
    			ScalableDimension: dynamodbTableReadTarget.ScalableDimension,
    			ServiceNamespace:  dynamodbTableReadTarget.ServiceNamespace,
    			TargetTrackingScalingPolicyConfiguration: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{
    				PredefinedMetricSpecification: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{
    					PredefinedMetricType: pulumi.String("DynamoDBReadCapacityUtilization"),
    				},
    				TargetValue: pulumi.Float64(70),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var dynamodbTableReadTarget = new Aws.AppAutoScaling.Target("dynamodb_table_read_target", new()
        {
            MaxCapacity = 100,
            MinCapacity = 5,
            ResourceId = "table/tableName",
            ScalableDimension = "dynamodb:table:ReadCapacityUnits",
            ServiceNamespace = "dynamodb",
        });
    
        var dynamodbTableReadPolicy = new Aws.AppAutoScaling.Policy("dynamodb_table_read_policy", new()
        {
            Name = dynamodbTableReadTarget.ResourceId.Apply(resourceId => $"DynamoDBReadCapacityUtilization:{resourceId}"),
            PolicyType = "TargetTrackingScaling",
            ResourceId = dynamodbTableReadTarget.ResourceId,
            ScalableDimension = dynamodbTableReadTarget.ScalableDimension,
            ServiceNamespace = dynamodbTableReadTarget.ServiceNamespace,
            TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs
            {
                PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs
                {
                    PredefinedMetricType = "DynamoDBReadCapacityUtilization",
                },
                TargetValue = 70,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Target;
    import com.pulumi.aws.appautoscaling.TargetArgs;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var dynamodbTableReadTarget = new Target("dynamodbTableReadTarget", TargetArgs.builder()
                .maxCapacity(100)
                .minCapacity(5)
                .resourceId("table/tableName")
                .scalableDimension("dynamodb:table:ReadCapacityUnits")
                .serviceNamespace("dynamodb")
                .build());
    
            var dynamodbTableReadPolicy = new Policy("dynamodbTableReadPolicy", PolicyArgs.builder()
                .name(dynamodbTableReadTarget.resourceId().applyValue(_resourceId -> String.format("DynamoDBReadCapacityUtilization:%s", _resourceId)))
                .policyType("TargetTrackingScaling")
                .resourceId(dynamodbTableReadTarget.resourceId())
                .scalableDimension(dynamodbTableReadTarget.scalableDimension())
                .serviceNamespace(dynamodbTableReadTarget.serviceNamespace())
                .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()
                    .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()
                        .predefinedMetricType("DynamoDBReadCapacityUtilization")
                        .build())
                    .targetValue(70.0)
                    .build())
                .build());
    
        }
    }
    
    resources:
      dynamodbTableReadTarget:
        type: aws:appautoscaling:Target
        name: dynamodb_table_read_target
        properties:
          maxCapacity: 100
          minCapacity: 5
          resourceId: table/tableName
          scalableDimension: dynamodb:table:ReadCapacityUnits
          serviceNamespace: dynamodb
      dynamodbTableReadPolicy:
        type: aws:appautoscaling:Policy
        name: dynamodb_table_read_policy
        properties:
          name: DynamoDBReadCapacityUtilization:${dynamodbTableReadTarget.resourceId}
          policyType: TargetTrackingScaling
          resourceId: ${dynamodbTableReadTarget.resourceId}
          scalableDimension: ${dynamodbTableReadTarget.scalableDimension}
          serviceNamespace: ${dynamodbTableReadTarget.serviceNamespace}
          targetTrackingScalingPolicyConfiguration:
            predefinedMetricSpecification:
              predefinedMetricType: DynamoDBReadCapacityUtilization
            targetValue: 70
    

    ECS Service Autoscaling

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const ecsTarget = new aws.appautoscaling.Target("ecs_target", {
        maxCapacity: 4,
        minCapacity: 1,
        resourceId: "service/clusterName/serviceName",
        scalableDimension: "ecs:service:DesiredCount",
        serviceNamespace: "ecs",
    });
    const ecsPolicy = new aws.appautoscaling.Policy("ecs_policy", {
        name: "scale-down",
        policyType: "StepScaling",
        resourceId: ecsTarget.resourceId,
        scalableDimension: ecsTarget.scalableDimension,
        serviceNamespace: ecsTarget.serviceNamespace,
        stepScalingPolicyConfiguration: {
            adjustmentType: "ChangeInCapacity",
            cooldown: 60,
            metricAggregationType: "Maximum",
            stepAdjustments: [{
                metricIntervalUpperBound: "0",
                scalingAdjustment: -1,
            }],
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    ecs_target = aws.appautoscaling.Target("ecs_target",
        max_capacity=4,
        min_capacity=1,
        resource_id="service/clusterName/serviceName",
        scalable_dimension="ecs:service:DesiredCount",
        service_namespace="ecs")
    ecs_policy = aws.appautoscaling.Policy("ecs_policy",
        name="scale-down",
        policy_type="StepScaling",
        resource_id=ecs_target.resource_id,
        scalable_dimension=ecs_target.scalable_dimension,
        service_namespace=ecs_target.service_namespace,
        step_scaling_policy_configuration={
            "adjustment_type": "ChangeInCapacity",
            "cooldown": 60,
            "metric_aggregation_type": "Maximum",
            "step_adjustments": [{
                "metric_interval_upper_bound": "0",
                "scaling_adjustment": -1,
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ecsTarget, err := appautoscaling.NewTarget(ctx, "ecs_target", &appautoscaling.TargetArgs{
    			MaxCapacity:       pulumi.Int(4),
    			MinCapacity:       pulumi.Int(1),
    			ResourceId:        pulumi.String("service/clusterName/serviceName"),
    			ScalableDimension: pulumi.String("ecs:service:DesiredCount"),
    			ServiceNamespace:  pulumi.String("ecs"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appautoscaling.NewPolicy(ctx, "ecs_policy", &appautoscaling.PolicyArgs{
    			Name:              pulumi.String("scale-down"),
    			PolicyType:        pulumi.String("StepScaling"),
    			ResourceId:        ecsTarget.ResourceId,
    			ScalableDimension: ecsTarget.ScalableDimension,
    			ServiceNamespace:  ecsTarget.ServiceNamespace,
    			StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    				AdjustmentType:        pulumi.String("ChangeInCapacity"),
    				Cooldown:              pulumi.Int(60),
    				MetricAggregationType: pulumi.String("Maximum"),
    				StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalUpperBound: pulumi.String("0"),
    						ScalingAdjustment:        pulumi.Int(-1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsTarget = new Aws.AppAutoScaling.Target("ecs_target", new()
        {
            MaxCapacity = 4,
            MinCapacity = 1,
            ResourceId = "service/clusterName/serviceName",
            ScalableDimension = "ecs:service:DesiredCount",
            ServiceNamespace = "ecs",
        });
    
        var ecsPolicy = new Aws.AppAutoScaling.Policy("ecs_policy", new()
        {
            Name = "scale-down",
            PolicyType = "StepScaling",
            ResourceId = ecsTarget.ResourceId,
            ScalableDimension = ecsTarget.ScalableDimension,
            ServiceNamespace = ecsTarget.ServiceNamespace,
            StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
            {
                AdjustmentType = "ChangeInCapacity",
                Cooldown = 60,
                MetricAggregationType = "Maximum",
                StepAdjustments = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalUpperBound = "0",
                        ScalingAdjustment = -1,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Target;
    import com.pulumi.aws.appautoscaling.TargetArgs;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsTarget = new Target("ecsTarget", TargetArgs.builder()
                .maxCapacity(4)
                .minCapacity(1)
                .resourceId("service/clusterName/serviceName")
                .scalableDimension("ecs:service:DesiredCount")
                .serviceNamespace("ecs")
                .build());
    
            var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder()
                .name("scale-down")
                .policyType("StepScaling")
                .resourceId(ecsTarget.resourceId())
                .scalableDimension(ecsTarget.scalableDimension())
                .serviceNamespace(ecsTarget.serviceNamespace())
                .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
                    .adjustmentType("ChangeInCapacity")
                    .cooldown(60)
                    .metricAggregationType("Maximum")
                    .stepAdjustments(PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                        .metricIntervalUpperBound("0")
                        .scalingAdjustment(-1)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsTarget:
        type: aws:appautoscaling:Target
        name: ecs_target
        properties:
          maxCapacity: 4
          minCapacity: 1
          resourceId: service/clusterName/serviceName
          scalableDimension: ecs:service:DesiredCount
          serviceNamespace: ecs
      ecsPolicy:
        type: aws:appautoscaling:Policy
        name: ecs_policy
        properties:
          name: scale-down
          policyType: StepScaling
          resourceId: ${ecsTarget.resourceId}
          scalableDimension: ${ecsTarget.scalableDimension}
          serviceNamespace: ${ecsTarget.serviceNamespace}
          stepScalingPolicyConfiguration:
            adjustmentType: ChangeInCapacity
            cooldown: 60
            metricAggregationType: Maximum
            stepAdjustments:
              - metricIntervalUpperBound: 0
                scalingAdjustment: -1
    

    Preserve desired count when updating an autoscaled ECS Service

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const ecsService = new aws.ecs.Service("ecs_service", {
        name: "serviceName",
        cluster: "clusterName",
        taskDefinition: "taskDefinitionFamily:1",
        desiredCount: 2,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    ecs_service = aws.ecs.Service("ecs_service",
        name="serviceName",
        cluster="clusterName",
        task_definition="taskDefinitionFamily:1",
        desired_count=2)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewService(ctx, "ecs_service", &ecs.ServiceArgs{
    			Name:           pulumi.String("serviceName"),
    			Cluster:        pulumi.String("clusterName"),
    			TaskDefinition: pulumi.String("taskDefinitionFamily:1"),
    			DesiredCount:   pulumi.Int(2),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsService = new Aws.Ecs.Service("ecs_service", new()
        {
            Name = "serviceName",
            Cluster = "clusterName",
            TaskDefinition = "taskDefinitionFamily:1",
            DesiredCount = 2,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecs.Service;
    import com.pulumi.aws.ecs.ServiceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsService = new Service("ecsService", ServiceArgs.builder()
                .name("serviceName")
                .cluster("clusterName")
                .taskDefinition("taskDefinitionFamily:1")
                .desiredCount(2)
                .build());
    
        }
    }
    
    resources:
      ecsService:
        type: aws:ecs:Service
        name: ecs_service
        properties:
          name: serviceName
          cluster: clusterName
          taskDefinition: taskDefinitionFamily:1
          desiredCount: 2
    

    Aurora Read Replica Autoscaling

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const replicas = new aws.appautoscaling.Target("replicas", {
        serviceNamespace: "rds",
        scalableDimension: "rds:cluster:ReadReplicaCount",
        resourceId: `cluster:${example.id}`,
        minCapacity: 1,
        maxCapacity: 15,
    });
    const replicasPolicy = new aws.appautoscaling.Policy("replicas", {
        name: "cpu-auto-scaling",
        serviceNamespace: replicas.serviceNamespace,
        scalableDimension: replicas.scalableDimension,
        resourceId: replicas.resourceId,
        policyType: "TargetTrackingScaling",
        targetTrackingScalingPolicyConfiguration: {
            predefinedMetricSpecification: {
                predefinedMetricType: "RDSReaderAverageCPUUtilization",
            },
            targetValue: 75,
            scaleInCooldown: 300,
            scaleOutCooldown: 300,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    replicas = aws.appautoscaling.Target("replicas",
        service_namespace="rds",
        scalable_dimension="rds:cluster:ReadReplicaCount",
        resource_id=f"cluster:{example['id']}",
        min_capacity=1,
        max_capacity=15)
    replicas_policy = aws.appautoscaling.Policy("replicas",
        name="cpu-auto-scaling",
        service_namespace=replicas.service_namespace,
        scalable_dimension=replicas.scalable_dimension,
        resource_id=replicas.resource_id,
        policy_type="TargetTrackingScaling",
        target_tracking_scaling_policy_configuration={
            "predefined_metric_specification": {
                "predefined_metric_type": "RDSReaderAverageCPUUtilization",
            },
            "target_value": 75,
            "scale_in_cooldown": 300,
            "scale_out_cooldown": 300,
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		replicas, err := appautoscaling.NewTarget(ctx, "replicas", &appautoscaling.TargetArgs{
    			ServiceNamespace:  pulumi.String("rds"),
    			ScalableDimension: pulumi.String("rds:cluster:ReadReplicaCount"),
    			ResourceId:        pulumi.Sprintf("cluster:%v", example.Id),
    			MinCapacity:       pulumi.Int(1),
    			MaxCapacity:       pulumi.Int(15),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appautoscaling.NewPolicy(ctx, "replicas", &appautoscaling.PolicyArgs{
    			Name:              pulumi.String("cpu-auto-scaling"),
    			ServiceNamespace:  replicas.ServiceNamespace,
    			ScalableDimension: replicas.ScalableDimension,
    			ResourceId:        replicas.ResourceId,
    			PolicyType:        pulumi.String("TargetTrackingScaling"),
    			TargetTrackingScalingPolicyConfiguration: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{
    				PredefinedMetricSpecification: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{
    					PredefinedMetricType: pulumi.String("RDSReaderAverageCPUUtilization"),
    				},
    				TargetValue:      pulumi.Float64(75),
    				ScaleInCooldown:  pulumi.Int(300),
    				ScaleOutCooldown: pulumi.Int(300),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var replicas = new Aws.AppAutoScaling.Target("replicas", new()
        {
            ServiceNamespace = "rds",
            ScalableDimension = "rds:cluster:ReadReplicaCount",
            ResourceId = $"cluster:{example.Id}",
            MinCapacity = 1,
            MaxCapacity = 15,
        });
    
        var replicasPolicy = new Aws.AppAutoScaling.Policy("replicas", new()
        {
            Name = "cpu-auto-scaling",
            ServiceNamespace = replicas.ServiceNamespace,
            ScalableDimension = replicas.ScalableDimension,
            ResourceId = replicas.ResourceId,
            PolicyType = "TargetTrackingScaling",
            TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs
            {
                PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs
                {
                    PredefinedMetricType = "RDSReaderAverageCPUUtilization",
                },
                TargetValue = 75,
                ScaleInCooldown = 300,
                ScaleOutCooldown = 300,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Target;
    import com.pulumi.aws.appautoscaling.TargetArgs;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var replicas = new Target("replicas", TargetArgs.builder()
                .serviceNamespace("rds")
                .scalableDimension("rds:cluster:ReadReplicaCount")
                .resourceId(String.format("cluster:%s", example.id()))
                .minCapacity(1)
                .maxCapacity(15)
                .build());
    
            var replicasPolicy = new Policy("replicasPolicy", PolicyArgs.builder()
                .name("cpu-auto-scaling")
                .serviceNamespace(replicas.serviceNamespace())
                .scalableDimension(replicas.scalableDimension())
                .resourceId(replicas.resourceId())
                .policyType("TargetTrackingScaling")
                .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()
                    .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()
                        .predefinedMetricType("RDSReaderAverageCPUUtilization")
                        .build())
                    .targetValue(75.0)
                    .scaleInCooldown(300)
                    .scaleOutCooldown(300)
                    .build())
                .build());
    
        }
    }
    
    resources:
      replicas:
        type: aws:appautoscaling:Target
        properties:
          serviceNamespace: rds
          scalableDimension: rds:cluster:ReadReplicaCount
          resourceId: cluster:${example.id}
          minCapacity: 1
          maxCapacity: 15
      replicasPolicy:
        type: aws:appautoscaling:Policy
        name: replicas
        properties:
          name: cpu-auto-scaling
          serviceNamespace: ${replicas.serviceNamespace}
          scalableDimension: ${replicas.scalableDimension}
          resourceId: ${replicas.resourceId}
          policyType: TargetTrackingScaling
          targetTrackingScalingPolicyConfiguration:
            predefinedMetricSpecification:
              predefinedMetricType: RDSReaderAverageCPUUtilization
            targetValue: 75
            scaleInCooldown: 300
            scaleOutCooldown: 300
    

    Create target tracking scaling policy using metric math

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const ecsTarget = new aws.appautoscaling.Target("ecs_target", {
        maxCapacity: 4,
        minCapacity: 1,
        resourceId: "service/clusterName/serviceName",
        scalableDimension: "ecs:service:DesiredCount",
        serviceNamespace: "ecs",
    });
    const example = new aws.appautoscaling.Policy("example", {
        name: "foo",
        policyType: "TargetTrackingScaling",
        resourceId: ecsTarget.resourceId,
        scalableDimension: ecsTarget.scalableDimension,
        serviceNamespace: ecsTarget.serviceNamespace,
        targetTrackingScalingPolicyConfiguration: {
            targetValue: 100,
            customizedMetricSpecification: {
                metrics: [
                    {
                        label: "Get the queue size (the number of messages waiting to be processed)",
                        id: "m1",
                        metricStat: {
                            metric: {
                                metricName: "ApproximateNumberOfMessagesVisible",
                                namespace: "AWS/SQS",
                                dimensions: [{
                                    name: "QueueName",
                                    value: "my-queue",
                                }],
                            },
                            stat: "Sum",
                        },
                        returnData: false,
                    },
                    {
                        label: "Get the ECS running task count (the number of currently running tasks)",
                        id: "m2",
                        metricStat: {
                            metric: {
                                metricName: "RunningTaskCount",
                                namespace: "ECS/ContainerInsights",
                                dimensions: [
                                    {
                                        name: "ClusterName",
                                        value: "default",
                                    },
                                    {
                                        name: "ServiceName",
                                        value: "web-app",
                                    },
                                ],
                            },
                            stat: "Average",
                        },
                        returnData: false,
                    },
                    {
                        label: "Calculate the backlog per instance",
                        id: "e1",
                        expression: "m1 / m2",
                        returnData: true,
                    },
                ],
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    ecs_target = aws.appautoscaling.Target("ecs_target",
        max_capacity=4,
        min_capacity=1,
        resource_id="service/clusterName/serviceName",
        scalable_dimension="ecs:service:DesiredCount",
        service_namespace="ecs")
    example = aws.appautoscaling.Policy("example",
        name="foo",
        policy_type="TargetTrackingScaling",
        resource_id=ecs_target.resource_id,
        scalable_dimension=ecs_target.scalable_dimension,
        service_namespace=ecs_target.service_namespace,
        target_tracking_scaling_policy_configuration={
            "target_value": 100,
            "customized_metric_specification": {
                "metrics": [
                    {
                        "label": "Get the queue size (the number of messages waiting to be processed)",
                        "id": "m1",
                        "metric_stat": {
                            "metric": {
                                "metric_name": "ApproximateNumberOfMessagesVisible",
                                "namespace": "AWS/SQS",
                                "dimensions": [{
                                    "name": "QueueName",
                                    "value": "my-queue",
                                }],
                            },
                            "stat": "Sum",
                        },
                        "return_data": False,
                    },
                    {
                        "label": "Get the ECS running task count (the number of currently running tasks)",
                        "id": "m2",
                        "metric_stat": {
                            "metric": {
                                "metric_name": "RunningTaskCount",
                                "namespace": "ECS/ContainerInsights",
                                "dimensions": [
                                    {
                                        "name": "ClusterName",
                                        "value": "default",
                                    },
                                    {
                                        "name": "ServiceName",
                                        "value": "web-app",
                                    },
                                ],
                            },
                            "stat": "Average",
                        },
                        "return_data": False,
                    },
                    {
                        "label": "Calculate the backlog per instance",
                        "id": "e1",
                        "expression": "m1 / m2",
                        "return_data": True,
                    },
                ],
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ecsTarget, err := appautoscaling.NewTarget(ctx, "ecs_target", &appautoscaling.TargetArgs{
    			MaxCapacity:       pulumi.Int(4),
    			MinCapacity:       pulumi.Int(1),
    			ResourceId:        pulumi.String("service/clusterName/serviceName"),
    			ScalableDimension: pulumi.String("ecs:service:DesiredCount"),
    			ServiceNamespace:  pulumi.String("ecs"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appautoscaling.NewPolicy(ctx, "example", &appautoscaling.PolicyArgs{
    			Name:              pulumi.String("foo"),
    			PolicyType:        pulumi.String("TargetTrackingScaling"),
    			ResourceId:        ecsTarget.ResourceId,
    			ScalableDimension: ecsTarget.ScalableDimension,
    			ServiceNamespace:  ecsTarget.ServiceNamespace,
    			TargetTrackingScalingPolicyConfiguration: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{
    				TargetValue: pulumi.Float64(100),
    				CustomizedMetricSpecification: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs{
    					Metrics: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArray{
    						&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{
    							Label: pulumi.String("Get the queue size (the number of messages waiting to be processed)"),
    							Id:    pulumi.String("m1"),
    							MetricStat: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
    								Metric: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
    									MetricName: pulumi.String("ApproximateNumberOfMessagesVisible"),
    									Namespace:  pulumi.String("AWS/SQS"),
    									Dimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
    										&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
    											Name:  pulumi.String("QueueName"),
    											Value: pulumi.String("my-queue"),
    										},
    									},
    								},
    								Stat: pulumi.String("Sum"),
    							},
    							ReturnData: pulumi.Bool(false),
    						},
    						&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{
    							Label: pulumi.String("Get the ECS running task count (the number of currently running tasks)"),
    							Id:    pulumi.String("m2"),
    							MetricStat: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
    								Metric: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
    									MetricName: pulumi.String("RunningTaskCount"),
    									Namespace:  pulumi.String("ECS/ContainerInsights"),
    									Dimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
    										&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
    											Name:  pulumi.String("ClusterName"),
    											Value: pulumi.String("default"),
    										},
    										&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
    											Name:  pulumi.String("ServiceName"),
    											Value: pulumi.String("web-app"),
    										},
    									},
    								},
    								Stat: pulumi.String("Average"),
    							},
    							ReturnData: pulumi.Bool(false),
    						},
    						&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{
    							Label:      pulumi.String("Calculate the backlog per instance"),
    							Id:         pulumi.String("e1"),
    							Expression: pulumi.String("m1 / m2"),
    							ReturnData: pulumi.Bool(true),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsTarget = new Aws.AppAutoScaling.Target("ecs_target", new()
        {
            MaxCapacity = 4,
            MinCapacity = 1,
            ResourceId = "service/clusterName/serviceName",
            ScalableDimension = "ecs:service:DesiredCount",
            ServiceNamespace = "ecs",
        });
    
        var example = new Aws.AppAutoScaling.Policy("example", new()
        {
            Name = "foo",
            PolicyType = "TargetTrackingScaling",
            ResourceId = ecsTarget.ResourceId,
            ScalableDimension = ecsTarget.ScalableDimension,
            ServiceNamespace = ecsTarget.ServiceNamespace,
            TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs
            {
                TargetValue = 100,
                CustomizedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs
                {
                    Metrics = new[]
                    {
                        new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs
                        {
                            Label = "Get the queue size (the number of messages waiting to be processed)",
                            Id = "m1",
                            MetricStat = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
                            {
                                Metric = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
                                {
                                    MetricName = "ApproximateNumberOfMessagesVisible",
                                    Namespace = "AWS/SQS",
                                    Dimensions = new[]
                                    {
                                        new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
                                        {
                                            Name = "QueueName",
                                            Value = "my-queue",
                                        },
                                    },
                                },
                                Stat = "Sum",
                            },
                            ReturnData = false,
                        },
                        new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs
                        {
                            Label = "Get the ECS running task count (the number of currently running tasks)",
                            Id = "m2",
                            MetricStat = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
                            {
                                Metric = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
                                {
                                    MetricName = "RunningTaskCount",
                                    Namespace = "ECS/ContainerInsights",
                                    Dimensions = new[]
                                    {
                                        new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
                                        {
                                            Name = "ClusterName",
                                            Value = "default",
                                        },
                                        new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
                                        {
                                            Name = "ServiceName",
                                            Value = "web-app",
                                        },
                                    },
                                },
                                Stat = "Average",
                            },
                            ReturnData = false,
                        },
                        new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs
                        {
                            Label = "Calculate the backlog per instance",
                            Id = "e1",
                            Expression = "m1 / m2",
                            ReturnData = true,
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Target;
    import com.pulumi.aws.appautoscaling.TargetArgs;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsTarget = new Target("ecsTarget", TargetArgs.builder()
                .maxCapacity(4)
                .minCapacity(1)
                .resourceId("service/clusterName/serviceName")
                .scalableDimension("ecs:service:DesiredCount")
                .serviceNamespace("ecs")
                .build());
    
            var example = new Policy("example", PolicyArgs.builder()
                .name("foo")
                .policyType("TargetTrackingScaling")
                .resourceId(ecsTarget.resourceId())
                .scalableDimension(ecsTarget.scalableDimension())
                .serviceNamespace(ecsTarget.serviceNamespace())
                .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()
                    .targetValue(100.0)
                    .customizedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs.builder()
                        .metrics(                    
                            PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()
                                .label("Get the queue size (the number of messages waiting to be processed)")
                                .id("m1")
                                .metricStat(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
                                    .metric(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
                                        .metricName("ApproximateNumberOfMessagesVisible")
                                        .namespace("AWS/SQS")
                                        .dimensions(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
                                            .name("QueueName")
                                            .value("my-queue")
                                            .build())
                                        .build())
                                    .stat("Sum")
                                    .build())
                                .returnData(false)
                                .build(),
                            PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()
                                .label("Get the ECS running task count (the number of currently running tasks)")
                                .id("m2")
                                .metricStat(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
                                    .metric(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
                                        .metricName("RunningTaskCount")
                                        .namespace("ECS/ContainerInsights")
                                        .dimensions(                                    
                                            PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
                                                .name("ClusterName")
                                                .value("default")
                                                .build(),
                                            PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
                                                .name("ServiceName")
                                                .value("web-app")
                                                .build())
                                        .build())
                                    .stat("Average")
                                    .build())
                                .returnData(false)
                                .build(),
                            PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()
                                .label("Calculate the backlog per instance")
                                .id("e1")
                                .expression("m1 / m2")
                                .returnData(true)
                                .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsTarget:
        type: aws:appautoscaling:Target
        name: ecs_target
        properties:
          maxCapacity: 4
          minCapacity: 1
          resourceId: service/clusterName/serviceName
          scalableDimension: ecs:service:DesiredCount
          serviceNamespace: ecs
      example:
        type: aws:appautoscaling:Policy
        properties:
          name: foo
          policyType: TargetTrackingScaling
          resourceId: ${ecsTarget.resourceId}
          scalableDimension: ${ecsTarget.scalableDimension}
          serviceNamespace: ${ecsTarget.serviceNamespace}
          targetTrackingScalingPolicyConfiguration:
            targetValue: 100
            customizedMetricSpecification:
              metrics:
                - label: Get the queue size (the number of messages waiting to be processed)
                  id: m1
                  metricStat:
                    metric:
                      metricName: ApproximateNumberOfMessagesVisible
                      namespace: AWS/SQS
                      dimensions:
                        - name: QueueName
                          value: my-queue
                    stat: Sum
                  returnData: false
                - label: Get the ECS running task count (the number of currently running tasks)
                  id: m2
                  metricStat:
                    metric:
                      metricName: RunningTaskCount
                      namespace: ECS/ContainerInsights
                      dimensions:
                        - name: ClusterName
                          value: default
                        - name: ServiceName
                          value: web-app
                    stat: Average
                  returnData: false
                - label: Calculate the backlog per instance
                  id: e1
                  expression: m1 / m2
                  returnData: true
    

    Predictive Scaling

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.appautoscaling.Policy("example", {
        name: "example-policy",
        resourceId: exampleAwsAppautoscalingTarget.resourceId,
        scalableDimension: exampleAwsAppautoscalingTarget.scalableDimension,
        serviceNamespace: exampleAwsAppautoscalingTarget.serviceNamespace,
        policyType: "PredictiveScaling",
        predictiveScalingPolicyConfiguration: {
            metricSpecifications: [{
                targetValue: "40",
                predefinedMetricPairSpecification: {
                    predefinedMetricType: "ECSServiceMemoryUtilization",
                },
            }],
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.appautoscaling.Policy("example",
        name="example-policy",
        resource_id=example_aws_appautoscaling_target["resourceId"],
        scalable_dimension=example_aws_appautoscaling_target["scalableDimension"],
        service_namespace=example_aws_appautoscaling_target["serviceNamespace"],
        policy_type="PredictiveScaling",
        predictive_scaling_policy_configuration={
            "metric_specifications": [{
                "target_value": "40",
                "predefined_metric_pair_specification": {
                    "predefined_metric_type": "ECSServiceMemoryUtilization",
                },
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appautoscaling.NewPolicy(ctx, "example", &appautoscaling.PolicyArgs{
    			Name:              pulumi.String("example-policy"),
    			ResourceId:        pulumi.Any(exampleAwsAppautoscalingTarget.ResourceId),
    			ScalableDimension: pulumi.Any(exampleAwsAppautoscalingTarget.ScalableDimension),
    			ServiceNamespace:  pulumi.Any(exampleAwsAppautoscalingTarget.ServiceNamespace),
    			PolicyType:        pulumi.String("PredictiveScaling"),
    			PredictiveScalingPolicyConfiguration: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationArgs{
    				MetricSpecifications: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArray{
    					&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArgs{
    						TargetValue: pulumi.String("40"),
    						PredefinedMetricPairSpecification: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs{
    							PredefinedMetricType: pulumi.String("ECSServiceMemoryUtilization"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.AppAutoScaling.Policy("example", new()
        {
            Name = "example-policy",
            ResourceId = exampleAwsAppautoscalingTarget.ResourceId,
            ScalableDimension = exampleAwsAppautoscalingTarget.ScalableDimension,
            ServiceNamespace = exampleAwsAppautoscalingTarget.ServiceNamespace,
            PolicyType = "PredictiveScaling",
            PredictiveScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationArgs
            {
                MetricSpecifications = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArgs
                    {
                        TargetValue = "40",
                        PredefinedMetricPairSpecification = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs
                        {
                            PredefinedMetricType = "ECSServiceMemoryUtilization",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyPredictiveScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Policy("example", PolicyArgs.builder()
                .name("example-policy")
                .resourceId(exampleAwsAppautoscalingTarget.resourceId())
                .scalableDimension(exampleAwsAppautoscalingTarget.scalableDimension())
                .serviceNamespace(exampleAwsAppautoscalingTarget.serviceNamespace())
                .policyType("PredictiveScaling")
                .predictiveScalingPolicyConfiguration(PolicyPredictiveScalingPolicyConfigurationArgs.builder()
                    .metricSpecifications(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArgs.builder()
                        .targetValue("40")
                        .predefinedMetricPairSpecification(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs.builder()
                            .predefinedMetricType("ECSServiceMemoryUtilization")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:appautoscaling:Policy
        properties:
          name: example-policy
          resourceId: ${exampleAwsAppautoscalingTarget.resourceId}
          scalableDimension: ${exampleAwsAppautoscalingTarget.scalableDimension}
          serviceNamespace: ${exampleAwsAppautoscalingTarget.serviceNamespace}
          policyType: PredictiveScaling
          predictiveScalingPolicyConfiguration:
            metricSpecifications:
              - targetValue: 40
                predefinedMetricPairSpecification:
                  predefinedMetricType: ECSServiceMemoryUtilization
    

    MSK / Kafka Autoscaling

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const mskTarget = new aws.appautoscaling.Target("msk_target", {
        serviceNamespace: "kafka",
        scalableDimension: "kafka:broker-storage:VolumeSize",
        resourceId: example.arn,
        minCapacity: 1,
        maxCapacity: 8,
    });
    const targets = new aws.appautoscaling.Policy("targets", {
        name: "storage-size-auto-scaling",
        serviceNamespace: mskTarget.serviceNamespace,
        scalableDimension: mskTarget.scalableDimension,
        resourceId: mskTarget.resourceId,
        policyType: "TargetTrackingScaling",
        targetTrackingScalingPolicyConfiguration: {
            predefinedMetricSpecification: {
                predefinedMetricType: "KafkaBrokerStorageUtilization",
            },
            targetValue: 55,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    msk_target = aws.appautoscaling.Target("msk_target",
        service_namespace="kafka",
        scalable_dimension="kafka:broker-storage:VolumeSize",
        resource_id=example["arn"],
        min_capacity=1,
        max_capacity=8)
    targets = aws.appautoscaling.Policy("targets",
        name="storage-size-auto-scaling",
        service_namespace=msk_target.service_namespace,
        scalable_dimension=msk_target.scalable_dimension,
        resource_id=msk_target.resource_id,
        policy_type="TargetTrackingScaling",
        target_tracking_scaling_policy_configuration={
            "predefined_metric_specification": {
                "predefined_metric_type": "KafkaBrokerStorageUtilization",
            },
            "target_value": 55,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		mskTarget, err := appautoscaling.NewTarget(ctx, "msk_target", &appautoscaling.TargetArgs{
    			ServiceNamespace:  pulumi.String("kafka"),
    			ScalableDimension: pulumi.String("kafka:broker-storage:VolumeSize"),
    			ResourceId:        pulumi.Any(example.Arn),
    			MinCapacity:       pulumi.Int(1),
    			MaxCapacity:       pulumi.Int(8),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appautoscaling.NewPolicy(ctx, "targets", &appautoscaling.PolicyArgs{
    			Name:              pulumi.String("storage-size-auto-scaling"),
    			ServiceNamespace:  mskTarget.ServiceNamespace,
    			ScalableDimension: mskTarget.ScalableDimension,
    			ResourceId:        mskTarget.ResourceId,
    			PolicyType:        pulumi.String("TargetTrackingScaling"),
    			TargetTrackingScalingPolicyConfiguration: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{
    				PredefinedMetricSpecification: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{
    					PredefinedMetricType: pulumi.String("KafkaBrokerStorageUtilization"),
    				},
    				TargetValue: pulumi.Float64(55),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var mskTarget = new Aws.AppAutoScaling.Target("msk_target", new()
        {
            ServiceNamespace = "kafka",
            ScalableDimension = "kafka:broker-storage:VolumeSize",
            ResourceId = example.Arn,
            MinCapacity = 1,
            MaxCapacity = 8,
        });
    
        var targets = new Aws.AppAutoScaling.Policy("targets", new()
        {
            Name = "storage-size-auto-scaling",
            ServiceNamespace = mskTarget.ServiceNamespace,
            ScalableDimension = mskTarget.ScalableDimension,
            ResourceId = mskTarget.ResourceId,
            PolicyType = "TargetTrackingScaling",
            TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs
            {
                PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs
                {
                    PredefinedMetricType = "KafkaBrokerStorageUtilization",
                },
                TargetValue = 55,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Target;
    import com.pulumi.aws.appautoscaling.TargetArgs;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var mskTarget = new Target("mskTarget", TargetArgs.builder()
                .serviceNamespace("kafka")
                .scalableDimension("kafka:broker-storage:VolumeSize")
                .resourceId(example.arn())
                .minCapacity(1)
                .maxCapacity(8)
                .build());
    
            var targets = new Policy("targets", PolicyArgs.builder()
                .name("storage-size-auto-scaling")
                .serviceNamespace(mskTarget.serviceNamespace())
                .scalableDimension(mskTarget.scalableDimension())
                .resourceId(mskTarget.resourceId())
                .policyType("TargetTrackingScaling")
                .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()
                    .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()
                        .predefinedMetricType("KafkaBrokerStorageUtilization")
                        .build())
                    .targetValue(55.0)
                    .build())
                .build());
    
        }
    }
    
    resources:
      mskTarget:
        type: aws:appautoscaling:Target
        name: msk_target
        properties:
          serviceNamespace: kafka
          scalableDimension: kafka:broker-storage:VolumeSize
          resourceId: ${example.arn}
          minCapacity: 1
          maxCapacity: 8
      targets:
        type: aws:appautoscaling:Policy
        properties:
          name: storage-size-auto-scaling
          serviceNamespace: ${mskTarget.serviceNamespace}
          scalableDimension: ${mskTarget.scalableDimension}
          resourceId: ${mskTarget.resourceId}
          policyType: TargetTrackingScaling
          targetTrackingScalingPolicyConfiguration:
            predefinedMetricSpecification:
              predefinedMetricType: KafkaBrokerStorageUtilization
            targetValue: 55
    

    Create Policy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Policy(resource_name: str,
               args: PolicyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Policy(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               resource_id: Optional[str] = None,
               scalable_dimension: Optional[str] = None,
               service_namespace: Optional[str] = None,
               name: Optional[str] = None,
               policy_type: Optional[str] = None,
               predictive_scaling_policy_configuration: Optional[PolicyPredictiveScalingPolicyConfigurationArgs] = None,
               region: Optional[str] = None,
               step_scaling_policy_configuration: Optional[PolicyStepScalingPolicyConfigurationArgs] = None,
               target_tracking_scaling_policy_configuration: Optional[PolicyTargetTrackingScalingPolicyConfigurationArgs] = None)
    func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
    public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
    public Policy(String name, PolicyArgs args)
    public Policy(String name, PolicyArgs args, CustomResourceOptions options)
    
    type: aws:appautoscaling:Policy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    name String
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsPolicyResource = new Aws.AppAutoScaling.Policy("awsPolicyResource", new()
    {
        ResourceId = "string",
        ScalableDimension = "string",
        ServiceNamespace = "string",
        Name = "string",
        PolicyType = "string",
        PredictiveScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationArgs
        {
            MetricSpecifications = new[]
            {
                new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArgs
                {
                    TargetValue = "string",
                    CustomizedCapacityMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs
                    {
                        MetricDataQueries = new[]
                        {
                            new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs
                            {
                                Id = "string",
                                Expression = "string",
                                Label = "string",
                                MetricStat = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs
                                {
                                    Metric = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs
                                    {
                                        Dimensions = new[]
                                        {
                                            new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
                                            {
                                                Name = "string",
                                                Value = "string",
                                            },
                                        },
                                        MetricName = "string",
                                        Namespace = "string",
                                    },
                                    Stat = "string",
                                    Unit = "string",
                                },
                                ReturnData = false,
                            },
                        },
                    },
                    CustomizedLoadMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs
                    {
                        MetricDataQueries = new[]
                        {
                            new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs
                            {
                                Id = "string",
                                Expression = "string",
                                Label = "string",
                                MetricStat = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs
                                {
                                    Metric = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs
                                    {
                                        Dimensions = new[]
                                        {
                                            new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
                                            {
                                                Name = "string",
                                                Value = "string",
                                            },
                                        },
                                        MetricName = "string",
                                        Namespace = "string",
                                    },
                                    Stat = "string",
                                    Unit = "string",
                                },
                                ReturnData = false,
                            },
                        },
                    },
                    CustomizedScalingMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs
                    {
                        MetricDataQueries = new[]
                        {
                            new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
                            {
                                Id = "string",
                                Expression = "string",
                                Label = "string",
                                MetricStat = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs
                                {
                                    Metric = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs
                                    {
                                        Dimensions = new[]
                                        {
                                            new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
                                            {
                                                Name = "string",
                                                Value = "string",
                                            },
                                        },
                                        MetricName = "string",
                                        Namespace = "string",
                                    },
                                    Stat = "string",
                                    Unit = "string",
                                },
                                ReturnData = false,
                            },
                        },
                    },
                    PredefinedLoadMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs
                    {
                        PredefinedMetricType = "string",
                        ResourceLabel = "string",
                    },
                    PredefinedMetricPairSpecification = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs
                    {
                        PredefinedMetricType = "string",
                        ResourceLabel = "string",
                    },
                    PredefinedScalingMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs
                    {
                        PredefinedMetricType = "string",
                        ResourceLabel = "string",
                    },
                },
            },
            MaxCapacityBreachBehavior = "string",
            MaxCapacityBuffer = 0,
            Mode = "string",
            SchedulingBufferTime = 0,
        },
        Region = "string",
        StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
        {
            AdjustmentType = "string",
            Cooldown = 0,
            MetricAggregationType = "string",
            MinAdjustmentMagnitude = 0,
            StepAdjustments = new[]
            {
                new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                {
                    ScalingAdjustment = 0,
                    MetricIntervalLowerBound = "string",
                    MetricIntervalUpperBound = "string",
                },
            },
        },
        TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs
        {
            TargetValue = 0,
            CustomizedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs
            {
                Dimensions = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionArgs
                    {
                        Name = "string",
                        Value = "string",
                    },
                },
                MetricName = "string",
                Metrics = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs
                    {
                        Id = "string",
                        Expression = "string",
                        Label = "string",
                        MetricStat = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
                        {
                            Metric = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
                            {
                                MetricName = "string",
                                Namespace = "string",
                                Dimensions = new[]
                                {
                                    new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
                                    {
                                        Name = "string",
                                        Value = "string",
                                    },
                                },
                            },
                            Stat = "string",
                            Unit = "string",
                        },
                        ReturnData = false,
                    },
                },
                Namespace = "string",
                Statistic = "string",
                Unit = "string",
            },
            DisableScaleIn = false,
            PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs
            {
                PredefinedMetricType = "string",
                ResourceLabel = "string",
            },
            ScaleInCooldown = 0,
            ScaleOutCooldown = 0,
        },
    });
    
    example, err := appautoscaling.NewPolicy(ctx, "awsPolicyResource", &appautoscaling.PolicyArgs{
    	ResourceId:        pulumi.String("string"),
    	ScalableDimension: pulumi.String("string"),
    	ServiceNamespace:  pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	PolicyType:        pulumi.String("string"),
    	PredictiveScalingPolicyConfiguration: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationArgs{
    		MetricSpecifications: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArray{
    			&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArgs{
    				TargetValue: pulumi.String("string"),
    				CustomizedCapacityMetricSpecification: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs{
    					MetricDataQueries: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArray{
    						&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs{
    							Id:         pulumi.String("string"),
    							Expression: pulumi.String("string"),
    							Label:      pulumi.String("string"),
    							MetricStat: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs{
    								Metric: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs{
    									Dimensions: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
    										&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
    											Name:  pulumi.String("string"),
    											Value: pulumi.String("string"),
    										},
    									},
    									MetricName: pulumi.String("string"),
    									Namespace:  pulumi.String("string"),
    								},
    								Stat: pulumi.String("string"),
    								Unit: pulumi.String("string"),
    							},
    							ReturnData: pulumi.Bool(false),
    						},
    					},
    				},
    				CustomizedLoadMetricSpecification: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs{
    					MetricDataQueries: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArray{
    						&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs{
    							Id:         pulumi.String("string"),
    							Expression: pulumi.String("string"),
    							Label:      pulumi.String("string"),
    							MetricStat: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs{
    								Metric: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs{
    									Dimensions: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
    										&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
    											Name:  pulumi.String("string"),
    											Value: pulumi.String("string"),
    										},
    									},
    									MetricName: pulumi.String("string"),
    									Namespace:  pulumi.String("string"),
    								},
    								Stat: pulumi.String("string"),
    								Unit: pulumi.String("string"),
    							},
    							ReturnData: pulumi.Bool(false),
    						},
    					},
    				},
    				CustomizedScalingMetricSpecification: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs{
    					MetricDataQueries: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArray{
    						&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
    							Id:         pulumi.String("string"),
    							Expression: pulumi.String("string"),
    							Label:      pulumi.String("string"),
    							MetricStat: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs{
    								Metric: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs{
    									Dimensions: appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
    										&appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
    											Name:  pulumi.String("string"),
    											Value: pulumi.String("string"),
    										},
    									},
    									MetricName: pulumi.String("string"),
    									Namespace:  pulumi.String("string"),
    								},
    								Stat: pulumi.String("string"),
    								Unit: pulumi.String("string"),
    							},
    							ReturnData: pulumi.Bool(false),
    						},
    					},
    				},
    				PredefinedLoadMetricSpecification: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs{
    					PredefinedMetricType: pulumi.String("string"),
    					ResourceLabel:        pulumi.String("string"),
    				},
    				PredefinedMetricPairSpecification: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs{
    					PredefinedMetricType: pulumi.String("string"),
    					ResourceLabel:        pulumi.String("string"),
    				},
    				PredefinedScalingMetricSpecification: &appautoscaling.PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs{
    					PredefinedMetricType: pulumi.String("string"),
    					ResourceLabel:        pulumi.String("string"),
    				},
    			},
    		},
    		MaxCapacityBreachBehavior: pulumi.String("string"),
    		MaxCapacityBuffer:         pulumi.Int(0),
    		Mode:                      pulumi.String("string"),
    		SchedulingBufferTime:      pulumi.Int(0),
    	},
    	Region: pulumi.String("string"),
    	StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    		AdjustmentType:         pulumi.String("string"),
    		Cooldown:               pulumi.Int(0),
    		MetricAggregationType:  pulumi.String("string"),
    		MinAdjustmentMagnitude: pulumi.Int(0),
    		StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    			&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    				ScalingAdjustment:        pulumi.Int(0),
    				MetricIntervalLowerBound: pulumi.String("string"),
    				MetricIntervalUpperBound: pulumi.String("string"),
    			},
    		},
    	},
    	TargetTrackingScalingPolicyConfiguration: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{
    		TargetValue: pulumi.Float64(0),
    		CustomizedMetricSpecification: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs{
    			Dimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionArray{
    				&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionArgs{
    					Name:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			MetricName: pulumi.String("string"),
    			Metrics: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArray{
    				&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{
    					Id:         pulumi.String("string"),
    					Expression: pulumi.String("string"),
    					Label:      pulumi.String("string"),
    					MetricStat: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
    						Metric: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
    							MetricName: pulumi.String("string"),
    							Namespace:  pulumi.String("string"),
    							Dimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
    								&appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
    									Name:  pulumi.String("string"),
    									Value: pulumi.String("string"),
    								},
    							},
    						},
    						Stat: pulumi.String("string"),
    						Unit: pulumi.String("string"),
    					},
    					ReturnData: pulumi.Bool(false),
    				},
    			},
    			Namespace: pulumi.String("string"),
    			Statistic: pulumi.String("string"),
    			Unit:      pulumi.String("string"),
    		},
    		DisableScaleIn: pulumi.Bool(false),
    		PredefinedMetricSpecification: &appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{
    			PredefinedMetricType: pulumi.String("string"),
    			ResourceLabel:        pulumi.String("string"),
    		},
    		ScaleInCooldown:  pulumi.Int(0),
    		ScaleOutCooldown: pulumi.Int(0),
    	},
    })
    
    var awsPolicyResource = new com.pulumi.aws.appautoscaling.Policy("awsPolicyResource", com.pulumi.aws.appautoscaling.PolicyArgs.builder()
        .resourceId("string")
        .scalableDimension("string")
        .serviceNamespace("string")
        .name("string")
        .policyType("string")
        .predictiveScalingPolicyConfiguration(PolicyPredictiveScalingPolicyConfigurationArgs.builder()
            .metricSpecifications(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArgs.builder()
                .targetValue("string")
                .customizedCapacityMetricSpecification(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs.builder()
                    .metricDataQueries(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs.builder()
                        .id("string")
                        .expression("string")
                        .label("string")
                        .metricStat(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs.builder()
                            .metric(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
                                .dimensions(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
                                    .name("string")
                                    .value("string")
                                    .build())
                                .metricName("string")
                                .namespace("string")
                                .build())
                            .stat("string")
                            .unit("string")
                            .build())
                        .returnData(false)
                        .build())
                    .build())
                .customizedLoadMetricSpecification(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs.builder()
                    .metricDataQueries(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs.builder()
                        .id("string")
                        .expression("string")
                        .label("string")
                        .metricStat(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs.builder()
                            .metric(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
                                .dimensions(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
                                    .name("string")
                                    .value("string")
                                    .build())
                                .metricName("string")
                                .namespace("string")
                                .build())
                            .stat("string")
                            .unit("string")
                            .build())
                        .returnData(false)
                        .build())
                    .build())
                .customizedScalingMetricSpecification(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs.builder()
                    .metricDataQueries(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
                        .id("string")
                        .expression("string")
                        .label("string")
                        .metricStat(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs.builder()
                            .metric(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
                                .dimensions(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
                                    .name("string")
                                    .value("string")
                                    .build())
                                .metricName("string")
                                .namespace("string")
                                .build())
                            .stat("string")
                            .unit("string")
                            .build())
                        .returnData(false)
                        .build())
                    .build())
                .predefinedLoadMetricSpecification(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs.builder()
                    .predefinedMetricType("string")
                    .resourceLabel("string")
                    .build())
                .predefinedMetricPairSpecification(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs.builder()
                    .predefinedMetricType("string")
                    .resourceLabel("string")
                    .build())
                .predefinedScalingMetricSpecification(PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs.builder()
                    .predefinedMetricType("string")
                    .resourceLabel("string")
                    .build())
                .build())
            .maxCapacityBreachBehavior("string")
            .maxCapacityBuffer(0)
            .mode("string")
            .schedulingBufferTime(0)
            .build())
        .region("string")
        .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
            .adjustmentType("string")
            .cooldown(0)
            .metricAggregationType("string")
            .minAdjustmentMagnitude(0)
            .stepAdjustments(PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                .scalingAdjustment(0)
                .metricIntervalLowerBound("string")
                .metricIntervalUpperBound("string")
                .build())
            .build())
        .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()
            .targetValue(0.0)
            .customizedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs.builder()
                .dimensions(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionArgs.builder()
                    .name("string")
                    .value("string")
                    .build())
                .metricName("string")
                .metrics(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()
                    .id("string")
                    .expression("string")
                    .label("string")
                    .metricStat(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
                        .metric(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
                            .metricName("string")
                            .namespace("string")
                            .dimensions(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
                                .name("string")
                                .value("string")
                                .build())
                            .build())
                        .stat("string")
                        .unit("string")
                        .build())
                    .returnData(false)
                    .build())
                .namespace("string")
                .statistic("string")
                .unit("string")
                .build())
            .disableScaleIn(false)
            .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()
                .predefinedMetricType("string")
                .resourceLabel("string")
                .build())
            .scaleInCooldown(0)
            .scaleOutCooldown(0)
            .build())
        .build());
    
    aws_policy_resource = aws.appautoscaling.Policy("awsPolicyResource",
        resource_id="string",
        scalable_dimension="string",
        service_namespace="string",
        name="string",
        policy_type="string",
        predictive_scaling_policy_configuration={
            "metric_specifications": [{
                "target_value": "string",
                "customized_capacity_metric_specification": {
                    "metric_data_queries": [{
                        "id": "string",
                        "expression": "string",
                        "label": "string",
                        "metric_stat": {
                            "metric": {
                                "dimensions": [{
                                    "name": "string",
                                    "value": "string",
                                }],
                                "metric_name": "string",
                                "namespace": "string",
                            },
                            "stat": "string",
                            "unit": "string",
                        },
                        "return_data": False,
                    }],
                },
                "customized_load_metric_specification": {
                    "metric_data_queries": [{
                        "id": "string",
                        "expression": "string",
                        "label": "string",
                        "metric_stat": {
                            "metric": {
                                "dimensions": [{
                                    "name": "string",
                                    "value": "string",
                                }],
                                "metric_name": "string",
                                "namespace": "string",
                            },
                            "stat": "string",
                            "unit": "string",
                        },
                        "return_data": False,
                    }],
                },
                "customized_scaling_metric_specification": {
                    "metric_data_queries": [{
                        "id": "string",
                        "expression": "string",
                        "label": "string",
                        "metric_stat": {
                            "metric": {
                                "dimensions": [{
                                    "name": "string",
                                    "value": "string",
                                }],
                                "metric_name": "string",
                                "namespace": "string",
                            },
                            "stat": "string",
                            "unit": "string",
                        },
                        "return_data": False,
                    }],
                },
                "predefined_load_metric_specification": {
                    "predefined_metric_type": "string",
                    "resource_label": "string",
                },
                "predefined_metric_pair_specification": {
                    "predefined_metric_type": "string",
                    "resource_label": "string",
                },
                "predefined_scaling_metric_specification": {
                    "predefined_metric_type": "string",
                    "resource_label": "string",
                },
            }],
            "max_capacity_breach_behavior": "string",
            "max_capacity_buffer": 0,
            "mode": "string",
            "scheduling_buffer_time": 0,
        },
        region="string",
        step_scaling_policy_configuration={
            "adjustment_type": "string",
            "cooldown": 0,
            "metric_aggregation_type": "string",
            "min_adjustment_magnitude": 0,
            "step_adjustments": [{
                "scaling_adjustment": 0,
                "metric_interval_lower_bound": "string",
                "metric_interval_upper_bound": "string",
            }],
        },
        target_tracking_scaling_policy_configuration={
            "target_value": 0,
            "customized_metric_specification": {
                "dimensions": [{
                    "name": "string",
                    "value": "string",
                }],
                "metric_name": "string",
                "metrics": [{
                    "id": "string",
                    "expression": "string",
                    "label": "string",
                    "metric_stat": {
                        "metric": {
                            "metric_name": "string",
                            "namespace": "string",
                            "dimensions": [{
                                "name": "string",
                                "value": "string",
                            }],
                        },
                        "stat": "string",
                        "unit": "string",
                    },
                    "return_data": False,
                }],
                "namespace": "string",
                "statistic": "string",
                "unit": "string",
            },
            "disable_scale_in": False,
            "predefined_metric_specification": {
                "predefined_metric_type": "string",
                "resource_label": "string",
            },
            "scale_in_cooldown": 0,
            "scale_out_cooldown": 0,
        })
    
    const awsPolicyResource = new aws.appautoscaling.Policy("awsPolicyResource", {
        resourceId: "string",
        scalableDimension: "string",
        serviceNamespace: "string",
        name: "string",
        policyType: "string",
        predictiveScalingPolicyConfiguration: {
            metricSpecifications: [{
                targetValue: "string",
                customizedCapacityMetricSpecification: {
                    metricDataQueries: [{
                        id: "string",
                        expression: "string",
                        label: "string",
                        metricStat: {
                            metric: {
                                dimensions: [{
                                    name: "string",
                                    value: "string",
                                }],
                                metricName: "string",
                                namespace: "string",
                            },
                            stat: "string",
                            unit: "string",
                        },
                        returnData: false,
                    }],
                },
                customizedLoadMetricSpecification: {
                    metricDataQueries: [{
                        id: "string",
                        expression: "string",
                        label: "string",
                        metricStat: {
                            metric: {
                                dimensions: [{
                                    name: "string",
                                    value: "string",
                                }],
                                metricName: "string",
                                namespace: "string",
                            },
                            stat: "string",
                            unit: "string",
                        },
                        returnData: false,
                    }],
                },
                customizedScalingMetricSpecification: {
                    metricDataQueries: [{
                        id: "string",
                        expression: "string",
                        label: "string",
                        metricStat: {
                            metric: {
                                dimensions: [{
                                    name: "string",
                                    value: "string",
                                }],
                                metricName: "string",
                                namespace: "string",
                            },
                            stat: "string",
                            unit: "string",
                        },
                        returnData: false,
                    }],
                },
                predefinedLoadMetricSpecification: {
                    predefinedMetricType: "string",
                    resourceLabel: "string",
                },
                predefinedMetricPairSpecification: {
                    predefinedMetricType: "string",
                    resourceLabel: "string",
                },
                predefinedScalingMetricSpecification: {
                    predefinedMetricType: "string",
                    resourceLabel: "string",
                },
            }],
            maxCapacityBreachBehavior: "string",
            maxCapacityBuffer: 0,
            mode: "string",
            schedulingBufferTime: 0,
        },
        region: "string",
        stepScalingPolicyConfiguration: {
            adjustmentType: "string",
            cooldown: 0,
            metricAggregationType: "string",
            minAdjustmentMagnitude: 0,
            stepAdjustments: [{
                scalingAdjustment: 0,
                metricIntervalLowerBound: "string",
                metricIntervalUpperBound: "string",
            }],
        },
        targetTrackingScalingPolicyConfiguration: {
            targetValue: 0,
            customizedMetricSpecification: {
                dimensions: [{
                    name: "string",
                    value: "string",
                }],
                metricName: "string",
                metrics: [{
                    id: "string",
                    expression: "string",
                    label: "string",
                    metricStat: {
                        metric: {
                            metricName: "string",
                            namespace: "string",
                            dimensions: [{
                                name: "string",
                                value: "string",
                            }],
                        },
                        stat: "string",
                        unit: "string",
                    },
                    returnData: false,
                }],
                namespace: "string",
                statistic: "string",
                unit: "string",
            },
            disableScaleIn: false,
            predefinedMetricSpecification: {
                predefinedMetricType: "string",
                resourceLabel: "string",
            },
            scaleInCooldown: 0,
            scaleOutCooldown: 0,
        },
    });
    
    type: aws:appautoscaling:Policy
    properties:
        name: string
        policyType: string
        predictiveScalingPolicyConfiguration:
            maxCapacityBreachBehavior: string
            maxCapacityBuffer: 0
            metricSpecifications:
                - customizedCapacityMetricSpecification:
                    metricDataQueries:
                        - expression: string
                          id: string
                          label: string
                          metricStat:
                            metric:
                                dimensions:
                                    - name: string
                                      value: string
                                metricName: string
                                namespace: string
                            stat: string
                            unit: string
                          returnData: false
                  customizedLoadMetricSpecification:
                    metricDataQueries:
                        - expression: string
                          id: string
                          label: string
                          metricStat:
                            metric:
                                dimensions:
                                    - name: string
                                      value: string
                                metricName: string
                                namespace: string
                            stat: string
                            unit: string
                          returnData: false
                  customizedScalingMetricSpecification:
                    metricDataQueries:
                        - expression: string
                          id: string
                          label: string
                          metricStat:
                            metric:
                                dimensions:
                                    - name: string
                                      value: string
                                metricName: string
                                namespace: string
                            stat: string
                            unit: string
                          returnData: false
                  predefinedLoadMetricSpecification:
                    predefinedMetricType: string
                    resourceLabel: string
                  predefinedMetricPairSpecification:
                    predefinedMetricType: string
                    resourceLabel: string
                  predefinedScalingMetricSpecification:
                    predefinedMetricType: string
                    resourceLabel: string
                  targetValue: string
            mode: string
            schedulingBufferTime: 0
        region: string
        resourceId: string
        scalableDimension: string
        serviceNamespace: string
        stepScalingPolicyConfiguration:
            adjustmentType: string
            cooldown: 0
            metricAggregationType: string
            minAdjustmentMagnitude: 0
            stepAdjustments:
                - metricIntervalLowerBound: string
                  metricIntervalUpperBound: string
                  scalingAdjustment: 0
        targetTrackingScalingPolicyConfiguration:
            customizedMetricSpecification:
                dimensions:
                    - name: string
                      value: string
                metricName: string
                metrics:
                    - expression: string
                      id: string
                      label: string
                      metricStat:
                        metric:
                            dimensions:
                                - name: string
                                  value: string
                            metricName: string
                            namespace: string
                        stat: string
                        unit: string
                      returnData: false
                namespace: string
                statistic: string
                unit: string
            disableScaleIn: false
            predefinedMetricSpecification:
                predefinedMetricType: string
                resourceLabel: string
            scaleInCooldown: 0
            scaleOutCooldown: 0
            targetValue: 0
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Policy resource accepts the following input properties:

    ResourceId string
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    ScalableDimension string
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    ServiceNamespace string
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    Name string
    Name of the policy. Must be between 1 and 255 characters in length.
    PolicyType string
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    PredictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfiguration
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    StepScalingPolicyConfiguration PolicyStepScalingPolicyConfiguration
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    TargetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfiguration
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    ResourceId string
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    ScalableDimension string
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    ServiceNamespace string
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    Name string
    Name of the policy. Must be between 1 and 255 characters in length.
    PolicyType string
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    PredictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfigurationArgs
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    StepScalingPolicyConfiguration PolicyStepScalingPolicyConfigurationArgs
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    TargetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfigurationArgs
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    resourceId String
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalableDimension String
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    serviceNamespace String
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    name String
    Name of the policy. Must be between 1 and 255 characters in length.
    policyType String
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfiguration
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    stepScalingPolicyConfiguration PolicyStepScalingPolicyConfiguration
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    targetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfiguration
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    resourceId string
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalableDimension string
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    serviceNamespace string
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    name string
    Name of the policy. Must be between 1 and 255 characters in length.
    policyType string
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfiguration
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    stepScalingPolicyConfiguration PolicyStepScalingPolicyConfiguration
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    targetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfiguration
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    resource_id str
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalable_dimension str
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    service_namespace str
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    name str
    Name of the policy. Must be between 1 and 255 characters in length.
    policy_type str
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictive_scaling_policy_configuration PolicyPredictiveScalingPolicyConfigurationArgs
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    step_scaling_policy_configuration PolicyStepScalingPolicyConfigurationArgs
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    target_tracking_scaling_policy_configuration PolicyTargetTrackingScalingPolicyConfigurationArgs
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    resourceId String
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalableDimension String
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    serviceNamespace String
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    name String
    Name of the policy. Must be between 1 and 255 characters in length.
    policyType String
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictiveScalingPolicyConfiguration Property Map
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    stepScalingPolicyConfiguration Property Map
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    targetTrackingScalingPolicyConfiguration Property Map
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.

    Outputs

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

    AlarmArns List<string>
    List of CloudWatch alarm ARNs associated with the scaling policy.
    Arn string
    ARN assigned by AWS to the scaling policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    AlarmArns []string
    List of CloudWatch alarm ARNs associated with the scaling policy.
    Arn string
    ARN assigned by AWS to the scaling policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    alarmArns List<String>
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn String
    ARN assigned by AWS to the scaling policy.
    id String
    The provider-assigned unique ID for this managed resource.
    alarmArns string[]
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn string
    ARN assigned by AWS to the scaling policy.
    id string
    The provider-assigned unique ID for this managed resource.
    alarm_arns Sequence[str]
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn str
    ARN assigned by AWS to the scaling policy.
    id str
    The provider-assigned unique ID for this managed resource.
    alarmArns List<String>
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn String
    ARN assigned by AWS to the scaling policy.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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,
            alarm_arns: Optional[Sequence[str]] = None,
            arn: Optional[str] = None,
            name: Optional[str] = None,
            policy_type: Optional[str] = None,
            predictive_scaling_policy_configuration: Optional[PolicyPredictiveScalingPolicyConfigurationArgs] = None,
            region: Optional[str] = None,
            resource_id: Optional[str] = None,
            scalable_dimension: Optional[str] = None,
            service_namespace: Optional[str] = None,
            step_scaling_policy_configuration: Optional[PolicyStepScalingPolicyConfigurationArgs] = None,
            target_tracking_scaling_policy_configuration: Optional[PolicyTargetTrackingScalingPolicyConfigurationArgs] = 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)
    public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)
    resources:  _:    type: aws:appautoscaling:Policy    get:      id: ${id}
    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.
    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:
    AlarmArns List<string>
    List of CloudWatch alarm ARNs associated with the scaling policy.
    Arn string
    ARN assigned by AWS to the scaling policy.
    Name string
    Name of the policy. Must be between 1 and 255 characters in length.
    PolicyType string
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    PredictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfiguration
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ResourceId string
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    ScalableDimension string
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    ServiceNamespace string
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    StepScalingPolicyConfiguration PolicyStepScalingPolicyConfiguration
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    TargetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfiguration
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    AlarmArns []string
    List of CloudWatch alarm ARNs associated with the scaling policy.
    Arn string
    ARN assigned by AWS to the scaling policy.
    Name string
    Name of the policy. Must be between 1 and 255 characters in length.
    PolicyType string
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    PredictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfigurationArgs
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ResourceId string
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    ScalableDimension string
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    ServiceNamespace string
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    StepScalingPolicyConfiguration PolicyStepScalingPolicyConfigurationArgs
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    TargetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfigurationArgs
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    alarmArns List<String>
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn String
    ARN assigned by AWS to the scaling policy.
    name String
    Name of the policy. Must be between 1 and 255 characters in length.
    policyType String
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfiguration
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resourceId String
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalableDimension String
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    serviceNamespace String
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    stepScalingPolicyConfiguration PolicyStepScalingPolicyConfiguration
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    targetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfiguration
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    alarmArns string[]
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn string
    ARN assigned by AWS to the scaling policy.
    name string
    Name of the policy. Must be between 1 and 255 characters in length.
    policyType string
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictiveScalingPolicyConfiguration PolicyPredictiveScalingPolicyConfiguration
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resourceId string
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalableDimension string
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    serviceNamespace string
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    stepScalingPolicyConfiguration PolicyStepScalingPolicyConfiguration
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    targetTrackingScalingPolicyConfiguration PolicyTargetTrackingScalingPolicyConfiguration
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    alarm_arns Sequence[str]
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn str
    ARN assigned by AWS to the scaling policy.
    name str
    Name of the policy. Must be between 1 and 255 characters in length.
    policy_type str
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictive_scaling_policy_configuration PolicyPredictiveScalingPolicyConfigurationArgs
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resource_id str
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalable_dimension str
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    service_namespace str
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    step_scaling_policy_configuration PolicyStepScalingPolicyConfigurationArgs
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    target_tracking_scaling_policy_configuration PolicyTargetTrackingScalingPolicyConfigurationArgs
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.
    alarmArns List<String>
    List of CloudWatch alarm ARNs associated with the scaling policy.
    arn String
    ARN assigned by AWS to the scaling policy.
    name String
    Name of the policy. Must be between 1 and 255 characters in length.
    policyType String
    Policy type. Valid values are StepScaling, TargetTrackingScaling, and PredictiveScaling. Defaults to StepScaling. Certain services only support only one policy type. For more information see the Target Tracking Scaling Policies, Step Scaling Policies, and Predictive Scaling documentation.
    predictiveScalingPolicyConfiguration Property Map
    Predictive scaling policy configuration, requires policy_type = "PredictiveScaling". See supported fields below.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resourceId String
    Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference
    scalableDimension String
    Scalable dimension of the scalable target. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference
    serviceNamespace String
    AWS service namespace of the scalable target. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference
    stepScalingPolicyConfiguration Property Map
    Step scaling policy configuration, requires policy_type = "StepScaling" (default). See supported fields below.
    targetTrackingScalingPolicyConfiguration Property Map
    Target tracking policy configuration, requires policy_type = "TargetTrackingScaling". See supported fields below.

    Supporting Types

    PolicyPredictiveScalingPolicyConfiguration, PolicyPredictiveScalingPolicyConfigurationArgs

    MetricSpecifications List<PolicyPredictiveScalingPolicyConfigurationMetricSpecification>
    Metrics and target utilization to use for predictive scaling. See supported fields below.
    MaxCapacityBreachBehavior string
    The behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity. Valid values are HonorMaxCapacity and IncreaseMaxCapacity.
    MaxCapacityBuffer int
    Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. Required if the max_capacity_breach_behavior argument is set to IncreaseMaxCapacity, and cannot be used otherwise.
    Mode string
    Predictive scaling mode. Valid values are ForecastOnly and ForecastAndScale.
    SchedulingBufferTime int
    Amount of time, in seconds, that the start time can be advanced.
    MetricSpecifications []PolicyPredictiveScalingPolicyConfigurationMetricSpecification
    Metrics and target utilization to use for predictive scaling. See supported fields below.
    MaxCapacityBreachBehavior string
    The behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity. Valid values are HonorMaxCapacity and IncreaseMaxCapacity.
    MaxCapacityBuffer int
    Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. Required if the max_capacity_breach_behavior argument is set to IncreaseMaxCapacity, and cannot be used otherwise.
    Mode string
    Predictive scaling mode. Valid values are ForecastOnly and ForecastAndScale.
    SchedulingBufferTime int
    Amount of time, in seconds, that the start time can be advanced.
    metricSpecifications List<PolicyPredictiveScalingPolicyConfigurationMetricSpecification>
    Metrics and target utilization to use for predictive scaling. See supported fields below.
    maxCapacityBreachBehavior String
    The behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity. Valid values are HonorMaxCapacity and IncreaseMaxCapacity.
    maxCapacityBuffer Integer
    Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. Required if the max_capacity_breach_behavior argument is set to IncreaseMaxCapacity, and cannot be used otherwise.
    mode String
    Predictive scaling mode. Valid values are ForecastOnly and ForecastAndScale.
    schedulingBufferTime Integer
    Amount of time, in seconds, that the start time can be advanced.
    metricSpecifications PolicyPredictiveScalingPolicyConfigurationMetricSpecification[]
    Metrics and target utilization to use for predictive scaling. See supported fields below.
    maxCapacityBreachBehavior string
    The behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity. Valid values are HonorMaxCapacity and IncreaseMaxCapacity.
    maxCapacityBuffer number
    Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. Required if the max_capacity_breach_behavior argument is set to IncreaseMaxCapacity, and cannot be used otherwise.
    mode string
    Predictive scaling mode. Valid values are ForecastOnly and ForecastAndScale.
    schedulingBufferTime number
    Amount of time, in seconds, that the start time can be advanced.
    metric_specifications Sequence[PolicyPredictiveScalingPolicyConfigurationMetricSpecification]
    Metrics and target utilization to use for predictive scaling. See supported fields below.
    max_capacity_breach_behavior str
    The behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity. Valid values are HonorMaxCapacity and IncreaseMaxCapacity.
    max_capacity_buffer int
    Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. Required if the max_capacity_breach_behavior argument is set to IncreaseMaxCapacity, and cannot be used otherwise.
    mode str
    Predictive scaling mode. Valid values are ForecastOnly and ForecastAndScale.
    scheduling_buffer_time int
    Amount of time, in seconds, that the start time can be advanced.
    metricSpecifications List<Property Map>
    Metrics and target utilization to use for predictive scaling. See supported fields below.
    maxCapacityBreachBehavior String
    The behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity. Valid values are HonorMaxCapacity and IncreaseMaxCapacity.
    maxCapacityBuffer Number
    Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. Required if the max_capacity_breach_behavior argument is set to IncreaseMaxCapacity, and cannot be used otherwise.
    mode String
    Predictive scaling mode. Valid values are ForecastOnly and ForecastAndScale.
    schedulingBufferTime Number
    Amount of time, in seconds, that the start time can be advanced.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecification, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationArgs

    TargetValue string
    Target utilization.
    CustomizedCapacityMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecification
    Customized capacity metric specification. See supported fields below.
    CustomizedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecification
    Customized load metric specification. See supported fields below.
    CustomizedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecification
    Customized scaling metric specification. See supported fields below.
    PredefinedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecification
    Predefined load metric specification. See supported fields below.
    PredefinedMetricPairSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecification
    Predefined metric pair specification that determines the appropriate scaling metric and load metric to use. See supported fields below.
    PredefinedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecification
    Predefined scaling metric specification. See supported fields below.
    TargetValue string
    Target utilization.
    CustomizedCapacityMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecification
    Customized capacity metric specification. See supported fields below.
    CustomizedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecification
    Customized load metric specification. See supported fields below.
    CustomizedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecification
    Customized scaling metric specification. See supported fields below.
    PredefinedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecification
    Predefined load metric specification. See supported fields below.
    PredefinedMetricPairSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecification
    Predefined metric pair specification that determines the appropriate scaling metric and load metric to use. See supported fields below.
    PredefinedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecification
    Predefined scaling metric specification. See supported fields below.
    targetValue String
    Target utilization.
    customizedCapacityMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecification
    Customized capacity metric specification. See supported fields below.
    customizedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecification
    Customized load metric specification. See supported fields below.
    customizedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecification
    Customized scaling metric specification. See supported fields below.
    predefinedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecification
    Predefined load metric specification. See supported fields below.
    predefinedMetricPairSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecification
    Predefined metric pair specification that determines the appropriate scaling metric and load metric to use. See supported fields below.
    predefinedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecification
    Predefined scaling metric specification. See supported fields below.
    targetValue string
    Target utilization.
    customizedCapacityMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecification
    Customized capacity metric specification. See supported fields below.
    customizedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecification
    Customized load metric specification. See supported fields below.
    customizedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecification
    Customized scaling metric specification. See supported fields below.
    predefinedLoadMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecification
    Predefined load metric specification. See supported fields below.
    predefinedMetricPairSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecification
    Predefined metric pair specification that determines the appropriate scaling metric and load metric to use. See supported fields below.
    predefinedScalingMetricSpecification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecification
    Predefined scaling metric specification. See supported fields below.
    target_value str
    Target utilization.
    customized_capacity_metric_specification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecification
    Customized capacity metric specification. See supported fields below.
    customized_load_metric_specification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecification
    Customized load metric specification. See supported fields below.
    customized_scaling_metric_specification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecification
    Customized scaling metric specification. See supported fields below.
    predefined_load_metric_specification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecification
    Predefined load metric specification. See supported fields below.
    predefined_metric_pair_specification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecification
    Predefined metric pair specification that determines the appropriate scaling metric and load metric to use. See supported fields below.
    predefined_scaling_metric_specification PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecification
    Predefined scaling metric specification. See supported fields below.
    targetValue String
    Target utilization.
    customizedCapacityMetricSpecification Property Map
    Customized capacity metric specification. See supported fields below.
    customizedLoadMetricSpecification Property Map
    Customized load metric specification. See supported fields below.
    customizedScalingMetricSpecification Property Map
    Customized scaling metric specification. See supported fields below.
    predefinedLoadMetricSpecification Property Map
    Predefined load metric specification. See supported fields below.
    predefinedMetricPairSpecification Property Map
    Predefined metric pair specification that determines the appropriate scaling metric and load metric to use. See supported fields below.
    predefinedScalingMetricSpecification Property Map
    Predefined scaling metric specification. See supported fields below.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecification, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs

    MetricDataQueries List<PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQuery>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    MetricDataQueries []PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQuery
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries List<PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQuery>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQuery[]
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metric_data_queries Sequence[PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQuery]
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries List<Property Map>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQuery, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs

    Id string
    Short name that identifies the object's results in the response.
    Expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    ReturnData bool
    Whether to return the timestamps and raw data values of this metric.
    Id string
    Short name that identifies the object's results in the response.
    Expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    ReturnData bool
    Whether to return the timestamps and raw data values of this metric.
    id String
    Short name that identifies the object's results in the response.
    expression String
    Math expression to perform on the returned data, if this object is performing a math expression.
    label String
    Human-readable label for this metric or expression.
    metricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    returnData Boolean
    Whether to return the timestamps and raw data values of this metric.
    id string
    Short name that identifies the object's results in the response.
    expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    label string
    Human-readable label for this metric or expression.
    metricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    returnData boolean
    Whether to return the timestamps and raw data values of this metric.
    id str
    Short name that identifies the object's results in the response.
    expression str
    Math expression to perform on the returned data, if this object is performing a math expression.
    label str
    Human-readable label for this metric or expression.
    metric_stat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    return_data bool
    Whether to return the timestamps and raw data values of this metric.
    id String
    Short name that identifies the object's results in the response.
    expression String
    Math expression to perform on the returned data, if this object is performing a math expression.
    label String
    Human-readable label for this metric or expression.
    metricStat Property Map
    Information about the metric data to return. See supported fields below.
    returnData Boolean
    Whether to return the timestamps and raw data values of this metric.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStat, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs

    Metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    Metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat string
    Statistic of the metrics to return.
    unit string
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat str
    Statistic of the metrics to return.
    unit str
    Unit of the metrics to return.
    metric Property Map
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetric, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs

    dimensions List<Property Map>
    Dimensions of the metric. See supported fields below.
    metricName String
    Name of the metric.
    namespace String
    Namespace of the metric.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimension, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs

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

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecification, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs

    MetricDataQueries List<PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQuery>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    MetricDataQueries []PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQuery
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries List<PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQuery>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQuery[]
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metric_data_queries Sequence[PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQuery]
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries List<Property Map>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQuery, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs

    Id string
    Short name that identifies the object's results in the response.
    Expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    ReturnData bool
    Whether to return the timestamps and raw data values of this metric.
    Id string
    Short name that identifies the object's results in the response.
    Expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    ReturnData bool
    Whether to return the timestamps and raw data values of this metric.
    id String
    Short name that identifies the object's results in the response.
    expression String
    Math expression to perform on the returned data, if this object is performing a math expression.
    label String
    Human-readable label for this metric or expression.
    metricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    returnData Boolean
    Whether to return the timestamps and raw data values of this metric.
    id string
    Short name that identifies the object's results in the response.
    expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    label string
    Human-readable label for this metric or expression.
    metricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    returnData boolean
    Whether to return the timestamps and raw data values of this metric.
    id str
    Short name that identifies the object's results in the response.
    expression str
    Math expression to perform on the returned data, if this object is performing a math expression.
    label str
    Human-readable label for this metric or expression.
    metric_stat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    return_data bool
    Whether to return the timestamps and raw data values of this metric.
    id String
    Short name that identifies the object's results in the response.
    expression String
    Math expression to perform on the returned data, if this object is performing a math expression.
    label String
    Human-readable label for this metric or expression.
    metricStat Property Map
    Information about the metric data to return. See supported fields below.
    returnData Boolean
    Whether to return the timestamps and raw data values of this metric.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStat, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs

    Metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    Metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat string
    Statistic of the metrics to return.
    unit string
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat str
    Statistic of the metrics to return.
    unit str
    Unit of the metrics to return.
    metric Property Map
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetric, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs

    Dimensions []PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimension
    Dimensions of the metric. See supported fields below.
    MetricName string
    Name of the metric.
    Namespace string
    Namespace of the metric.
    dimensions PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimension[]
    Dimensions of the metric. See supported fields below.
    metricName string
    Name of the metric.
    namespace string
    Namespace of the metric.
    dimensions List<Property Map>
    Dimensions of the metric. See supported fields below.
    metricName String
    Name of the metric.
    namespace String
    Namespace of the metric.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimension, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs

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

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecification, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs

    MetricDataQueries List<PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQuery>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    MetricDataQueries []PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQuery
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries List<PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQuery>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQuery[]
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metric_data_queries Sequence[PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQuery]
    One or more metric data queries to provide data points for a metric specification. See supported fields below.
    metricDataQueries List<Property Map>
    One or more metric data queries to provide data points for a metric specification. See supported fields below.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQuery, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs

    Id string
    Short name that identifies the object's results in the response.
    Expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    ReturnData bool
    Whether to return the timestamps and raw data values of this metric.
    Id string
    Short name that identifies the object's results in the response.
    Expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    ReturnData bool
    Whether to return the timestamps and raw data values of this metric.
    id String
    Short name that identifies the object's results in the response.
    expression String
    Math expression to perform on the returned data, if this object is performing a math expression.
    label String
    Human-readable label for this metric or expression.
    metricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    returnData Boolean
    Whether to return the timestamps and raw data values of this metric.
    id string
    Short name that identifies the object's results in the response.
    expression string
    Math expression to perform on the returned data, if this object is performing a math expression.
    label string
    Human-readable label for this metric or expression.
    metricStat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    returnData boolean
    Whether to return the timestamps and raw data values of this metric.
    id str
    Short name that identifies the object's results in the response.
    expression str
    Math expression to perform on the returned data, if this object is performing a math expression.
    label str
    Human-readable label for this metric or expression.
    metric_stat PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStat
    Information about the metric data to return. See supported fields below.
    return_data bool
    Whether to return the timestamps and raw data values of this metric.
    id String
    Short name that identifies the object's results in the response.
    expression String
    Math expression to perform on the returned data, if this object is performing a math expression.
    label String
    Human-readable label for this metric or expression.
    metricStat Property Map
    Information about the metric data to return. See supported fields below.
    returnData Boolean
    Whether to return the timestamps and raw data values of this metric.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStat, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs

    Metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    Metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat string
    Statistic of the metrics to return.
    unit string
    Unit of the metrics to return.
    metric PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat str
    Statistic of the metrics to return.
    unit str
    Unit of the metrics to return.
    metric Property Map
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetric, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs

    dimensions List<Property Map>
    Dimensions of the metric. See supported fields below.
    metricName String
    Name of the metric.
    namespace String
    Namespace of the metric.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimension, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs

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

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecification, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs

    PredefinedMetricType string
    Metric type.
    ResourceLabel string
    Label that uniquely identifies a target group.
    PredefinedMetricType string
    Metric type.
    ResourceLabel string
    Label that uniquely identifies a target group.
    predefinedMetricType String
    Metric type.
    resourceLabel String
    Label that uniquely identifies a target group.
    predefinedMetricType string
    Metric type.
    resourceLabel string
    Label that uniquely identifies a target group.
    predefined_metric_type str
    Metric type.
    resource_label str
    Label that uniquely identifies a target group.
    predefinedMetricType String
    Metric type.
    resourceLabel String
    Label that uniquely identifies a target group.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecification, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs

    PredefinedMetricType string
    Which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
    ResourceLabel string
    Label that uniquely identifies a specific target group from which to determine the total and average request count.
    PredefinedMetricType string
    Which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
    ResourceLabel string
    Label that uniquely identifies a specific target group from which to determine the total and average request count.
    predefinedMetricType String
    Which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
    resourceLabel String
    Label that uniquely identifies a specific target group from which to determine the total and average request count.
    predefinedMetricType string
    Which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
    resourceLabel string
    Label that uniquely identifies a specific target group from which to determine the total and average request count.
    predefined_metric_type str
    Which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
    resource_label str
    Label that uniquely identifies a specific target group from which to determine the total and average request count.
    predefinedMetricType String
    Which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
    resourceLabel String
    Label that uniquely identifies a specific target group from which to determine the total and average request count.

    PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecification, PolicyPredictiveScalingPolicyConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs

    PredefinedMetricType string
    Metric type.
    ResourceLabel string
    Label that uniquely identifies a specific target group from which to determine the average request count.
    PredefinedMetricType string
    Metric type.
    ResourceLabel string
    Label that uniquely identifies a specific target group from which to determine the average request count.
    predefinedMetricType String
    Metric type.
    resourceLabel String
    Label that uniquely identifies a specific target group from which to determine the average request count.
    predefinedMetricType string
    Metric type.
    resourceLabel string
    Label that uniquely identifies a specific target group from which to determine the average request count.
    predefined_metric_type str
    Metric type.
    resource_label str
    Label that uniquely identifies a specific target group from which to determine the average request count.
    predefinedMetricType String
    Metric type.
    resourceLabel String
    Label that uniquely identifies a specific target group from which to determine the average request count.

    PolicyStepScalingPolicyConfiguration, PolicyStepScalingPolicyConfigurationArgs

    AdjustmentType string
    Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
    Cooldown int
    Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
    MetricAggregationType string
    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 number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
    StepAdjustments List<PolicyStepScalingPolicyConfigurationStepAdjustment>
    Set of adjustments that manage scaling. These have the following structure:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    

    const ecsPolicy = new aws.appautoscaling.Policy("ecs_policy", {stepScalingPolicyConfiguration: { stepAdjustments: [ { metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", scalingAdjustment: -1, }, { metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", scalingAdjustment: 1, }, ], }});

    import pulumi
    import pulumi_aws as aws
    
    ecs_policy = aws.appautoscaling.Policy("ecs_policy", step_scaling_policy_configuration={
        "step_adjustments": [
            {
                "metric_interval_lower_bound": "1",
                "metric_interval_upper_bound": "2",
                "scaling_adjustment": -1,
            },
            {
                "metric_interval_lower_bound": "2",
                "metric_interval_upper_bound": "3",
                "scaling_adjustment": 1,
            },
        ],
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsPolicy = new Aws.AppAutoScaling.Policy("ecs_policy", new()
        {
            StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
            {
                StepAdjustments = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "1",
                        MetricIntervalUpperBound = "2",
                        ScalingAdjustment = -1,
                    },
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "2",
                        MetricIntervalUpperBound = "3",
                        ScalingAdjustment = 1,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appautoscaling.NewPolicy(ctx, "ecs_policy", &appautoscaling.PolicyArgs{
    			StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    				StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("1"),
    						MetricIntervalUpperBound: pulumi.String("2"),
    						ScalingAdjustment:        pulumi.Int(-1),
    					},
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("2"),
    						MetricIntervalUpperBound: pulumi.String("3"),
    						ScalingAdjustment:        pulumi.Int(1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder()
                .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
                    .stepAdjustments(                
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("1")
                            .metricIntervalUpperBound("2")
                            .scalingAdjustment(-1)
                            .build(),
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("2")
                            .metricIntervalUpperBound("3")
                            .scalingAdjustment(1)
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsPolicy:
        type: aws:appautoscaling:Policy
        name: ecs_policy
        properties:
          stepScalingPolicyConfiguration:
            stepAdjustments:
              - metricIntervalLowerBound: 1
                metricIntervalUpperBound: 2
                scalingAdjustment: -1
              - metricIntervalLowerBound: 2
                metricIntervalUpperBound: 3
                scalingAdjustment: 1
    
    AdjustmentType string
    Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
    Cooldown int
    Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
    MetricAggregationType string
    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 number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
    StepAdjustments []PolicyStepScalingPolicyConfigurationStepAdjustment
    Set of adjustments that manage scaling. These have the following structure:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    

    const ecsPolicy = new aws.appautoscaling.Policy("ecs_policy", {stepScalingPolicyConfiguration: { stepAdjustments: [ { metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", scalingAdjustment: -1, }, { metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", scalingAdjustment: 1, }, ], }});

    import pulumi
    import pulumi_aws as aws
    
    ecs_policy = aws.appautoscaling.Policy("ecs_policy", step_scaling_policy_configuration={
        "step_adjustments": [
            {
                "metric_interval_lower_bound": "1",
                "metric_interval_upper_bound": "2",
                "scaling_adjustment": -1,
            },
            {
                "metric_interval_lower_bound": "2",
                "metric_interval_upper_bound": "3",
                "scaling_adjustment": 1,
            },
        ],
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsPolicy = new Aws.AppAutoScaling.Policy("ecs_policy", new()
        {
            StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
            {
                StepAdjustments = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "1",
                        MetricIntervalUpperBound = "2",
                        ScalingAdjustment = -1,
                    },
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "2",
                        MetricIntervalUpperBound = "3",
                        ScalingAdjustment = 1,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appautoscaling.NewPolicy(ctx, "ecs_policy", &appautoscaling.PolicyArgs{
    			StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    				StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("1"),
    						MetricIntervalUpperBound: pulumi.String("2"),
    						ScalingAdjustment:        pulumi.Int(-1),
    					},
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("2"),
    						MetricIntervalUpperBound: pulumi.String("3"),
    						ScalingAdjustment:        pulumi.Int(1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder()
                .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
                    .stepAdjustments(                
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("1")
                            .metricIntervalUpperBound("2")
                            .scalingAdjustment(-1)
                            .build(),
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("2")
                            .metricIntervalUpperBound("3")
                            .scalingAdjustment(1)
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsPolicy:
        type: aws:appautoscaling:Policy
        name: ecs_policy
        properties:
          stepScalingPolicyConfiguration:
            stepAdjustments:
              - metricIntervalLowerBound: 1
                metricIntervalUpperBound: 2
                scalingAdjustment: -1
              - metricIntervalLowerBound: 2
                metricIntervalUpperBound: 3
                scalingAdjustment: 1
    
    adjustmentType String
    Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
    cooldown Integer
    Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
    metricAggregationType String
    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 Integer
    Minimum number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
    stepAdjustments List<PolicyStepScalingPolicyConfigurationStepAdjustment>
    Set of adjustments that manage scaling. These have the following structure:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    

    const ecsPolicy = new aws.appautoscaling.Policy("ecs_policy", {stepScalingPolicyConfiguration: { stepAdjustments: [ { metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", scalingAdjustment: -1, }, { metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", scalingAdjustment: 1, }, ], }});

    import pulumi
    import pulumi_aws as aws
    
    ecs_policy = aws.appautoscaling.Policy("ecs_policy", step_scaling_policy_configuration={
        "step_adjustments": [
            {
                "metric_interval_lower_bound": "1",
                "metric_interval_upper_bound": "2",
                "scaling_adjustment": -1,
            },
            {
                "metric_interval_lower_bound": "2",
                "metric_interval_upper_bound": "3",
                "scaling_adjustment": 1,
            },
        ],
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsPolicy = new Aws.AppAutoScaling.Policy("ecs_policy", new()
        {
            StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
            {
                StepAdjustments = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "1",
                        MetricIntervalUpperBound = "2",
                        ScalingAdjustment = -1,
                    },
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "2",
                        MetricIntervalUpperBound = "3",
                        ScalingAdjustment = 1,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appautoscaling.NewPolicy(ctx, "ecs_policy", &appautoscaling.PolicyArgs{
    			StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    				StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("1"),
    						MetricIntervalUpperBound: pulumi.String("2"),
    						ScalingAdjustment:        pulumi.Int(-1),
    					},
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("2"),
    						MetricIntervalUpperBound: pulumi.String("3"),
    						ScalingAdjustment:        pulumi.Int(1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder()
                .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
                    .stepAdjustments(                
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("1")
                            .metricIntervalUpperBound("2")
                            .scalingAdjustment(-1)
                            .build(),
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("2")
                            .metricIntervalUpperBound("3")
                            .scalingAdjustment(1)
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsPolicy:
        type: aws:appautoscaling:Policy
        name: ecs_policy
        properties:
          stepScalingPolicyConfiguration:
            stepAdjustments:
              - metricIntervalLowerBound: 1
                metricIntervalUpperBound: 2
                scalingAdjustment: -1
              - metricIntervalLowerBound: 2
                metricIntervalUpperBound: 3
                scalingAdjustment: 1
    
    adjustmentType string
    Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
    cooldown number
    Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
    metricAggregationType string
    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 number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
    stepAdjustments PolicyStepScalingPolicyConfigurationStepAdjustment[]
    Set of adjustments that manage scaling. These have the following structure:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    

    const ecsPolicy = new aws.appautoscaling.Policy("ecs_policy", {stepScalingPolicyConfiguration: { stepAdjustments: [ { metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", scalingAdjustment: -1, }, { metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", scalingAdjustment: 1, }, ], }});

    import pulumi
    import pulumi_aws as aws
    
    ecs_policy = aws.appautoscaling.Policy("ecs_policy", step_scaling_policy_configuration={
        "step_adjustments": [
            {
                "metric_interval_lower_bound": "1",
                "metric_interval_upper_bound": "2",
                "scaling_adjustment": -1,
            },
            {
                "metric_interval_lower_bound": "2",
                "metric_interval_upper_bound": "3",
                "scaling_adjustment": 1,
            },
        ],
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsPolicy = new Aws.AppAutoScaling.Policy("ecs_policy", new()
        {
            StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
            {
                StepAdjustments = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "1",
                        MetricIntervalUpperBound = "2",
                        ScalingAdjustment = -1,
                    },
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "2",
                        MetricIntervalUpperBound = "3",
                        ScalingAdjustment = 1,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appautoscaling.NewPolicy(ctx, "ecs_policy", &appautoscaling.PolicyArgs{
    			StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    				StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("1"),
    						MetricIntervalUpperBound: pulumi.String("2"),
    						ScalingAdjustment:        pulumi.Int(-1),
    					},
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("2"),
    						MetricIntervalUpperBound: pulumi.String("3"),
    						ScalingAdjustment:        pulumi.Int(1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder()
                .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
                    .stepAdjustments(                
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("1")
                            .metricIntervalUpperBound("2")
                            .scalingAdjustment(-1)
                            .build(),
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("2")
                            .metricIntervalUpperBound("3")
                            .scalingAdjustment(1)
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsPolicy:
        type: aws:appautoscaling:Policy
        name: ecs_policy
        properties:
          stepScalingPolicyConfiguration:
            stepAdjustments:
              - metricIntervalLowerBound: 1
                metricIntervalUpperBound: 2
                scalingAdjustment: -1
              - metricIntervalLowerBound: 2
                metricIntervalUpperBound: 3
                scalingAdjustment: 1
    
    adjustment_type str
    Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
    cooldown int
    Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
    metric_aggregation_type str
    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 number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
    step_adjustments Sequence[PolicyStepScalingPolicyConfigurationStepAdjustment]
    Set of adjustments that manage scaling. These have the following structure:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    

    const ecsPolicy = new aws.appautoscaling.Policy("ecs_policy", {stepScalingPolicyConfiguration: { stepAdjustments: [ { metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", scalingAdjustment: -1, }, { metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", scalingAdjustment: 1, }, ], }});

    import pulumi
    import pulumi_aws as aws
    
    ecs_policy = aws.appautoscaling.Policy("ecs_policy", step_scaling_policy_configuration={
        "step_adjustments": [
            {
                "metric_interval_lower_bound": "1",
                "metric_interval_upper_bound": "2",
                "scaling_adjustment": -1,
            },
            {
                "metric_interval_lower_bound": "2",
                "metric_interval_upper_bound": "3",
                "scaling_adjustment": 1,
            },
        ],
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsPolicy = new Aws.AppAutoScaling.Policy("ecs_policy", new()
        {
            StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
            {
                StepAdjustments = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "1",
                        MetricIntervalUpperBound = "2",
                        ScalingAdjustment = -1,
                    },
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "2",
                        MetricIntervalUpperBound = "3",
                        ScalingAdjustment = 1,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appautoscaling.NewPolicy(ctx, "ecs_policy", &appautoscaling.PolicyArgs{
    			StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    				StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("1"),
    						MetricIntervalUpperBound: pulumi.String("2"),
    						ScalingAdjustment:        pulumi.Int(-1),
    					},
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("2"),
    						MetricIntervalUpperBound: pulumi.String("3"),
    						ScalingAdjustment:        pulumi.Int(1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder()
                .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
                    .stepAdjustments(                
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("1")
                            .metricIntervalUpperBound("2")
                            .scalingAdjustment(-1)
                            .build(),
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("2")
                            .metricIntervalUpperBound("3")
                            .scalingAdjustment(1)
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsPolicy:
        type: aws:appautoscaling:Policy
        name: ecs_policy
        properties:
          stepScalingPolicyConfiguration:
            stepAdjustments:
              - metricIntervalLowerBound: 1
                metricIntervalUpperBound: 2
                scalingAdjustment: -1
              - metricIntervalLowerBound: 2
                metricIntervalUpperBound: 3
                scalingAdjustment: 1
    
    adjustmentType String
    Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
    cooldown Number
    Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
    metricAggregationType String
    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 number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
    stepAdjustments List<Property Map>
    Set of adjustments that manage scaling. These have the following structure:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    

    const ecsPolicy = new aws.appautoscaling.Policy("ecs_policy", {stepScalingPolicyConfiguration: { stepAdjustments: [ { metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", scalingAdjustment: -1, }, { metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", scalingAdjustment: 1, }, ], }});

    import pulumi
    import pulumi_aws as aws
    
    ecs_policy = aws.appautoscaling.Policy("ecs_policy", step_scaling_policy_configuration={
        "step_adjustments": [
            {
                "metric_interval_lower_bound": "1",
                "metric_interval_upper_bound": "2",
                "scaling_adjustment": -1,
            },
            {
                "metric_interval_lower_bound": "2",
                "metric_interval_upper_bound": "3",
                "scaling_adjustment": 1,
            },
        ],
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ecsPolicy = new Aws.AppAutoScaling.Policy("ecs_policy", new()
        {
            StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs
            {
                StepAdjustments = new[]
                {
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "1",
                        MetricIntervalUpperBound = "2",
                        ScalingAdjustment = -1,
                    },
                    new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs
                    {
                        MetricIntervalLowerBound = "2",
                        MetricIntervalUpperBound = "3",
                        ScalingAdjustment = 1,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appautoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appautoscaling.NewPolicy(ctx, "ecs_policy", &appautoscaling.PolicyArgs{
    			StepScalingPolicyConfiguration: &appautoscaling.PolicyStepScalingPolicyConfigurationArgs{
    				StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("1"),
    						MetricIntervalUpperBound: pulumi.String("2"),
    						ScalingAdjustment:        pulumi.Int(-1),
    					},
    					&appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{
    						MetricIntervalLowerBound: pulumi.String("2"),
    						MetricIntervalUpperBound: pulumi.String("3"),
    						ScalingAdjustment:        pulumi.Int(1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appautoscaling.Policy;
    import com.pulumi.aws.appautoscaling.PolicyArgs;
    import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder()
                .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()
                    .stepAdjustments(                
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("1")
                            .metricIntervalUpperBound("2")
                            .scalingAdjustment(-1)
                            .build(),
                        PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()
                            .metricIntervalLowerBound("2")
                            .metricIntervalUpperBound("3")
                            .scalingAdjustment(1)
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      ecsPolicy:
        type: aws:appautoscaling:Policy
        name: ecs_policy
        properties:
          stepScalingPolicyConfiguration:
            stepAdjustments:
              - metricIntervalLowerBound: 1
                metricIntervalUpperBound: 2
                scalingAdjustment: -1
              - metricIntervalLowerBound: 2
                metricIntervalUpperBound: 3
                scalingAdjustment: 1
    

    PolicyStepScalingPolicyConfigurationStepAdjustment, PolicyStepScalingPolicyConfigurationStepAdjustmentArgs

    ScalingAdjustment int
    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
    Lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity.
    MetricIntervalUpperBound string
    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
    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
    Lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity.
    MetricIntervalUpperBound string
    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 Integer
    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
    Lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity.
    metricIntervalUpperBound String
    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
    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
    Lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity.
    metricIntervalUpperBound string
    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
    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
    Lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity.
    metric_interval_upper_bound str
    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
    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
    Lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity.
    metricIntervalUpperBound String
    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.

    PolicyTargetTrackingScalingPolicyConfiguration, PolicyTargetTrackingScalingPolicyConfigurationArgs

    TargetValue double
    Target value for the metric.
    CustomizedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecification
    Custom CloudWatch metric. Documentation can be found at: AWS Customized Metric Specification. See supported fields below.
    DisableScaleIn bool
    Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.
    PredefinedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecification
    Predefined metric. See supported fields below.
    ScaleInCooldown int
    Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
    ScaleOutCooldown int
    Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
    TargetValue float64
    Target value for the metric.
    CustomizedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecification
    Custom CloudWatch metric. Documentation can be found at: AWS Customized Metric Specification. See supported fields below.
    DisableScaleIn bool
    Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.
    PredefinedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecification
    Predefined metric. See supported fields below.
    ScaleInCooldown int
    Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
    ScaleOutCooldown int
    Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
    targetValue Double
    Target value for the metric.
    customizedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecification
    Custom CloudWatch metric. Documentation can be found at: AWS Customized Metric Specification. See supported fields below.
    disableScaleIn Boolean
    Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.
    predefinedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecification
    Predefined metric. See supported fields below.
    scaleInCooldown Integer
    Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
    scaleOutCooldown Integer
    Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
    targetValue number
    Target value for the metric.
    customizedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecification
    Custom CloudWatch metric. Documentation can be found at: AWS Customized Metric Specification. See supported fields below.
    disableScaleIn boolean
    Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.
    predefinedMetricSpecification PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecification
    Predefined metric. See supported fields below.
    scaleInCooldown number
    Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
    scaleOutCooldown number
    Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
    target_value float
    Target value for the metric.
    customized_metric_specification PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecification
    Custom CloudWatch metric. Documentation can be found at: AWS Customized Metric Specification. See supported fields below.
    disable_scale_in bool
    Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.
    predefined_metric_specification PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecification
    Predefined metric. See supported fields below.
    scale_in_cooldown int
    Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
    scale_out_cooldown int
    Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
    targetValue Number
    Target value for the metric.
    customizedMetricSpecification Property Map
    Custom CloudWatch metric. Documentation can be found at: AWS Customized Metric Specification. See supported fields below.
    disableScaleIn Boolean
    Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.
    predefinedMetricSpecification Property Map
    Predefined metric. See supported fields below.
    scaleInCooldown Number
    Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
    scaleOutCooldown Number
    Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.

    PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecification, PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs

    Dimensions List<PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimension>
    Dimensions of the metric.
    MetricName string
    Name of the metric.
    Metrics List<PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetric>
    Metrics to include, as a metric data query.
    Namespace string
    Namespace of the metric.
    Statistic string
    Statistic of the metric. Valid values: Average, Minimum, Maximum, SampleCount, and Sum.
    Unit string
    Unit of the metrics to return.
    Dimensions []PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimension
    Dimensions of the metric.
    MetricName string
    Name of the metric.
    Metrics []PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetric
    Metrics to include, as a metric data query.
    Namespace string
    Namespace of the metric.
    Statistic string
    Statistic of the metric. Valid values: Average, Minimum, Maximum, SampleCount, and Sum.
    Unit string
    Unit of the metrics to return.
    dimensions List<PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimension>
    Dimensions of the metric.
    metricName String
    Name of the metric.
    metrics List<PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetric>
    Metrics to include, as a metric data query.
    namespace String
    Namespace of the metric.
    statistic String
    Statistic of the metric. Valid values: Average, Minimum, Maximum, SampleCount, and Sum.
    unit String
    Unit of the metrics to return.
    dimensions PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimension[]
    Dimensions of the metric.
    metricName string
    Name of the metric.
    metrics PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetric[]
    Metrics to include, as a metric data query.
    namespace string
    Namespace of the metric.
    statistic string
    Statistic of the metric. Valid values: Average, Minimum, Maximum, SampleCount, and Sum.
    unit string
    Unit of the metrics to return.
    dimensions Sequence[PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimension]
    Dimensions of the metric.
    metric_name str
    Name of the metric.
    metrics Sequence[PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetric]
    Metrics to include, as a metric data query.
    namespace str
    Namespace of the metric.
    statistic str
    Statistic of the metric. Valid values: Average, Minimum, Maximum, SampleCount, and Sum.
    unit str
    Unit of the metrics to return.
    dimensions List<Property Map>
    Dimensions of the metric.
    metricName String
    Name of the metric.
    metrics List<Property Map>
    Metrics to include, as a metric data query.
    namespace String
    Namespace of the metric.
    statistic String
    Statistic of the metric. Valid values: Average, Minimum, Maximum, SampleCount, and Sum.
    unit String
    Unit of the metrics to return.

    PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimension, PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionArgs

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

    PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetric, PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs

    Id string
    Short name for the metric used in target tracking scaling policy.
    Expression string
    Math expression used on the returned metric. You must specify either expression or metric_stat, but not both.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStat
    Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either expression or metric_stat, but not both.
    ReturnData bool
    Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
    Id string
    Short name for the metric used in target tracking scaling policy.
    Expression string
    Math expression used on the returned metric. You must specify either expression or metric_stat, but not both.
    Label string
    Human-readable label for this metric or expression.
    MetricStat PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStat
    Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either expression or metric_stat, but not both.
    ReturnData bool
    Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
    id String
    Short name for the metric used in target tracking scaling policy.
    expression String
    Math expression used on the returned metric. You must specify either expression or metric_stat, but not both.
    label String
    Human-readable label for this metric or expression.
    metricStat PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStat
    Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either expression or metric_stat, but not both.
    returnData Boolean
    Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
    id string
    Short name for the metric used in target tracking scaling policy.
    expression string
    Math expression used on the returned metric. You must specify either expression or metric_stat, but not both.
    label string
    Human-readable label for this metric or expression.
    metricStat PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStat
    Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either expression or metric_stat, but not both.
    returnData boolean
    Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
    id str
    Short name for the metric used in target tracking scaling policy.
    expression str
    Math expression used on the returned metric. You must specify either expression or metric_stat, but not both.
    label str
    Human-readable label for this metric or expression.
    metric_stat PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStat
    Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either expression or metric_stat, but not both.
    return_data bool
    Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
    id String
    Short name for the metric used in target tracking scaling policy.
    expression String
    Math expression used on the returned metric. You must specify either expression or metric_stat, but not both.
    label String
    Human-readable label for this metric or expression.
    metricStat Property Map
    Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either expression or metric_stat, but not both.
    returnData Boolean
    Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true

    PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStat, PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs

    Metric PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    Metric PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    Stat string
    Statistic of the metrics to return.
    Unit string
    Unit of the metrics to return.
    metric PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.
    metric PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat string
    Statistic of the metrics to return.
    unit string
    Unit of the metrics to return.
    metric PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetric
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat str
    Statistic of the metrics to return.
    unit str
    Unit of the metrics to return.
    metric Property Map
    Structure that defines the CloudWatch metric to return, including the metric name, namespace, and dimensions.
    stat String
    Statistic of the metrics to return.
    unit String
    Unit of the metrics to return.

    PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetric, PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs

    metricName String
    Name of the metric.
    namespace String
    Namespace of the metric.
    dimensions List<Property Map>
    Dimensions of the metric.

    PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimension, PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs

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

    PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecification, PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs

    PredefinedMetricType string
    Metric type.
    ResourceLabel string
    Reserved for future use if the predefined_metric_type is not ALBRequestCountPerTarget. If the predefined_metric_type is ALBRequestCountPerTarget, you must specify this argument. Documentation can be found at: AWS Predefined Scaling Metric Specification. Must be less than or equal to 1023 characters in length.
    PredefinedMetricType string
    Metric type.
    ResourceLabel string
    Reserved for future use if the predefined_metric_type is not ALBRequestCountPerTarget. If the predefined_metric_type is ALBRequestCountPerTarget, you must specify this argument. Documentation can be found at: AWS Predefined Scaling Metric Specification. Must be less than or equal to 1023 characters in length.
    predefinedMetricType String
    Metric type.
    resourceLabel String
    Reserved for future use if the predefined_metric_type is not ALBRequestCountPerTarget. If the predefined_metric_type is ALBRequestCountPerTarget, you must specify this argument. Documentation can be found at: AWS Predefined Scaling Metric Specification. Must be less than or equal to 1023 characters in length.
    predefinedMetricType string
    Metric type.
    resourceLabel string
    Reserved for future use if the predefined_metric_type is not ALBRequestCountPerTarget. If the predefined_metric_type is ALBRequestCountPerTarget, you must specify this argument. Documentation can be found at: AWS Predefined Scaling Metric Specification. Must be less than or equal to 1023 characters in length.
    predefined_metric_type str
    Metric type.
    resource_label str
    Reserved for future use if the predefined_metric_type is not ALBRequestCountPerTarget. If the predefined_metric_type is ALBRequestCountPerTarget, you must specify this argument. Documentation can be found at: AWS Predefined Scaling Metric Specification. Must be less than or equal to 1023 characters in length.
    predefinedMetricType String
    Metric type.
    resourceLabel String
    Reserved for future use if the predefined_metric_type is not ALBRequestCountPerTarget. If the predefined_metric_type is ALBRequestCountPerTarget, you must specify this argument. Documentation can be found at: AWS Predefined Scaling Metric Specification. Must be less than or equal to 1023 characters in length.

    Import

    Using pulumi import, import Application AutoScaling Policy using the service-namespace , resource-id, scalable-dimension and policy-name separated by /. For example:

    $ pulumi import aws:appautoscaling/policy:Policy test-policy service-namespace/resource-id/scalable-dimension/policy-name
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.8.0 published on Tuesday, Oct 7, 2025 by Pulumi
      AI Agentic Workflows: Register now