aws.autoscaling.Policy
Explore with Pulumi AI
Provides an AutoScaling Scaling Policy resource.
NOTE: You may want to omit
desired_capacity
attribute from attachedaws.autoscaling.Group
when using autoscaling policies. It’s good practice to pick either manual or dynamic (policy-based) scaling.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var bar = new Aws.AutoScaling.Group("bar", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
MaxSize = 5,
MinSize = 2,
HealthCheckGracePeriod = 300,
HealthCheckType = "ELB",
ForceDelete = true,
LaunchConfiguration = aws_launch_configuration.Foo.Name,
});
var bat = new Aws.AutoScaling.Policy("bat", new()
{
ScalingAdjustment = 4,
AdjustmentType = "ChangeInCapacity",
Cooldown = 300,
AutoscalingGroupName = bar.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
bar, err := autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
MaxSize: pulumi.Int(5),
MinSize: pulumi.Int(2),
HealthCheckGracePeriod: pulumi.Int(300),
HealthCheckType: pulumi.String("ELB"),
ForceDelete: pulumi.Bool(true),
LaunchConfiguration: pulumi.Any(aws_launch_configuration.Foo.Name),
})
if err != nil {
return err
}
_, err = autoscaling.NewPolicy(ctx, "bat", &autoscaling.PolicyArgs{
ScalingAdjustment: pulumi.Int(4),
AdjustmentType: pulumi.String("ChangeInCapacity"),
Cooldown: pulumi.Int(300),
AutoscalingGroupName: bar.Name,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.Policy;
import com.pulumi.aws.autoscaling.PolicyArgs;
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 bar = new Group("bar", GroupArgs.builder()
.availabilityZones("us-east-1a")
.maxSize(5)
.minSize(2)
.healthCheckGracePeriod(300)
.healthCheckType("ELB")
.forceDelete(true)
.launchConfiguration(aws_launch_configuration.foo().name())
.build());
var bat = new Policy("bat", PolicyArgs.builder()
.scalingAdjustment(4)
.adjustmentType("ChangeInCapacity")
.cooldown(300)
.autoscalingGroupName(bar.name())
.build());
}
}
import pulumi
import pulumi_aws as aws
bar = aws.autoscaling.Group("bar",
availability_zones=["us-east-1a"],
max_size=5,
min_size=2,
health_check_grace_period=300,
health_check_type="ELB",
force_delete=True,
launch_configuration=aws_launch_configuration["foo"]["name"])
bat = aws.autoscaling.Policy("bat",
scaling_adjustment=4,
adjustment_type="ChangeInCapacity",
cooldown=300,
autoscaling_group_name=bar.name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const bar = new aws.autoscaling.Group("bar", {
availabilityZones: ["us-east-1a"],
maxSize: 5,
minSize: 2,
healthCheckGracePeriod: 300,
healthCheckType: "ELB",
forceDelete: true,
launchConfiguration: aws_launch_configuration.foo.name,
});
const bat = new aws.autoscaling.Policy("bat", {
scalingAdjustment: 4,
adjustmentType: "ChangeInCapacity",
cooldown: 300,
autoscalingGroupName: bar.name,
});
resources:
bat:
type: aws:autoscaling:Policy
properties:
scalingAdjustment: 4
adjustmentType: ChangeInCapacity
cooldown: 300
autoscalingGroupName: ${bar.name}
bar:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
maxSize: 5
minSize: 2
healthCheckGracePeriod: 300
healthCheckType: ELB
forceDelete: true
launchConfiguration: ${aws_launch_configuration.foo.name}
Create target tarcking scaling policy using metric math
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AutoScaling.Policy("example", new()
{
AutoscalingGroupName = "my-test-asg",
PolicyType = "TargetTrackingScaling",
TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs
{
CustomizedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs
{
Metrics = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
{
Id = "m1",
Label = "Get the queue size (the number of messages waiting to be processed)",
MetricStat = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
{
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
{
Name = "QueueName",
Value = "my-queue",
},
},
MetricName = "ApproximateNumberOfMessagesVisible",
Namespace = "AWS/SQS",
},
Stat = "Sum",
},
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
{
Id = "m2",
Label = "Get the group size (the number of InService instances)",
MetricStat = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
{
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
{
Name = "AutoScalingGroupName",
Value = "my-asg",
},
},
MetricName = "GroupInServiceInstances",
Namespace = "AWS/AutoScaling",
},
Stat = "Average",
},
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
{
Expression = "m1 / m2",
Id = "e1",
Label = "Calculate the backlog per instance",
ReturnData = true,
},
},
},
TargetValue = 100,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{
AutoscalingGroupName: pulumi.String("my-test-asg"),
PolicyType: pulumi.String("TargetTrackingScaling"),
TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{
CustomizedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs{
Metrics: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs{
Id: pulumi.String("m1"),
Label: pulumi.String("Get the queue size (the number of messages waiting to be processed)"),
MetricStat: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
Metric: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
Dimensions: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
Name: pulumi.String("QueueName"),
Value: pulumi.String("my-queue"),
},
},
MetricName: pulumi.String("ApproximateNumberOfMessagesVisible"),
Namespace: pulumi.String("AWS/SQS"),
},
Stat: pulumi.String("Sum"),
},
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs{
Id: pulumi.String("m2"),
Label: pulumi.String("Get the group size (the number of InService instances)"),
MetricStat: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
Metric: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
Dimensions: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
Name: pulumi.String("AutoScalingGroupName"),
Value: pulumi.String("my-asg"),
},
},
MetricName: pulumi.String("GroupInServiceInstances"),
Namespace: pulumi.String("AWS/AutoScaling"),
},
Stat: pulumi.String("Average"),
},
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs{
Expression: pulumi.String("m1 / m2"),
Id: pulumi.String("e1"),
Label: pulumi.String("Calculate the backlog per instance"),
ReturnData: pulumi.Bool(true),
},
},
},
TargetValue: pulumi.Float64(100),
},
})
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.autoscaling.Policy;
import com.pulumi.aws.autoscaling.PolicyArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyTargetTrackingConfigurationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs;
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()
.autoscalingGroupName("my-test-asg")
.policyType("TargetTrackingScaling")
.targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder()
.customizedMetricSpecification(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs.builder()
.metrics(
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs.builder()
.id("m1")
.label("Get the queue size (the number of messages waiting to be processed)")
.metricStat(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
.metric(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
.dimensions(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
.name("QueueName")
.value("my-queue")
.build())
.metricName("ApproximateNumberOfMessagesVisible")
.namespace("AWS/SQS")
.build())
.stat("Sum")
.build())
.returnData(false)
.build(),
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs.builder()
.id("m2")
.label("Get the group size (the number of InService instances)")
.metricStat(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
.metric(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
.dimensions(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
.name("AutoScalingGroupName")
.value("my-asg")
.build())
.metricName("GroupInServiceInstances")
.namespace("AWS/AutoScaling")
.build())
.stat("Average")
.build())
.returnData(false)
.build(),
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs.builder()
.expression("m1 / m2")
.id("e1")
.label("Calculate the backlog per instance")
.returnData(true)
.build())
.build())
.targetValue(100)
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.autoscaling.Policy("example",
autoscaling_group_name="my-test-asg",
policy_type="TargetTrackingScaling",
target_tracking_configuration=aws.autoscaling.PolicyTargetTrackingConfigurationArgs(
customized_metric_specification=aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs(
metrics=[
aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs(
id="m1",
label="Get the queue size (the number of messages waiting to be processed)",
metric_stat=aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs(
metric=aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs(
dimensions=[aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs(
name="QueueName",
value="my-queue",
)],
metric_name="ApproximateNumberOfMessagesVisible",
namespace="AWS/SQS",
),
stat="Sum",
),
return_data=False,
),
aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs(
id="m2",
label="Get the group size (the number of InService instances)",
metric_stat=aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs(
metric=aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs(
dimensions=[aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs(
name="AutoScalingGroupName",
value="my-asg",
)],
metric_name="GroupInServiceInstances",
namespace="AWS/AutoScaling",
),
stat="Average",
),
return_data=False,
),
aws.autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs(
expression="m1 / m2",
id="e1",
label="Calculate the backlog per instance",
return_data=True,
),
],
),
target_value=100,
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {
autoscalingGroupName: "my-test-asg",
policyType: "TargetTrackingScaling",
targetTrackingConfiguration: {
customizedMetricSpecification: {
metrics: [
{
id: "m1",
label: "Get the queue size (the number of messages waiting to be processed)",
metricStat: {
metric: {
dimensions: [{
name: "QueueName",
value: "my-queue",
}],
metricName: "ApproximateNumberOfMessagesVisible",
namespace: "AWS/SQS",
},
stat: "Sum",
},
returnData: false,
},
{
id: "m2",
label: "Get the group size (the number of InService instances)",
metricStat: {
metric: {
dimensions: [{
name: "AutoScalingGroupName",
value: "my-asg",
}],
metricName: "GroupInServiceInstances",
namespace: "AWS/AutoScaling",
},
stat: "Average",
},
returnData: false,
},
{
expression: "m1 / m2",
id: "e1",
label: "Calculate the backlog per instance",
returnData: true,
},
],
},
targetValue: 100,
},
});
resources:
example:
type: aws:autoscaling:Policy
properties:
autoscalingGroupName: my-test-asg
policyType: TargetTrackingScaling
targetTrackingConfiguration:
customizedMetricSpecification:
metrics:
- id: m1
label: Get the queue size (the number of messages waiting to be processed)
metricStat:
metric:
dimensions:
- name: QueueName
value: my-queue
metricName: ApproximateNumberOfMessagesVisible
namespace: AWS/SQS
stat: Sum
returnData: false
- id: m2
label: Get the group size (the number of InService instances)
metricStat:
metric:
dimensions:
- name: AutoScalingGroupName
value: my-asg
metricName: GroupInServiceInstances
namespace: AWS/AutoScaling
stat: Average
returnData: false
- expression: m1 / m2
id: e1
label: Calculate the backlog per instance
returnData: true
targetValue: 100
Create predictive scaling policy using customized metrics
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AutoScaling.Policy("example", new()
{
AutoscalingGroupName = "my-test-asg",
PolicyType = "PredictiveScaling",
PredictiveScalingConfiguration = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationArgs
{
MetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationArgs
{
CustomizedCapacityMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs
{
Expression = "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
Id = "capacity_sum",
},
},
},
CustomizedLoadMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs
{
Expression = "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))",
Id = "load_sum",
},
},
},
CustomizedScalingMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Expression = "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
Id = "capacity_sum",
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Expression = "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))",
Id = "load_sum",
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Expression = "load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)",
Id = "weighted_average",
},
},
},
TargetValue = 10,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{
AutoscalingGroupName: pulumi.String("my-test-asg"),
PolicyType: pulumi.String("PredictiveScaling"),
PredictiveScalingConfiguration: &autoscaling.PolicyPredictiveScalingConfigurationArgs{
MetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationArgs{
CustomizedCapacityMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs{
Expression: pulumi.String("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))"),
Id: pulumi.String("capacity_sum"),
},
},
},
CustomizedLoadMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs{
Expression: pulumi.String("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))"),
Id: pulumi.String("load_sum"),
},
},
},
CustomizedScalingMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Expression: pulumi.String("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))"),
Id: pulumi.String("capacity_sum"),
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Expression: pulumi.String("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))"),
Id: pulumi.String("load_sum"),
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Expression: pulumi.String("load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)"),
Id: pulumi.String("weighted_average"),
},
},
},
TargetValue: pulumi.Float64(10),
},
},
})
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.autoscaling.Policy;
import com.pulumi.aws.autoscaling.PolicyArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs;
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()
.autoscalingGroupName("my-test-asg")
.policyType("PredictiveScaling")
.predictiveScalingConfiguration(PolicyPredictiveScalingConfigurationArgs.builder()
.metricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationArgs.builder()
.customizedCapacityMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs.builder()
.expression("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))")
.id("capacity_sum")
.build())
.build())
.customizedLoadMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs.builder()
.expression("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))")
.id("load_sum")
.build())
.build())
.customizedScalingMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs.builder()
.metricDataQueries(
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.expression("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))")
.id("capacity_sum")
.returnData(false)
.build(),
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.expression("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))")
.id("load_sum")
.returnData(false)
.build(),
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.expression("load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)")
.id("weighted_average")
.build())
.build())
.targetValue(10)
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.autoscaling.Policy("example",
autoscaling_group_name="my-test-asg",
policy_type="PredictiveScaling",
predictive_scaling_configuration=aws.autoscaling.PolicyPredictiveScalingConfigurationArgs(
metric_specification=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationArgs(
customized_capacity_metric_specification=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs(
metric_data_queries=[aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs(
expression="SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
id="capacity_sum",
)],
),
customized_load_metric_specification=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs(
metric_data_queries=[aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs(
expression="SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))",
id="load_sum",
)],
),
customized_scaling_metric_specification=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs(
metric_data_queries=[
aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs(
expression="SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
id="capacity_sum",
return_data=False,
),
aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs(
expression="SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))",
id="load_sum",
return_data=False,
),
aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs(
expression="load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)",
id="weighted_average",
),
],
),
target_value=10,
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {
autoscalingGroupName: "my-test-asg",
policyType: "PredictiveScaling",
predictiveScalingConfiguration: {
metricSpecification: {
customizedCapacityMetricSpecification: {
metricDataQueries: [{
expression: "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
id: "capacity_sum",
}],
},
customizedLoadMetricSpecification: {
metricDataQueries: [{
expression: "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))",
id: "load_sum",
}],
},
customizedScalingMetricSpecification: {
metricDataQueries: [
{
expression: "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
id: "capacity_sum",
returnData: false,
},
{
expression: "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))",
id: "load_sum",
returnData: false,
},
{
expression: "load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)",
id: "weighted_average",
},
],
},
targetValue: 10,
},
},
});
resources:
example:
type: aws:autoscaling:Policy
properties:
autoscalingGroupName: my-test-asg
policyType: PredictiveScaling
predictiveScalingConfiguration:
metricSpecification:
customizedCapacityMetricSpecification:
metricDataQueries:
- expression: SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName="GroupInServiceIntances" my-test-asg', 'Average', 300))
id: capacity_sum
customizedLoadMetricSpecification:
metricDataQueries:
- expression: SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName="CPUUtilization" my-test-asg', 'Sum', 3600))
id: load_sum
customizedScalingMetricSpecification:
metricDataQueries:
- expression: SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName="GroupInServiceIntances" my-test-asg', 'Average', 300))
id: capacity_sum
returnData: false
- expression: SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName="CPUUtilization" my-test-asg', 'Sum', 300))
id: load_sum
returnData: false
- expression: load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)
id: weighted_average
targetValue: 10
Create predictive scaling policy using customized scaling and predefined load metric
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AutoScaling.Policy("example", new()
{
AutoscalingGroupName = "my-test-asg",
PolicyType = "PredictiveScaling",
PredictiveScalingConfiguration = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationArgs
{
MetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationArgs
{
CustomizedScalingMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Id = "scaling",
MetricStat = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs
{
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
{
Name = "AutoScalingGroupName",
Value = "my-test-asg",
},
},
MetricName = "CPUUtilization",
Namespace = "AWS/EC2",
},
Stat = "Average",
},
},
},
},
PredefinedLoadMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs
{
PredefinedMetricType = "ASGTotalCPUUtilization",
ResourceLabel = "testLabel",
},
TargetValue = 10,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{
AutoscalingGroupName: pulumi.String("my-test-asg"),
PolicyType: pulumi.String("PredictiveScaling"),
PredictiveScalingConfiguration: &autoscaling.PolicyPredictiveScalingConfigurationArgs{
MetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationArgs{
CustomizedScalingMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("scaling"),
MetricStat: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs{
Metric: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs{
Dimensions: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
Name: pulumi.String("AutoScalingGroupName"),
Value: pulumi.String("my-test-asg"),
},
},
MetricName: pulumi.String("CPUUtilization"),
Namespace: pulumi.String("AWS/EC2"),
},
Stat: pulumi.String("Average"),
},
},
},
},
PredefinedLoadMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs{
PredefinedMetricType: pulumi.String("ASGTotalCPUUtilization"),
ResourceLabel: pulumi.String("testLabel"),
},
TargetValue: pulumi.Float64(10),
},
},
})
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.autoscaling.Policy;
import com.pulumi.aws.autoscaling.PolicyArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs;
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()
.autoscalingGroupName("my-test-asg")
.policyType("PredictiveScaling")
.predictiveScalingConfiguration(PolicyPredictiveScalingConfigurationArgs.builder()
.metricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationArgs.builder()
.customizedScalingMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.id("scaling")
.metricStat(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs.builder()
.metric(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
.dimensions(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
.name("AutoScalingGroupName")
.value("my-test-asg")
.build())
.metricName("CPUUtilization")
.namespace("AWS/EC2")
.build())
.stat("Average")
.build())
.build())
.build())
.predefinedLoadMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs.builder()
.predefinedMetricType("ASGTotalCPUUtilization")
.resourceLabel("testLabel")
.build())
.targetValue(10)
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.autoscaling.Policy("example",
autoscaling_group_name="my-test-asg",
policy_type="PredictiveScaling",
predictive_scaling_configuration=aws.autoscaling.PolicyPredictiveScalingConfigurationArgs(
metric_specification=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationArgs(
customized_scaling_metric_specification=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs(
metric_data_queries=[aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs(
id="scaling",
metric_stat=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs(
metric=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs(
dimensions=[aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs(
name="AutoScalingGroupName",
value="my-test-asg",
)],
metric_name="CPUUtilization",
namespace="AWS/EC2",
),
stat="Average",
),
)],
),
predefined_load_metric_specification=aws.autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs(
predefined_metric_type="ASGTotalCPUUtilization",
resource_label="testLabel",
),
target_value=10,
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {
autoscalingGroupName: "my-test-asg",
policyType: "PredictiveScaling",
predictiveScalingConfiguration: {
metricSpecification: {
customizedScalingMetricSpecification: {
metricDataQueries: [{
id: "scaling",
metricStat: {
metric: {
dimensions: [{
name: "AutoScalingGroupName",
value: "my-test-asg",
}],
metricName: "CPUUtilization",
namespace: "AWS/EC2",
},
stat: "Average",
},
}],
},
predefinedLoadMetricSpecification: {
predefinedMetricType: "ASGTotalCPUUtilization",
resourceLabel: "testLabel",
},
targetValue: 10,
},
},
});
resources:
example:
type: aws:autoscaling:Policy
properties:
autoscalingGroupName: my-test-asg
policyType: PredictiveScaling
predictiveScalingConfiguration:
metricSpecification:
customizedScalingMetricSpecification:
metricDataQueries:
- id: scaling
metricStat:
metric:
dimensions:
- name: AutoScalingGroupName
value: my-test-asg
metricName: CPUUtilization
namespace: AWS/EC2
stat: Average
predefinedLoadMetricSpecification:
predefinedMetricType: ASGTotalCPUUtilization
resourceLabel: testLabel
targetValue: 10
Create Policy Resource
new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
@overload
def Policy(resource_name: str,
opts: Optional[ResourceOptions] = None,
adjustment_type: Optional[str] = None,
autoscaling_group_name: Optional[str] = None,
cooldown: Optional[int] = None,
enabled: Optional[bool] = None,
estimated_instance_warmup: Optional[int] = None,
metric_aggregation_type: Optional[str] = None,
min_adjustment_magnitude: Optional[int] = None,
name: Optional[str] = None,
policy_type: Optional[str] = None,
predictive_scaling_configuration: Optional[PolicyPredictiveScalingConfigurationArgs] = None,
scaling_adjustment: Optional[int] = None,
step_adjustments: Optional[Sequence[PolicyStepAdjustmentArgs]] = None,
target_tracking_configuration: Optional[PolicyTargetTrackingConfigurationArgs] = None)
@overload
def Policy(resource_name: str,
args: PolicyArgs,
opts: Optional[ResourceOptions] = None)
func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: aws:autoscaling:Policy
properties: # The arguments to resource properties.
options: # 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.
- 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.
Policy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Policy resource accepts the following input properties:
- Autoscaling
Group stringName Name of the autoscaling group.
- Adjustment
Type string Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- Cooldown int
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- Enabled bool
Whether the scaling policy is enabled or disabled. Default:
true
.- Estimated
Instance intWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- Metric
Aggregation stringType 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 intMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- Name string
Name of the policy.
- Policy
Type string Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- Predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- 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.
- Step
Adjustments List<PolicyStep Adjustment Args> Set of adjustments that manage group scaling. These have the following structure:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- Autoscaling
Group stringName Name of the autoscaling group.
- Adjustment
Type string Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- Cooldown int
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- Enabled bool
Whether the scaling policy is enabled or disabled. Default:
true
.- Estimated
Instance intWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- Metric
Aggregation stringType 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 intMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- Name string
Name of the policy.
- Policy
Type string Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- Predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- 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.
- Step
Adjustments []PolicyStep Adjustment Args Set of adjustments that manage group scaling. These have the following structure:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- autoscaling
Group StringName Name of the autoscaling group.
- adjustment
Type String Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- cooldown Integer
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled Boolean
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated
Instance IntegerWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric
Aggregation StringType 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 IntegerMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name String
Name of the policy.
- policy
Type String Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- scaling
Adjustment Integer Number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
- step
Adjustments List<PolicyStep Adjustment Args> Set of adjustments that manage group scaling. These have the following structure:
- target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- autoscaling
Group stringName Name of the autoscaling group.
- adjustment
Type string Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- cooldown number
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled boolean
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated
Instance numberWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric
Aggregation stringType 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 numberMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name string
Name of the policy.
- policy
Type string Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- scaling
Adjustment number Number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
- step
Adjustments PolicyStep Adjustment Args[] Set of adjustments that manage group scaling. These have the following structure:
- target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- autoscaling_
group_ strname Name of the autoscaling group.
- adjustment_
type str Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- cooldown int
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled bool
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated_
instance_ intwarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric_
aggregation_ strtype 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_ intmagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name str
Name of the policy.
- policy_
type str Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive_
scaling_ Policyconfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- 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.
- step_
adjustments Sequence[PolicyStep Adjustment Args] Set of adjustments that manage group scaling. These have the following structure:
- target_
tracking_ Policyconfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- autoscaling
Group StringName Name of the autoscaling group.
- adjustment
Type String Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- cooldown Number
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled Boolean
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated
Instance NumberWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric
Aggregation StringType 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 NumberMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name String
Name of the policy.
- policy
Type String Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive
Scaling Property MapConfiguration Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- scaling
Adjustment Number Number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
- step
Adjustments List<Property Map> Set of adjustments that manage group scaling. These have the following structure:
- target
Tracking Property MapConfiguration Target tracking policy. These have the following structure:
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
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,
adjustment_type: Optional[str] = None,
arn: Optional[str] = None,
autoscaling_group_name: Optional[str] = None,
cooldown: Optional[int] = None,
enabled: Optional[bool] = None,
estimated_instance_warmup: Optional[int] = None,
metric_aggregation_type: Optional[str] = None,
min_adjustment_magnitude: Optional[int] = None,
name: Optional[str] = None,
policy_type: Optional[str] = None,
predictive_scaling_configuration: Optional[PolicyPredictiveScalingConfigurationArgs] = None,
scaling_adjustment: Optional[int] = None,
step_adjustments: Optional[Sequence[PolicyStepAdjustmentArgs]] = None,
target_tracking_configuration: Optional[PolicyTargetTrackingConfigurationArgs] = None) -> Policy
func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Adjustment
Type string Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- Arn string
ARN assigned by AWS to the scaling policy.
- Autoscaling
Group stringName Name of the autoscaling group.
- Cooldown int
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- Enabled bool
Whether the scaling policy is enabled or disabled. Default:
true
.- Estimated
Instance intWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- Metric
Aggregation stringType 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 intMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- Name string
Name of the policy.
- Policy
Type string Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- Predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- 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.
- Step
Adjustments List<PolicyStep Adjustment Args> Set of adjustments that manage group scaling. These have the following structure:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- Adjustment
Type string Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- Arn string
ARN assigned by AWS to the scaling policy.
- Autoscaling
Group stringName Name of the autoscaling group.
- Cooldown int
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- Enabled bool
Whether the scaling policy is enabled or disabled. Default:
true
.- Estimated
Instance intWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- Metric
Aggregation stringType 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 intMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- Name string
Name of the policy.
- Policy
Type string Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- Predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- 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.
- Step
Adjustments []PolicyStep Adjustment Args Set of adjustments that manage group scaling. These have the following structure:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- adjustment
Type String Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- arn String
ARN assigned by AWS to the scaling policy.
- autoscaling
Group StringName Name of the autoscaling group.
- cooldown Integer
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled Boolean
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated
Instance IntegerWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric
Aggregation StringType 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 IntegerMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name String
Name of the policy.
- policy
Type String Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- scaling
Adjustment Integer Number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
- step
Adjustments List<PolicyStep Adjustment Args> Set of adjustments that manage group scaling. These have the following structure:
- target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- adjustment
Type string Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- arn string
ARN assigned by AWS to the scaling policy.
- autoscaling
Group stringName Name of the autoscaling group.
- cooldown number
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled boolean
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated
Instance numberWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric
Aggregation stringType 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 numberMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name string
Name of the policy.
- policy
Type string Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive
Scaling PolicyConfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- scaling
Adjustment number Number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
- step
Adjustments PolicyStep Adjustment Args[] Set of adjustments that manage group scaling. These have the following structure:
- target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- adjustment_
type str Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- arn str
ARN assigned by AWS to the scaling policy.
- autoscaling_
group_ strname Name of the autoscaling group.
- cooldown int
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled bool
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated_
instance_ intwarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric_
aggregation_ strtype 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_ intmagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name str
Name of the policy.
- policy_
type str Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive_
scaling_ Policyconfiguration Predictive Scaling Configuration Args Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- 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.
- step_
adjustments Sequence[PolicyStep Adjustment Args] Set of adjustments that manage group scaling. These have the following structure:
- target_
tracking_ Policyconfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
- adjustment
Type String Whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.- arn String
ARN assigned by AWS to the scaling policy.
- autoscaling
Group StringName Name of the autoscaling group.
- cooldown Number
Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
- enabled Boolean
Whether the scaling policy is enabled or disabled. Default:
true
.- estimated
Instance NumberWarmup Estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period.
- metric
Aggregation StringType 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 NumberMagnitude Minimum value to scale by when
adjustment_type
is set toPercentChangeInCapacity
.- name String
Name of the policy.
- policy
Type String Policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "PredictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling."
- predictive
Scaling Property MapConfiguration Predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- scaling
Adjustment Number Number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
- step
Adjustments List<Property Map> Set of adjustments that manage group scaling. These have the following structure:
- target
Tracking Property MapConfiguration Target tracking policy. These have the following structure:
Supporting Types
PolicyPredictiveScalingConfiguration
- Metric
Specification PolicyPredictive Scaling Configuration Metric Specification This structure includes the metrics and target utilization to use for predictive scaling.
- Max
Capacity stringBreach Behavior Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are
HonorMaxCapacity
orIncreaseMaxCapacity
. Default isHonorMaxCapacity
.- Max
Capacity stringBuffer Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is
0
to100
. If set to0
, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.- Mode string
Predictive scaling mode. Valid values are
ForecastAndScale
andForecastOnly
. Default isForecastOnly
.- Scheduling
Buffer stringTime Amount of time, in seconds, by which the instance launch time can be advanced. Minimum is
0
.
- Metric
Specification PolicyPredictive Scaling Configuration Metric Specification This structure includes the metrics and target utilization to use for predictive scaling.
- Max
Capacity stringBreach Behavior Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are
HonorMaxCapacity
orIncreaseMaxCapacity
. Default isHonorMaxCapacity
.- Max
Capacity stringBuffer Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is
0
to100
. If set to0
, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.- Mode string
Predictive scaling mode. Valid values are
ForecastAndScale
andForecastOnly
. Default isForecastOnly
.- Scheduling
Buffer stringTime Amount of time, in seconds, by which the instance launch time can be advanced. Minimum is
0
.
- metric
Specification PolicyPredictive Scaling Configuration Metric Specification This structure includes the metrics and target utilization to use for predictive scaling.
- max
Capacity StringBreach Behavior Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are
HonorMaxCapacity
orIncreaseMaxCapacity
. Default isHonorMaxCapacity
.- max
Capacity StringBuffer Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is
0
to100
. If set to0
, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.- mode String
Predictive scaling mode. Valid values are
ForecastAndScale
andForecastOnly
. Default isForecastOnly
.- scheduling
Buffer StringTime Amount of time, in seconds, by which the instance launch time can be advanced. Minimum is
0
.
- metric
Specification PolicyPredictive Scaling Configuration Metric Specification This structure includes the metrics and target utilization to use for predictive scaling.
- max
Capacity stringBreach Behavior Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are
HonorMaxCapacity
orIncreaseMaxCapacity
. Default isHonorMaxCapacity
.- max
Capacity stringBuffer Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is
0
to100
. If set to0
, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.- mode string
Predictive scaling mode. Valid values are
ForecastAndScale
andForecastOnly
. Default isForecastOnly
.- scheduling
Buffer stringTime Amount of time, in seconds, by which the instance launch time can be advanced. Minimum is
0
.
- metric_
specification PolicyPredictive Scaling Configuration Metric Specification This structure includes the metrics and target utilization to use for predictive scaling.
- max_
capacity_ strbreach_ behavior Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are
HonorMaxCapacity
orIncreaseMaxCapacity
. Default isHonorMaxCapacity
.- max_
capacity_ strbuffer Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is
0
to100
. If set to0
, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.- mode str
Predictive scaling mode. Valid values are
ForecastAndScale
andForecastOnly
. Default isForecastOnly
.- scheduling_
buffer_ strtime Amount of time, in seconds, by which the instance launch time can be advanced. Minimum is
0
.
- metric
Specification Property Map This structure includes the metrics and target utilization to use for predictive scaling.
- max
Capacity StringBreach Behavior Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Valid values are
HonorMaxCapacity
orIncreaseMaxCapacity
. Default isHonorMaxCapacity
.- max
Capacity StringBuffer Size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. Valid range is
0
to100
. If set to0
, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.- mode String
Predictive scaling mode. Valid values are
ForecastAndScale
andForecastOnly
. Default isForecastOnly
.- scheduling
Buffer StringTime Amount of time, in seconds, by which the instance launch time can be advanced. Minimum is
0
.
PolicyPredictiveScalingConfigurationMetricSpecification
- Target
Value double Target value for the metric.
- Customized
Capacity PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Customized capacity metric specification. The field is only valid when you use
customized_load_metric_specification
- Customized
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Customized load metric specification.
- Customized
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Customized scaling metric specification.
- Predefined
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Load Metric Specification Predefined load metric specification.
- Predefined
Metric PolicyPair Specification Predictive Scaling Configuration Metric Specification Predefined Metric Pair Specification Metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
- Predefined
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Scaling Metric Specification Predefined scaling metric specification.
- Target
Value float64 Target value for the metric.
- Customized
Capacity PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Customized capacity metric specification. The field is only valid when you use
customized_load_metric_specification
- Customized
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Customized load metric specification.
- Customized
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Customized scaling metric specification.
- Predefined
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Load Metric Specification Predefined load metric specification.
- Predefined
Metric PolicyPair Specification Predictive Scaling Configuration Metric Specification Predefined Metric Pair Specification Metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
- Predefined
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Scaling Metric Specification Predefined scaling metric specification.
- target
Value Double Target value for the metric.
- customized
Capacity PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Customized capacity metric specification. The field is only valid when you use
customized_load_metric_specification
- customized
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Customized load metric specification.
- customized
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Customized scaling metric specification.
- predefined
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Load Metric Specification Predefined load metric specification.
- predefined
Metric PolicyPair Specification Predictive Scaling Configuration Metric Specification Predefined Metric Pair Specification Metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
- predefined
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Scaling Metric Specification Predefined scaling metric specification.
- target
Value number Target value for the metric.
- customized
Capacity PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Customized capacity metric specification. The field is only valid when you use
customized_load_metric_specification
- customized
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Customized load metric specification.
- customized
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Customized scaling metric specification.
- predefined
Load PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Load Metric Specification Predefined load metric specification.
- predefined
Metric PolicyPair Specification Predictive Scaling Configuration Metric Specification Predefined Metric Pair Specification Metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
- predefined
Scaling PolicyMetric Specification Predictive Scaling Configuration Metric Specification Predefined Scaling Metric Specification Predefined scaling metric specification.
- target_
value float Target value for the metric.
- customized_
capacity_ Policymetric_ specification Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Customized capacity metric specification. The field is only valid when you use
customized_load_metric_specification
- customized_
load_ Policymetric_ specification Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Customized load metric specification.
- customized_
scaling_ Policymetric_ specification Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Customized scaling metric specification.
- predefined_
load_ Policymetric_ specification Predictive Scaling Configuration Metric Specification Predefined Load Metric Specification Predefined load metric specification.
- predefined_
metric_ Policypair_ specification Predictive Scaling Configuration Metric Specification Predefined Metric Pair Specification Metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
- predefined_
scaling_ Policymetric_ specification Predictive Scaling Configuration Metric Specification Predefined Scaling Metric Specification Predefined scaling metric specification.
- target
Value Number Target value for the metric.
- customized
Capacity Property MapMetric Specification Customized capacity metric specification. The field is only valid when you use
customized_load_metric_specification
- customized
Load Property MapMetric Specification Customized load metric specification.
- customized
Scaling Property MapMetric Specification Customized scaling metric specification.
- predefined
Load Property MapMetric Specification Predefined load metric specification.
- predefined
Metric Property MapPair Specification Metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
- predefined
Scaling Property MapMetric Specification Predefined scaling metric specification.
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecification
- Metric
Data List<PolicyQueries Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query> List of up to 10 structures that defines custom capacity metric in predictive scaling policy
- Metric
Data []PolicyQueries Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query List of up to 10 structures that defines custom capacity metric in predictive scaling policy
- metric
Data List<PolicyQueries Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query> List of up to 10 structures that defines custom capacity metric in predictive scaling policy
- metric
Data PolicyQueries Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query[] List of up to 10 structures that defines custom capacity metric in predictive scaling policy
- metric_
data_ Sequence[Policyqueries Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query] List of up to 10 structures that defines custom capacity metric in predictive scaling policy
- metric
Data List<Property Map>Queries List of up to 10 structures that defines custom capacity metric in predictive scaling policy
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQuery
- Id string
Short name for the metric used in predictive scaling policy.
- Expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- Expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- expression String
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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 predictive scaling policy.
- expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label string
Human-readable label for this metric or expression.
- metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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 predictive scaling policy.
- expression str
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label str
Human-readable label for this metric or expression.
- metric_
stat PolicyPredictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- expression String
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat Property Map Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data Boolean Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStat
- Metric
Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric 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.
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetric
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
List<Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric Dimension> Dimensions of the metric.
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
[]Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric Dimension Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions
List<Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric Dimension> Dimensions of the metric.
- metric
Name string Name of the metric.
- namespace string
Namespace of the metric.
- dimensions
Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric Dimension[] Dimensions of the metric.
- metric_
name str Name of the metric.
- namespace str
Namespace of the metric.
- dimensions
Sequence[Policy
Predictive Scaling Configuration Metric Specification Customized Capacity Metric Specification Metric Data Query Metric Stat Metric Dimension] Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions List<Property Map>
Dimensions of the metric.
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimension
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecification
- Metric
Data List<PolicyQueries Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query> List of up to 10 structures that defines custom load metric in predictive scaling policy
- Metric
Data []PolicyQueries Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query List of up to 10 structures that defines custom load metric in predictive scaling policy
- metric
Data List<PolicyQueries Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query> List of up to 10 structures that defines custom load metric in predictive scaling policy
- metric
Data PolicyQueries Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query[] List of up to 10 structures that defines custom load metric in predictive scaling policy
- metric_
data_ Sequence[Policyqueries Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query] List of up to 10 structures that defines custom load metric in predictive scaling policy
- metric
Data List<Property Map>Queries List of up to 10 structures that defines custom load metric in predictive scaling policy
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQuery
- Id string
Short name for the metric used in predictive scaling policy.
- Expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- Expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- expression String
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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 predictive scaling policy.
- expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label string
Human-readable label for this metric or expression.
- metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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 predictive scaling policy.
- expression str
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label str
Human-readable label for this metric or expression.
- metric_
stat PolicyPredictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- expression String
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat Property Map Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data Boolean Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStat
- Metric
Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric 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.
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetric
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
List<Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric Dimension> Dimensions of the metric.
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
[]Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric Dimension Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions
List<Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric Dimension> Dimensions of the metric.
- metric
Name string Name of the metric.
- namespace string
Namespace of the metric.
- dimensions
Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric Dimension[] Dimensions of the metric.
- metric_
name str Name of the metric.
- namespace str
Namespace of the metric.
- dimensions
Sequence[Policy
Predictive Scaling Configuration Metric Specification Customized Load Metric Specification Metric Data Query Metric Stat Metric Dimension] Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions List<Property Map>
Dimensions of the metric.
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimension
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecification
- Metric
Data List<PolicyQueries Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query> List of up to 10 structures that defines custom scaling metric in predictive scaling policy
- Metric
Data []PolicyQueries Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query List of up to 10 structures that defines custom scaling metric in predictive scaling policy
- metric
Data List<PolicyQueries Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query> List of up to 10 structures that defines custom scaling metric in predictive scaling policy
- metric
Data PolicyQueries Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query[] List of up to 10 structures that defines custom scaling metric in predictive scaling policy
- metric_
data_ Sequence[Policyqueries Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query] List of up to 10 structures that defines custom scaling metric in predictive scaling policy
- metric
Data List<Property Map>Queries List of up to 10 structures that defines custom scaling metric in predictive scaling policy
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQuery
- Id string
Short name for the metric used in predictive scaling policy.
- Expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- Expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- expression String
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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 predictive scaling policy.
- expression string
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label string
Human-readable label for this metric or expression.
- metric
Stat PolicyPredictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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 predictive scaling policy.
- expression str
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label str
Human-readable label for this metric or expression.
- metric_
stat PolicyPredictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_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 predictive scaling policy.
- expression String
Math expression used on the returned metric. You must specify either
expression
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat Property Map Structure that defines CloudWatch metric to be used in predictive scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data Boolean Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStat
- Metric
Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric 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
Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric 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.
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetric
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
List<Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric Dimension> Dimensions of the metric.
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
[]Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric Dimension Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions
List<Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric Dimension> Dimensions of the metric.
- metric
Name string Name of the metric.
- namespace string
Namespace of the metric.
- dimensions
Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric Dimension[] Dimensions of the metric.
- metric_
name str Name of the metric.
- namespace str
Namespace of the metric.
- dimensions
Sequence[Policy
Predictive Scaling Configuration Metric Specification Customized Scaling Metric Specification Metric Data Query Metric Stat Metric Dimension] Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions List<Property Map>
Dimensions of the metric.
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimension
PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification
- Predefined
Metric stringType Metric type. Valid values are
ASGTotalCPUUtilization
,ASGTotalNetworkIn
,ASGTotalNetworkOut
, orALBTargetGroupRequestCount
.- Resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- Predefined
Metric stringType Metric type. Valid values are
ASGTotalCPUUtilization
,ASGTotalNetworkIn
,ASGTotalNetworkOut
, orALBTargetGroupRequestCount
.- Resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric StringType Metric type. Valid values are
ASGTotalCPUUtilization
,ASGTotalNetworkIn
,ASGTotalNetworkOut
, orALBTargetGroupRequestCount
.- resource
Label String Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric stringType Metric type. Valid values are
ASGTotalCPUUtilization
,ASGTotalNetworkIn
,ASGTotalNetworkOut
, orALBTargetGroupRequestCount
.- resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined_
metric_ strtype Metric type. Valid values are
ASGTotalCPUUtilization
,ASGTotalNetworkIn
,ASGTotalNetworkOut
, orALBTargetGroupRequestCount
.- resource_
label str Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric StringType Metric type. Valid values are
ASGTotalCPUUtilization
,ASGTotalNetworkIn
,ASGTotalNetworkOut
, orALBTargetGroupRequestCount
.- resource
Label String Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification
- Predefined
Metric stringType 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. For example, if the metric type is
ASGCPUUtilization
, the Auto Scaling group's total CPU metric is used as the load metric, and the average CPU metric is used for the scaling metric. Valid values areASGCPUUtilization
,ASGNetworkIn
,ASGNetworkOut
, orALBRequestCount
.- Resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- Predefined
Metric stringType 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. For example, if the metric type is
ASGCPUUtilization
, the Auto Scaling group's total CPU metric is used as the load metric, and the average CPU metric is used for the scaling metric. Valid values areASGCPUUtilization
,ASGNetworkIn
,ASGNetworkOut
, orALBRequestCount
.- Resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric StringType 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. For example, if the metric type is
ASGCPUUtilization
, the Auto Scaling group's total CPU metric is used as the load metric, and the average CPU metric is used for the scaling metric. Valid values areASGCPUUtilization
,ASGNetworkIn
,ASGNetworkOut
, orALBRequestCount
.- resource
Label String Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric stringType 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. For example, if the metric type is
ASGCPUUtilization
, the Auto Scaling group's total CPU metric is used as the load metric, and the average CPU metric is used for the scaling metric. Valid values areASGCPUUtilization
,ASGNetworkIn
,ASGNetworkOut
, orALBRequestCount
.- resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined_
metric_ strtype 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. For example, if the metric type is
ASGCPUUtilization
, the Auto Scaling group's total CPU metric is used as the load metric, and the average CPU metric is used for the scaling metric. Valid values areASGCPUUtilization
,ASGNetworkIn
,ASGNetworkOut
, orALBRequestCount
.- resource_
label str Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric StringType 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. For example, if the metric type is
ASGCPUUtilization
, the Auto Scaling group's total CPU metric is used as the load metric, and the average CPU metric is used for the scaling metric. Valid values areASGCPUUtilization
,ASGNetworkIn
,ASGNetworkOut
, orALBRequestCount
.- resource
Label String Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification
- Predefined
Metric stringType Describes a scaling metric for a predictive scaling policy. Valid values are
ASGAverageCPUUtilization
,ASGAverageNetworkIn
,ASGAverageNetworkOut
, orALBRequestCountPerTarget
.- Resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- Predefined
Metric stringType Describes a scaling metric for a predictive scaling policy. Valid values are
ASGAverageCPUUtilization
,ASGAverageNetworkIn
,ASGAverageNetworkOut
, orALBRequestCountPerTarget
.- Resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric StringType Describes a scaling metric for a predictive scaling policy. Valid values are
ASGAverageCPUUtilization
,ASGAverageNetworkIn
,ASGAverageNetworkOut
, orALBRequestCountPerTarget
.- resource
Label String Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric stringType Describes a scaling metric for a predictive scaling policy. Valid values are
ASGAverageCPUUtilization
,ASGAverageNetworkIn
,ASGAverageNetworkOut
, orALBRequestCountPerTarget
.- resource
Label string Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined_
metric_ strtype Describes a scaling metric for a predictive scaling policy. Valid values are
ASGAverageCPUUtilization
,ASGAverageNetworkIn
,ASGAverageNetworkOut
, orALBRequestCountPerTarget
.- resource_
label str Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
- predefined
Metric StringType Describes a scaling metric for a predictive scaling policy. Valid values are
ASGAverageCPUUtilization
,ASGAverageNetworkIn
,ASGAverageNetworkOut
, orALBRequestCountPerTarget
.- resource
Label String Label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
PolicyStepAdjustment
- 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 stringLower Bound 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 stringUpper Bound Upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as positive 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 stringLower Bound 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 stringUpper Bound Upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as positive infinity. The upper bound must be greater than the lower bound.
- scaling
Adjustment Integer 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 StringLower Bound 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 StringUpper Bound Upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as positive infinity. The upper bound must be greater than the lower bound.
- scaling
Adjustment number 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 stringLower Bound 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 stringUpper Bound Upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as positive 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_ strlower_ bound 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_ strupper_ bound Upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as positive infinity. The upper bound must be greater than the lower bound.
- scaling
Adjustment Number 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 StringLower Bound 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 StringUpper Bound Upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as positive infinity. The upper bound must be greater than the lower bound.
PolicyTargetTrackingConfiguration
- Target
Value double Target value for the metric.
- Customized
Metric PolicySpecification Target Tracking Configuration Customized Metric Specification Customized metric. Conflicts with
predefined_metric_specification
.- Disable
Scale boolIn Whether scale in by the target tracking policy is disabled.
- Predefined
Metric PolicySpecification Target Tracking Configuration Predefined Metric Specification Predefined metric. Conflicts with
customized_metric_specification
.
- Target
Value float64 Target value for the metric.
- Customized
Metric PolicySpecification Target Tracking Configuration Customized Metric Specification Customized metric. Conflicts with
predefined_metric_specification
.- Disable
Scale boolIn Whether scale in by the target tracking policy is disabled.
- Predefined
Metric PolicySpecification Target Tracking Configuration Predefined Metric Specification Predefined metric. Conflicts with
customized_metric_specification
.
- target
Value Double Target value for the metric.
- customized
Metric PolicySpecification Target Tracking Configuration Customized Metric Specification Customized metric. Conflicts with
predefined_metric_specification
.- disable
Scale BooleanIn Whether scale in by the target tracking policy is disabled.
- predefined
Metric PolicySpecification Target Tracking Configuration Predefined Metric Specification Predefined metric. Conflicts with
customized_metric_specification
.
- target
Value number Target value for the metric.
- customized
Metric PolicySpecification Target Tracking Configuration Customized Metric Specification Customized metric. Conflicts with
predefined_metric_specification
.- disable
Scale booleanIn Whether scale in by the target tracking policy is disabled.
- predefined
Metric PolicySpecification Target Tracking Configuration Predefined Metric Specification Predefined metric. Conflicts with
customized_metric_specification
.
- target_
value float Target value for the metric.
- customized_
metric_ Policyspecification Target Tracking Configuration Customized Metric Specification Customized metric. Conflicts with
predefined_metric_specification
.- disable_
scale_ boolin Whether scale in by the target tracking policy is disabled.
- predefined_
metric_ Policyspecification Target Tracking Configuration Predefined Metric Specification Predefined metric. Conflicts with
customized_metric_specification
.
- target
Value Number Target value for the metric.
- customized
Metric Property MapSpecification Customized metric. Conflicts with
predefined_metric_specification
.- disable
Scale BooleanIn Whether scale in by the target tracking policy is disabled.
- predefined
Metric Property MapSpecification Predefined metric. Conflicts with
customized_metric_specification
.
PolicyTargetTrackingConfigurationCustomizedMetricSpecification
- Metric
Dimensions List<PolicyTarget Tracking Configuration Customized Metric Specification Metric Dimension> Dimensions of the metric.
- Metric
Name string Name of the metric.
- Metrics
List<Policy
Target Tracking Configuration Customized Metric Specification Metric> Metrics to include, as a metric data query.
- Namespace string
Namespace of the metric.
- Statistic string
Statistic of the metric.
- Unit string
Unit of the metric.
- Metric
Dimensions []PolicyTarget Tracking Configuration Customized Metric Specification Metric Dimension Dimensions of the metric.
- Metric
Name string Name of the metric.
- Metrics
[]Policy
Target Tracking Configuration Customized Metric Specification Metric Metrics to include, as a metric data query.
- Namespace string
Namespace of the metric.
- Statistic string
Statistic of the metric.
- Unit string
Unit of the metric.
- metric
Dimensions List<PolicyTarget Tracking Configuration Customized Metric Specification Metric Dimension> Dimensions of the metric.
- metric
Name String Name of the metric.
- metrics
List<Policy
Target Tracking Configuration Customized Metric Specification Metric> Metrics to include, as a metric data query.
- namespace String
Namespace of the metric.
- statistic String
Statistic of the metric.
- unit String
Unit of the metric.
- metric
Dimensions PolicyTarget Tracking Configuration Customized Metric Specification Metric Dimension[] Dimensions of the metric.
- metric
Name string Name of the metric.
- metrics
Policy
Target Tracking Configuration Customized Metric Specification Metric[] Metrics to include, as a metric data query.
- namespace string
Namespace of the metric.
- statistic string
Statistic of the metric.
- unit string
Unit of the metric.
- metric_
dimensions Sequence[PolicyTarget Tracking Configuration Customized Metric Specification Metric Dimension] Dimensions of the metric.
- metric_
name str Name of the metric.
- metrics
Sequence[Policy
Target Tracking Configuration Customized Metric Specification Metric] Metrics to include, as a metric data query.
- namespace str
Namespace of the metric.
- statistic str
Statistic of the metric.
- unit str
Unit of the metric.
- metric
Dimensions List<Property Map> Dimensions of the metric.
- metric
Name 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.
- unit String
Unit of the metric.
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetric
- 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
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyTarget Tracking Configuration Customized Metric Specification Metric Metric Stat Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either
expression
ormetric_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
ormetric_stat
, but not both.- Label string
Human-readable label for this metric or expression.
- Metric
Stat PolicyTarget Tracking Configuration Customized Metric Specification Metric Metric Stat Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either
expression
ormetric_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
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat PolicyTarget Tracking Configuration Customized Metric Specification Metric Metric Stat Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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
ormetric_stat
, but not both.- label string
Human-readable label for this metric or expression.
- metric
Stat PolicyTarget Tracking Configuration Customized Metric Specification Metric Metric Stat Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data 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
ormetric_stat
, but not both.- label str
Human-readable label for this metric or expression.
- metric_
stat PolicyTarget Tracking Configuration Customized Metric Specification Metric Metric Stat Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either
expression
ormetric_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
ormetric_stat
, but not both.- label String
Human-readable label for this metric or expression.
- metric
Stat Property Map Structure that defines CloudWatch metric to be used in target tracking scaling policy. You must specify either
expression
ormetric_stat
, but not both.- return
Data Boolean Boolean that indicates whether to return the timestamps and raw data values of this metric, the default is true
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStat
- Metric
Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric 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
Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric 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
Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric 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
Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric 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
Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric 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.
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetric
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
List<Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric Dimension> Dimensions of the metric.
- Metric
Name string Name of the metric.
- Namespace string
Namespace of the metric.
- Dimensions
[]Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric Dimension Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions
List<Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric Dimension> Dimensions of the metric.
- metric
Name string Name of the metric.
- namespace string
Namespace of the metric.
- dimensions
Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric Dimension[] Dimensions of the metric.
- metric_
name str Name of the metric.
- namespace str
Namespace of the metric.
- dimensions
Sequence[Policy
Target Tracking Configuration Customized Metric Specification Metric Metric Stat Metric Dimension] Dimensions of the metric.
- metric
Name String Name of the metric.
- namespace String
Namespace of the metric.
- dimensions List<Property Map>
Dimensions of the metric.
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimension
PolicyTargetTrackingConfigurationPredefinedMetricSpecification
- Predefined
Metric stringType Metric type.
- Resource
Label string Identifies the resource associated with the metric type.
- Predefined
Metric stringType Metric type.
- Resource
Label string Identifies the resource associated with the metric type.
- predefined
Metric StringType Metric type.
- resource
Label String Identifies the resource associated with the metric type.
- predefined
Metric stringType Metric type.
- resource
Label string Identifies the resource associated with the metric type.
- predefined_
metric_ strtype Metric type.
- resource_
label str Identifies the resource associated with the metric type.
- predefined
Metric StringType Metric type.
- resource
Label String Identifies the resource associated with the metric type.
Import
AutoScaling scaling policy can be imported using the role autoscaling_group_name and name separated by /
.
$ pulumi import aws:autoscaling/policy:Policy test-policy asg-name/policy-name
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.