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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const bar = new aws.autoscaling.Group("bar", {
availabilityZones: ["us-east-1a"],
name: "foobar3-test",
maxSize: 5,
minSize: 2,
healthCheckGracePeriod: 300,
healthCheckType: "ELB",
forceDelete: true,
launchConfiguration: foo.name,
});
const bat = new aws.autoscaling.Policy("bat", {
name: "foobar3-test",
scalingAdjustment: 4,
adjustmentType: "ChangeInCapacity",
cooldown: 300,
autoscalingGroupName: bar.name,
});
import pulumi
import pulumi_aws as aws
bar = aws.autoscaling.Group("bar",
availability_zones=["us-east-1a"],
name="foobar3-test",
max_size=5,
min_size=2,
health_check_grace_period=300,
health_check_type="ELB",
force_delete=True,
launch_configuration=foo["name"])
bat = aws.autoscaling.Policy("bat",
name="foobar3-test",
scaling_adjustment=4,
adjustment_type="ChangeInCapacity",
cooldown=300,
autoscaling_group_name=bar.name)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v6/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"),
},
Name: pulumi.String("foobar3-test"),
MaxSize: pulumi.Int(5),
MinSize: pulumi.Int(2),
HealthCheckGracePeriod: pulumi.Int(300),
HealthCheckType: pulumi.String("ELB"),
ForceDelete: pulumi.Bool(true),
LaunchConfiguration: pulumi.Any(foo.Name),
})
if err != nil {
return err
}
_, err = autoscaling.NewPolicy(ctx, "bat", &autoscaling.PolicyArgs{
Name: pulumi.String("foobar3-test"),
ScalingAdjustment: pulumi.Int(4),
AdjustmentType: pulumi.String("ChangeInCapacity"),
Cooldown: pulumi.Int(300),
AutoscalingGroupName: bar.Name,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var bar = new Aws.AutoScaling.Group("bar", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
Name = "foobar3-test",
MaxSize = 5,
MinSize = 2,
HealthCheckGracePeriod = 300,
HealthCheckType = "ELB",
ForceDelete = true,
LaunchConfiguration = foo.Name,
});
var bat = new Aws.AutoScaling.Policy("bat", new()
{
Name = "foobar3-test",
ScalingAdjustment = 4,
AdjustmentType = "ChangeInCapacity",
Cooldown = 300,
AutoscalingGroupName = bar.Name,
});
});
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")
.name("foobar3-test")
.maxSize(5)
.minSize(2)
.healthCheckGracePeriod(300)
.healthCheckType("ELB")
.forceDelete(true)
.launchConfiguration(foo.name())
.build());
var bat = new Policy("bat", PolicyArgs.builder()
.name("foobar3-test")
.scalingAdjustment(4)
.adjustmentType("ChangeInCapacity")
.cooldown(300)
.autoscalingGroupName(bar.name())
.build());
}
}
resources:
bat:
type: aws:autoscaling:Policy
properties:
name: foobar3-test
scalingAdjustment: 4
adjustmentType: ChangeInCapacity
cooldown: 300
autoscalingGroupName: ${bar.name}
bar:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
name: foobar3-test
maxSize: 5
minSize: 2
healthCheckGracePeriod: 300
healthCheckType: ELB
forceDelete: true
launchConfiguration: ${foo.name}
Create target tracking scaling policy using metric math
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {
autoscalingGroupName: "my-test-asg",
name: "foo",
policyType: "TargetTrackingScaling",
targetTrackingConfiguration: {
targetValue: 100,
customizedMetricSpecification: {
metrics: [
{
label: "Get the queue size (the number of messages waiting to be processed)",
id: "m1",
metricStat: {
metric: {
namespace: "AWS/SQS",
metricName: "ApproximateNumberOfMessagesVisible",
dimensions: [{
name: "QueueName",
value: "my-queue",
}],
},
stat: "Sum",
},
returnData: false,
},
{
label: "Get the group size (the number of InService instances)",
id: "m2",
metricStat: {
metric: {
namespace: "AWS/AutoScaling",
metricName: "GroupInServiceInstances",
dimensions: [{
name: "AutoScalingGroupName",
value: "my-asg",
}],
},
stat: "Average",
},
returnData: false,
},
{
label: "Calculate the backlog per instance",
id: "e1",
expression: "m1 / m2",
returnData: true,
},
],
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.autoscaling.Policy("example",
autoscaling_group_name="my-test-asg",
name="foo",
policy_type="TargetTrackingScaling",
target_tracking_configuration={
"target_value": 100,
"customized_metric_specification": {
"metrics": [
{
"label": "Get the queue size (the number of messages waiting to be processed)",
"id": "m1",
"metric_stat": {
"metric": {
"namespace": "AWS/SQS",
"metric_name": "ApproximateNumberOfMessagesVisible",
"dimensions": [{
"name": "QueueName",
"value": "my-queue",
}],
},
"stat": "Sum",
},
"return_data": False,
},
{
"label": "Get the group size (the number of InService instances)",
"id": "m2",
"metric_stat": {
"metric": {
"namespace": "AWS/AutoScaling",
"metric_name": "GroupInServiceInstances",
"dimensions": [{
"name": "AutoScalingGroupName",
"value": "my-asg",
}],
},
"stat": "Average",
},
"return_data": False,
},
{
"label": "Calculate the backlog per instance",
"id": "e1",
"expression": "m1 / m2",
"return_data": True,
},
],
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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"),
Name: pulumi.String("foo"),
PolicyType: pulumi.String("TargetTrackingScaling"),
TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{
TargetValue: pulumi.Float64(100),
CustomizedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs{
Metrics: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs{
Label: pulumi.String("Get the queue size (the number of messages waiting to be processed)"),
Id: pulumi.String("m1"),
MetricStat: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
Metric: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
Namespace: pulumi.String("AWS/SQS"),
MetricName: pulumi.String("ApproximateNumberOfMessagesVisible"),
Dimensions: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
Name: pulumi.String("QueueName"),
Value: pulumi.String("my-queue"),
},
},
},
Stat: pulumi.String("Sum"),
},
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs{
Label: pulumi.String("Get the group size (the number of InService instances)"),
Id: pulumi.String("m2"),
MetricStat: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
Metric: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
Namespace: pulumi.String("AWS/AutoScaling"),
MetricName: pulumi.String("GroupInServiceInstances"),
Dimensions: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
Name: pulumi.String("AutoScalingGroupName"),
Value: pulumi.String("my-asg"),
},
},
},
Stat: pulumi.String("Average"),
},
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs{
Label: pulumi.String("Calculate the backlog per instance"),
Id: pulumi.String("e1"),
Expression: pulumi.String("m1 / m2"),
ReturnData: pulumi.Bool(true),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AutoScaling.Policy("example", new()
{
AutoscalingGroupName = "my-test-asg",
Name = "foo",
PolicyType = "TargetTrackingScaling",
TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs
{
TargetValue = 100,
CustomizedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs
{
Metrics = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
{
Label = "Get the queue size (the number of messages waiting to be processed)",
Id = "m1",
MetricStat = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
{
Namespace = "AWS/SQS",
MetricName = "ApproximateNumberOfMessagesVisible",
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
{
Name = "QueueName",
Value = "my-queue",
},
},
},
Stat = "Sum",
},
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
{
Label = "Get the group size (the number of InService instances)",
Id = "m2",
MetricStat = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
{
Namespace = "AWS/AutoScaling",
MetricName = "GroupInServiceInstances",
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
{
Name = "AutoScalingGroupName",
Value = "my-asg",
},
},
},
Stat = "Average",
},
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
{
Label = "Calculate the backlog per instance",
Id = "e1",
Expression = "m1 / m2",
ReturnData = true,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.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")
.name("foo")
.policyType("TargetTrackingScaling")
.targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder()
.targetValue(100)
.customizedMetricSpecification(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs.builder()
.metrics(
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs.builder()
.label("Get the queue size (the number of messages waiting to be processed)")
.id("m1")
.metricStat(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
.metric(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
.namespace("AWS/SQS")
.metricName("ApproximateNumberOfMessagesVisible")
.dimensions(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
.name("QueueName")
.value("my-queue")
.build())
.build())
.stat("Sum")
.build())
.returnData(false)
.build(),
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs.builder()
.label("Get the group size (the number of InService instances)")
.id("m2")
.metricStat(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
.metric(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
.namespace("AWS/AutoScaling")
.metricName("GroupInServiceInstances")
.dimensions(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
.name("AutoScalingGroupName")
.value("my-asg")
.build())
.build())
.stat("Average")
.build())
.returnData(false)
.build(),
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs.builder()
.label("Calculate the backlog per instance")
.id("e1")
.expression("m1 / m2")
.returnData(true)
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:autoscaling:Policy
properties:
autoscalingGroupName: my-test-asg
name: foo
policyType: TargetTrackingScaling
targetTrackingConfiguration:
targetValue: 100
customizedMetricSpecification:
metrics:
- label: Get the queue size (the number of messages waiting to be processed)
id: m1
metricStat:
metric:
namespace: AWS/SQS
metricName: ApproximateNumberOfMessagesVisible
dimensions:
- name: QueueName
value: my-queue
stat: Sum
returnData: false
- label: Get the group size (the number of InService instances)
id: m2
metricStat:
metric:
namespace: AWS/AutoScaling
metricName: GroupInServiceInstances
dimensions:
- name: AutoScalingGroupName
value: my-asg
stat: Average
returnData: false
- label: Calculate the backlog per instance
id: e1
expression: m1 / m2
returnData: true
Create predictive scaling policy using customized metrics
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {
autoscalingGroupName: "my-test-asg",
name: "foo",
policyType: "PredictiveScaling",
predictiveScalingConfiguration: {
metricSpecification: {
targetValue: 10,
customizedLoadMetricSpecification: {
metricDataQueries: [{
id: "load_sum",
expression: "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))",
}],
},
customizedCapacityMetricSpecification: {
metricDataQueries: [{
id: "capacity_sum",
expression: "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
}],
},
customizedScalingMetricSpecification: {
metricDataQueries: [
{
id: "capacity_sum",
expression: "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
returnData: false,
},
{
id: "load_sum",
expression: "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))",
returnData: false,
},
{
id: "weighted_average",
expression: "load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)",
},
],
},
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.autoscaling.Policy("example",
autoscaling_group_name="my-test-asg",
name="foo",
policy_type="PredictiveScaling",
predictive_scaling_configuration={
"metric_specification": {
"target_value": 10,
"customized_load_metric_specification": {
"metric_data_queries": [{
"id": "load_sum",
"expression": "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))",
}],
},
"customized_capacity_metric_specification": {
"metric_data_queries": [{
"id": "capacity_sum",
"expression": "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
}],
},
"customized_scaling_metric_specification": {
"metric_data_queries": [
{
"id": "capacity_sum",
"expression": "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
"return_data": False,
},
{
"id": "load_sum",
"expression": "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))",
"return_data": False,
},
{
"id": "weighted_average",
"expression": "load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)",
},
],
},
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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"),
Name: pulumi.String("foo"),
PolicyType: pulumi.String("PredictiveScaling"),
PredictiveScalingConfiguration: &autoscaling.PolicyPredictiveScalingConfigurationArgs{
MetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationArgs{
TargetValue: pulumi.Float64(10),
CustomizedLoadMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("load_sum"),
Expression: pulumi.String("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))"),
},
},
},
CustomizedCapacityMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("capacity_sum"),
Expression: pulumi.String("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))"),
},
},
},
CustomizedScalingMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("capacity_sum"),
Expression: pulumi.String("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))"),
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("load_sum"),
Expression: pulumi.String("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))"),
ReturnData: pulumi.Bool(false),
},
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("weighted_average"),
Expression: pulumi.String("load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AutoScaling.Policy("example", new()
{
AutoscalingGroupName = "my-test-asg",
Name = "foo",
PolicyType = "PredictiveScaling",
PredictiveScalingConfiguration = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationArgs
{
MetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationArgs
{
TargetValue = 10,
CustomizedLoadMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs
{
Id = "load_sum",
Expression = "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))",
},
},
},
CustomizedCapacityMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs
{
Id = "capacity_sum",
Expression = "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
},
},
},
CustomizedScalingMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Id = "capacity_sum",
Expression = "SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))",
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Id = "load_sum",
Expression = "SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))",
ReturnData = false,
},
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Id = "weighted_average",
Expression = "load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)",
},
},
},
},
},
});
});
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.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs;
import com.pulumi.aws.autoscaling.inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs;
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")
.name("foo")
.policyType("PredictiveScaling")
.predictiveScalingConfiguration(PolicyPredictiveScalingConfigurationArgs.builder()
.metricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationArgs.builder()
.targetValue(10)
.customizedLoadMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs.builder()
.id("load_sum")
.expression("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 3600))")
.build())
.build())
.customizedCapacityMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs.builder()
.id("capacity_sum")
.expression("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))")
.build())
.build())
.customizedScalingMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs.builder()
.metricDataQueries(
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.id("capacity_sum")
.expression("SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName=\"GroupInServiceIntances\" my-test-asg', 'Average', 300))")
.returnData(false)
.build(),
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.id("load_sum")
.expression("SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName=\"CPUUtilization\" my-test-asg', 'Sum', 300))")
.returnData(false)
.build(),
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.id("weighted_average")
.expression("load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)")
.build())
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:autoscaling:Policy
properties:
autoscalingGroupName: my-test-asg
name: foo
policyType: PredictiveScaling
predictiveScalingConfiguration:
metricSpecification:
targetValue: 10
customizedLoadMetricSpecification:
metricDataQueries:
- id: load_sum
expression: SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName="CPUUtilization" my-test-asg', 'Sum', 3600))
customizedCapacityMetricSpecification:
metricDataQueries:
- id: capacity_sum
expression: SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName="GroupInServiceIntances" my-test-asg', 'Average', 300))
customizedScalingMetricSpecification:
metricDataQueries:
- id: capacity_sum
expression: SUM(SEARCH('{AWS/AutoScaling,AutoScalingGroupName} MetricName="GroupInServiceIntances" my-test-asg', 'Average', 300))
returnData: false
- id: load_sum
expression: SUM(SEARCH('{AWS/EC2,AutoScalingGroupName} MetricName="CPUUtilization" my-test-asg', 'Sum', 300))
returnData: false
- id: weighted_average
expression: load_sum / (capacity_sum * PERIOD(capacity_sum) / 60)
Create predictive scaling policy using customized scaling and predefined load metric
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {
autoscalingGroupName: "my-test-asg",
name: "foo",
policyType: "PredictiveScaling",
predictiveScalingConfiguration: {
metricSpecification: {
targetValue: 10,
predefinedLoadMetricSpecification: {
predefinedMetricType: "ASGTotalCPUUtilization",
resourceLabel: "app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff",
},
customizedScalingMetricSpecification: {
metricDataQueries: [{
id: "scaling",
metricStat: {
metric: {
metricName: "CPUUtilization",
namespace: "AWS/EC2",
dimensions: [{
name: "AutoScalingGroupName",
value: "my-test-asg",
}],
},
stat: "Average",
},
}],
},
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.autoscaling.Policy("example",
autoscaling_group_name="my-test-asg",
name="foo",
policy_type="PredictiveScaling",
predictive_scaling_configuration={
"metric_specification": {
"target_value": 10,
"predefined_load_metric_specification": {
"predefined_metric_type": "ASGTotalCPUUtilization",
"resource_label": "app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff",
},
"customized_scaling_metric_specification": {
"metric_data_queries": [{
"id": "scaling",
"metric_stat": {
"metric": {
"metric_name": "CPUUtilization",
"namespace": "AWS/EC2",
"dimensions": [{
"name": "AutoScalingGroupName",
"value": "my-test-asg",
}],
},
"stat": "Average",
},
}],
},
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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"),
Name: pulumi.String("foo"),
PolicyType: pulumi.String("PredictiveScaling"),
PredictiveScalingConfiguration: &autoscaling.PolicyPredictiveScalingConfigurationArgs{
MetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationArgs{
TargetValue: pulumi.Float64(10),
PredefinedLoadMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs{
PredefinedMetricType: pulumi.String("ASGTotalCPUUtilization"),
ResourceLabel: pulumi.String("app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff"),
},
CustomizedScalingMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("scaling"),
MetricStat: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs{
Metric: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs{
MetricName: pulumi.String("CPUUtilization"),
Namespace: pulumi.String("AWS/EC2"),
Dimensions: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
Name: pulumi.String("AutoScalingGroupName"),
Value: pulumi.String("my-test-asg"),
},
},
},
Stat: pulumi.String("Average"),
},
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AutoScaling.Policy("example", new()
{
AutoscalingGroupName = "my-test-asg",
Name = "foo",
PolicyType = "PredictiveScaling",
PredictiveScalingConfiguration = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationArgs
{
MetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationArgs
{
TargetValue = 10,
PredefinedLoadMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs
{
PredefinedMetricType = "ASGTotalCPUUtilization",
ResourceLabel = "app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff",
},
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
{
MetricName = "CPUUtilization",
Namespace = "AWS/EC2",
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
{
Name = "AutoScalingGroupName",
Value = "my-test-asg",
},
},
},
Stat = "Average",
},
},
},
},
},
},
});
});
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.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs;
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")
.name("foo")
.policyType("PredictiveScaling")
.predictiveScalingConfiguration(PolicyPredictiveScalingConfigurationArgs.builder()
.metricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationArgs.builder()
.targetValue(10)
.predefinedLoadMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs.builder()
.predefinedMetricType("ASGTotalCPUUtilization")
.resourceLabel("app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff")
.build())
.customizedScalingMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.id("scaling")
.metricStat(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs.builder()
.metric(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
.metricName("CPUUtilization")
.namespace("AWS/EC2")
.dimensions(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
.name("AutoScalingGroupName")
.value("my-test-asg")
.build())
.build())
.stat("Average")
.build())
.build())
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:autoscaling:Policy
properties:
autoscalingGroupName: my-test-asg
name: foo
policyType: PredictiveScaling
predictiveScalingConfiguration:
metricSpecification:
targetValue: 10
predefinedLoadMetricSpecification:
predefinedMetricType: ASGTotalCPUUtilization
resourceLabel: app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff
customizedScalingMetricSpecification:
metricDataQueries:
- id: scaling
metricStat:
metric:
metricName: CPUUtilization
namespace: AWS/EC2
dimensions:
- name: AutoScalingGroupName
value: my-test-asg
stat: Average
Create Policy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
@overload
def Policy(resource_name: str,
args: PolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Policy(resource_name: str,
opts: Optional[ResourceOptions] = None,
autoscaling_group_name: Optional[str] = None,
min_adjustment_magnitude: Optional[int] = None,
cooldown: Optional[int] = None,
enabled: Optional[bool] = None,
estimated_instance_warmup: Optional[int] = None,
metric_aggregation_type: Optional[str] = None,
adjustment_type: Optional[str] = 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)
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.
Parameters
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplepolicyResourceResourceFromAutoscalingpolicy = new Aws.AutoScaling.Policy("examplepolicyResourceResourceFromAutoscalingpolicy", new()
{
AutoscalingGroupName = "string",
MinAdjustmentMagnitude = 0,
Cooldown = 0,
Enabled = false,
EstimatedInstanceWarmup = 0,
MetricAggregationType = "string",
AdjustmentType = "string",
Name = "string",
PolicyType = "string",
PredictiveScalingConfiguration = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationArgs
{
MetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationArgs
{
TargetValue = 0,
CustomizedCapacityMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs
{
Id = "string",
Expression = "string",
Label = "string",
MetricStat = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs
{
MetricName = "string",
Namespace = "string",
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
{
Name = "string",
Value = "string",
},
},
},
Stat = "string",
Unit = "string",
},
ReturnData = false,
},
},
},
CustomizedLoadMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs
{
Id = "string",
Expression = "string",
Label = "string",
MetricStat = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs
{
MetricName = "string",
Namespace = "string",
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
{
Name = "string",
Value = "string",
},
},
},
Stat = "string",
Unit = "string",
},
ReturnData = false,
},
},
},
CustomizedScalingMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs
{
MetricDataQueries = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
{
Id = "string",
Expression = "string",
Label = "string",
MetricStat = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs
{
MetricName = "string",
Namespace = "string",
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
{
Name = "string",
Value = "string",
},
},
},
Stat = "string",
Unit = "string",
},
ReturnData = false,
},
},
},
PredefinedLoadMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs
{
PredefinedMetricType = "string",
ResourceLabel = "string",
},
PredefinedMetricPairSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs
{
PredefinedMetricType = "string",
ResourceLabel = "string",
},
PredefinedScalingMetricSpecification = new Aws.AutoScaling.Inputs.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs
{
PredefinedMetricType = "string",
ResourceLabel = "string",
},
},
MaxCapacityBreachBehavior = "string",
MaxCapacityBuffer = "string",
Mode = "string",
SchedulingBufferTime = "string",
},
ScalingAdjustment = 0,
StepAdjustments = new[]
{
new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs
{
ScalingAdjustment = 0,
MetricIntervalLowerBound = "string",
MetricIntervalUpperBound = "string",
},
},
TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs
{
TargetValue = 0,
CustomizedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs
{
MetricDimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimensionArgs
{
Name = "string",
Value = "string",
},
},
MetricName = "string",
Metrics = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
{
Id = "string",
Expression = "string",
Label = "string",
MetricStat = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
{
Metric = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
{
MetricName = "string",
Namespace = "string",
Dimensions = new[]
{
new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
{
Name = "string",
Value = "string",
},
},
},
Stat = "string",
Unit = "string",
},
ReturnData = false,
},
},
Namespace = "string",
Statistic = "string",
Unit = "string",
},
DisableScaleIn = false,
PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs
{
PredefinedMetricType = "string",
ResourceLabel = "string",
},
},
});
example, err := autoscaling.NewPolicy(ctx, "examplepolicyResourceResourceFromAutoscalingpolicy", &autoscaling.PolicyArgs{
AutoscalingGroupName: pulumi.String("string"),
MinAdjustmentMagnitude: pulumi.Int(0),
Cooldown: pulumi.Int(0),
Enabled: pulumi.Bool(false),
EstimatedInstanceWarmup: pulumi.Int(0),
MetricAggregationType: pulumi.String("string"),
AdjustmentType: pulumi.String("string"),
Name: pulumi.String("string"),
PolicyType: pulumi.String("string"),
PredictiveScalingConfiguration: &autoscaling.PolicyPredictiveScalingConfigurationArgs{
MetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationArgs{
TargetValue: pulumi.Float64(0),
CustomizedCapacityMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("string"),
Expression: pulumi.String("string"),
Label: pulumi.String("string"),
MetricStat: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs{
Metric: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs{
MetricName: pulumi.String("string"),
Namespace: pulumi.String("string"),
Dimensions: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
Stat: pulumi.String("string"),
Unit: pulumi.String("string"),
},
ReturnData: pulumi.Bool(false),
},
},
},
CustomizedLoadMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("string"),
Expression: pulumi.String("string"),
Label: pulumi.String("string"),
MetricStat: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs{
Metric: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs{
MetricName: pulumi.String("string"),
Namespace: pulumi.String("string"),
Dimensions: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
Stat: pulumi.String("string"),
Unit: pulumi.String("string"),
},
ReturnData: pulumi.Bool(false),
},
},
},
CustomizedScalingMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs{
MetricDataQueries: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs{
Id: pulumi.String("string"),
Expression: pulumi.String("string"),
Label: pulumi.String("string"),
MetricStat: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs{
Metric: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs{
MetricName: pulumi.String("string"),
Namespace: pulumi.String("string"),
Dimensions: autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArray{
&autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
Stat: pulumi.String("string"),
Unit: pulumi.String("string"),
},
ReturnData: pulumi.Bool(false),
},
},
},
PredefinedLoadMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs{
PredefinedMetricType: pulumi.String("string"),
ResourceLabel: pulumi.String("string"),
},
PredefinedMetricPairSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs{
PredefinedMetricType: pulumi.String("string"),
ResourceLabel: pulumi.String("string"),
},
PredefinedScalingMetricSpecification: &autoscaling.PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs{
PredefinedMetricType: pulumi.String("string"),
ResourceLabel: pulumi.String("string"),
},
},
MaxCapacityBreachBehavior: pulumi.String("string"),
MaxCapacityBuffer: pulumi.String("string"),
Mode: pulumi.String("string"),
SchedulingBufferTime: pulumi.String("string"),
},
ScalingAdjustment: pulumi.Int(0),
StepAdjustments: autoscaling.PolicyStepAdjustmentArray{
&autoscaling.PolicyStepAdjustmentArgs{
ScalingAdjustment: pulumi.Int(0),
MetricIntervalLowerBound: pulumi.String("string"),
MetricIntervalUpperBound: pulumi.String("string"),
},
},
TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{
TargetValue: pulumi.Float64(0),
CustomizedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs{
MetricDimensions: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimensionArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimensionArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
MetricName: pulumi.String("string"),
Metrics: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs{
Id: pulumi.String("string"),
Expression: pulumi.String("string"),
Label: pulumi.String("string"),
MetricStat: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{
Metric: &autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{
MetricName: pulumi.String("string"),
Namespace: pulumi.String("string"),
Dimensions: autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{
&autoscaling.PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
Stat: pulumi.String("string"),
Unit: pulumi.String("string"),
},
ReturnData: pulumi.Bool(false),
},
},
Namespace: pulumi.String("string"),
Statistic: pulumi.String("string"),
Unit: pulumi.String("string"),
},
DisableScaleIn: pulumi.Bool(false),
PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{
PredefinedMetricType: pulumi.String("string"),
ResourceLabel: pulumi.String("string"),
},
},
})
var examplepolicyResourceResourceFromAutoscalingpolicy = new Policy("examplepolicyResourceResourceFromAutoscalingpolicy", PolicyArgs.builder()
.autoscalingGroupName("string")
.minAdjustmentMagnitude(0)
.cooldown(0)
.enabled(false)
.estimatedInstanceWarmup(0)
.metricAggregationType("string")
.adjustmentType("string")
.name("string")
.policyType("string")
.predictiveScalingConfiguration(PolicyPredictiveScalingConfigurationArgs.builder()
.metricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationArgs.builder()
.targetValue(0)
.customizedCapacityMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs.builder()
.id("string")
.expression("string")
.label("string")
.metricStat(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs.builder()
.metric(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
.metricName("string")
.namespace("string")
.dimensions(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
.name("string")
.value("string")
.build())
.build())
.stat("string")
.unit("string")
.build())
.returnData(false)
.build())
.build())
.customizedLoadMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs.builder()
.id("string")
.expression("string")
.label("string")
.metricStat(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs.builder()
.metric(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
.metricName("string")
.namespace("string")
.dimensions(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
.name("string")
.value("string")
.build())
.build())
.stat("string")
.unit("string")
.build())
.returnData(false)
.build())
.build())
.customizedScalingMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs.builder()
.metricDataQueries(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs.builder()
.id("string")
.expression("string")
.label("string")
.metricStat(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs.builder()
.metric(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs.builder()
.metricName("string")
.namespace("string")
.dimensions(PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs.builder()
.name("string")
.value("string")
.build())
.build())
.stat("string")
.unit("string")
.build())
.returnData(false)
.build())
.build())
.predefinedLoadMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs.builder()
.predefinedMetricType("string")
.resourceLabel("string")
.build())
.predefinedMetricPairSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs.builder()
.predefinedMetricType("string")
.resourceLabel("string")
.build())
.predefinedScalingMetricSpecification(PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs.builder()
.predefinedMetricType("string")
.resourceLabel("string")
.build())
.build())
.maxCapacityBreachBehavior("string")
.maxCapacityBuffer("string")
.mode("string")
.schedulingBufferTime("string")
.build())
.scalingAdjustment(0)
.stepAdjustments(PolicyStepAdjustmentArgs.builder()
.scalingAdjustment(0)
.metricIntervalLowerBound("string")
.metricIntervalUpperBound("string")
.build())
.targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder()
.targetValue(0)
.customizedMetricSpecification(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs.builder()
.metricDimensions(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimensionArgs.builder()
.name("string")
.value("string")
.build())
.metricName("string")
.metrics(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs.builder()
.id("string")
.expression("string")
.label("string")
.metricStat(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()
.metric(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()
.metricName("string")
.namespace("string")
.dimensions(PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()
.name("string")
.value("string")
.build())
.build())
.stat("string")
.unit("string")
.build())
.returnData(false)
.build())
.namespace("string")
.statistic("string")
.unit("string")
.build())
.disableScaleIn(false)
.predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder()
.predefinedMetricType("string")
.resourceLabel("string")
.build())
.build())
.build());
examplepolicy_resource_resource_from_autoscalingpolicy = aws.autoscaling.Policy("examplepolicyResourceResourceFromAutoscalingpolicy",
autoscaling_group_name="string",
min_adjustment_magnitude=0,
cooldown=0,
enabled=False,
estimated_instance_warmup=0,
metric_aggregation_type="string",
adjustment_type="string",
name="string",
policy_type="string",
predictive_scaling_configuration={
"metricSpecification": {
"targetValue": 0,
"customizedCapacityMetricSpecification": {
"metricDataQueries": [{
"id": "string",
"expression": "string",
"label": "string",
"metricStat": {
"metric": {
"metricName": "string",
"namespace": "string",
"dimensions": [{
"name": "string",
"value": "string",
}],
},
"stat": "string",
"unit": "string",
},
"returnData": False,
}],
},
"customizedLoadMetricSpecification": {
"metricDataQueries": [{
"id": "string",
"expression": "string",
"label": "string",
"metricStat": {
"metric": {
"metricName": "string",
"namespace": "string",
"dimensions": [{
"name": "string",
"value": "string",
}],
},
"stat": "string",
"unit": "string",
},
"returnData": False,
}],
},
"customizedScalingMetricSpecification": {
"metricDataQueries": [{
"id": "string",
"expression": "string",
"label": "string",
"metricStat": {
"metric": {
"metricName": "string",
"namespace": "string",
"dimensions": [{
"name": "string",
"value": "string",
}],
},
"stat": "string",
"unit": "string",
},
"returnData": False,
}],
},
"predefinedLoadMetricSpecification": {
"predefinedMetricType": "string",
"resourceLabel": "string",
},
"predefinedMetricPairSpecification": {
"predefinedMetricType": "string",
"resourceLabel": "string",
},
"predefinedScalingMetricSpecification": {
"predefinedMetricType": "string",
"resourceLabel": "string",
},
},
"maxCapacityBreachBehavior": "string",
"maxCapacityBuffer": "string",
"mode": "string",
"schedulingBufferTime": "string",
},
scaling_adjustment=0,
step_adjustments=[{
"scalingAdjustment": 0,
"metricIntervalLowerBound": "string",
"metricIntervalUpperBound": "string",
}],
target_tracking_configuration={
"targetValue": 0,
"customizedMetricSpecification": {
"metricDimensions": [{
"name": "string",
"value": "string",
}],
"metricName": "string",
"metrics": [{
"id": "string",
"expression": "string",
"label": "string",
"metricStat": {
"metric": {
"metricName": "string",
"namespace": "string",
"dimensions": [{
"name": "string",
"value": "string",
}],
},
"stat": "string",
"unit": "string",
},
"returnData": False,
}],
"namespace": "string",
"statistic": "string",
"unit": "string",
},
"disableScaleIn": False,
"predefinedMetricSpecification": {
"predefinedMetricType": "string",
"resourceLabel": "string",
},
})
const examplepolicyResourceResourceFromAutoscalingpolicy = new aws.autoscaling.Policy("examplepolicyResourceResourceFromAutoscalingpolicy", {
autoscalingGroupName: "string",
minAdjustmentMagnitude: 0,
cooldown: 0,
enabled: false,
estimatedInstanceWarmup: 0,
metricAggregationType: "string",
adjustmentType: "string",
name: "string",
policyType: "string",
predictiveScalingConfiguration: {
metricSpecification: {
targetValue: 0,
customizedCapacityMetricSpecification: {
metricDataQueries: [{
id: "string",
expression: "string",
label: "string",
metricStat: {
metric: {
metricName: "string",
namespace: "string",
dimensions: [{
name: "string",
value: "string",
}],
},
stat: "string",
unit: "string",
},
returnData: false,
}],
},
customizedLoadMetricSpecification: {
metricDataQueries: [{
id: "string",
expression: "string",
label: "string",
metricStat: {
metric: {
metricName: "string",
namespace: "string",
dimensions: [{
name: "string",
value: "string",
}],
},
stat: "string",
unit: "string",
},
returnData: false,
}],
},
customizedScalingMetricSpecification: {
metricDataQueries: [{
id: "string",
expression: "string",
label: "string",
metricStat: {
metric: {
metricName: "string",
namespace: "string",
dimensions: [{
name: "string",
value: "string",
}],
},
stat: "string",
unit: "string",
},
returnData: false,
}],
},
predefinedLoadMetricSpecification: {
predefinedMetricType: "string",
resourceLabel: "string",
},
predefinedMetricPairSpecification: {
predefinedMetricType: "string",
resourceLabel: "string",
},
predefinedScalingMetricSpecification: {
predefinedMetricType: "string",
resourceLabel: "string",
},
},
maxCapacityBreachBehavior: "string",
maxCapacityBuffer: "string",
mode: "string",
schedulingBufferTime: "string",
},
scalingAdjustment: 0,
stepAdjustments: [{
scalingAdjustment: 0,
metricIntervalLowerBound: "string",
metricIntervalUpperBound: "string",
}],
targetTrackingConfiguration: {
targetValue: 0,
customizedMetricSpecification: {
metricDimensions: [{
name: "string",
value: "string",
}],
metricName: "string",
metrics: [{
id: "string",
expression: "string",
label: "string",
metricStat: {
metric: {
metricName: "string",
namespace: "string",
dimensions: [{
name: "string",
value: "string",
}],
},
stat: "string",
unit: "string",
},
returnData: false,
}],
namespace: "string",
statistic: "string",
unit: "string",
},
disableScaleIn: false,
predefinedMetricSpecification: {
predefinedMetricType: "string",
resourceLabel: "string",
},
},
});
type: aws:autoscaling:Policy
properties:
adjustmentType: string
autoscalingGroupName: string
cooldown: 0
enabled: false
estimatedInstanceWarmup: 0
metricAggregationType: string
minAdjustmentMagnitude: 0
name: string
policyType: string
predictiveScalingConfiguration:
maxCapacityBreachBehavior: string
maxCapacityBuffer: string
metricSpecification:
customizedCapacityMetricSpecification:
metricDataQueries:
- expression: string
id: string
label: string
metricStat:
metric:
dimensions:
- name: string
value: string
metricName: string
namespace: string
stat: string
unit: string
returnData: false
customizedLoadMetricSpecification:
metricDataQueries:
- expression: string
id: string
label: string
metricStat:
metric:
dimensions:
- name: string
value: string
metricName: string
namespace: string
stat: string
unit: string
returnData: false
customizedScalingMetricSpecification:
metricDataQueries:
- expression: string
id: string
label: string
metricStat:
metric:
dimensions:
- name: string
value: string
metricName: string
namespace: string
stat: string
unit: string
returnData: false
predefinedLoadMetricSpecification:
predefinedMetricType: string
resourceLabel: string
predefinedMetricPairSpecification:
predefinedMetricType: string
resourceLabel: string
predefinedScalingMetricSpecification:
predefinedMetricType: string
resourceLabel: string
targetValue: 0
mode: string
schedulingBufferTime: string
scalingAdjustment: 0
stepAdjustments:
- metricIntervalLowerBound: string
metricIntervalUpperBound: string
scalingAdjustment: 0
targetTrackingConfiguration:
customizedMetricSpecification:
metricDimensions:
- name: string
value: string
metricName: string
metrics:
- expression: string
id: string
label: string
metricStat:
metric:
dimensions:
- name: string
value: string
metricName: string
namespace: string
stat: string
unit: string
returnData: false
namespace: string
statistic: string
unit: string
disableScaleIn: false
predefinedMetricSpecification:
predefinedMetricType: string
resourceLabel: string
targetValue: 0
Policy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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 - 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> Set of adjustments that manage group scaling. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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 - 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> Set of adjustments that manage group scaling. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target
Tracking PolicyConfiguration Target Tracking Configuration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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 - 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[] Set of adjustments that manage group scaling. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target
Tracking PolicyConfiguration Target Tracking Configuration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target_
tracking_ Policyconfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target
Tracking Property MapConfiguration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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 - 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> Set of adjustments that manage group scaling. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- Target
Tracking PolicyConfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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 - 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> Set of adjustments that manage group scaling. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target
Tracking PolicyConfiguration Target Tracking Configuration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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 - 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[] Set of adjustments that manage group scaling. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target
Tracking PolicyConfiguration Target Tracking Configuration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target_
tracking_ Policyconfiguration Target Tracking Configuration Args Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
- 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
.The following argument is only available to "SimpleScaling" and "StepScaling" type policies:
- 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
.The following arguments are only available to "SimpleScaling" type policies:
- 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:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {stepAdjustments: [ { scalingAdjustment: -1, metricIntervalLowerBound: "1", metricIntervalUpperBound: "2", }, { scalingAdjustment: 1, metricIntervalLowerBound: "2", metricIntervalUpperBound: "3", }, ]});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", step_adjustments=[ { "scaling_adjustment": -1, "metric_interval_lower_bound": "1", "metric_interval_upper_bound": "2", }, { "scaling_adjustment": 1, "metric_interval_lower_bound": "2", "metric_interval_upper_bound": "3", }, ])
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() { StepAdjustments = new[] { new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = -1, MetricIntervalLowerBound = "1", MetricIntervalUpperBound = "2", }, new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs { ScalingAdjustment = 1, MetricIntervalLowerBound = "2", MetricIntervalUpperBound = "3", }, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: int(-1), MetricIntervalLowerBound: pulumi.String("1"), MetricIntervalUpperBound: pulumi.String("2"), }, &autoscaling.PolicyStepAdjustmentArgs{ ScalingAdjustment: pulumi.Int(1), MetricIntervalLowerBound: pulumi.String("2"), MetricIntervalUpperBound: pulumi.String("3"), }, }, }) if err != nil { return err } return nil }) }
resources: example: type: aws:autoscaling:Policy properties: stepAdjustments: - scalingAdjustment: -1 metricIntervalLowerBound: 1 metricIntervalUpperBound: 2 - scalingAdjustment: 1 metricIntervalLowerBound: 2 metricIntervalUpperBound: 3
The following fields are available in step adjustments:
- target
Tracking Property MapConfiguration Target tracking policy. These have the following structure:
import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
const example = new aws.autoscaling.Policy("example", {targetTrackingConfiguration: { predefinedMetricSpecification: { predefinedMetricType: "ASGAverageCPUUtilization", }, targetValue: 40, }});
import pulumi import pulumi_aws as aws example = aws.autoscaling.Policy("example", target_tracking_configuration={ "predefined_metric_specification": { "predefined_metric_type": "ASGAverageCPUUtilization", }, "target_value": 40, })
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() { TargetTrackingConfiguration = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationArgs { PredefinedMetricSpecification = new Aws.AutoScaling.Inputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs { PredefinedMetricType = "ASGAverageCPUUtilization", }, TargetValue = 40, }, }); });
package main import ( "github.com/pulumi/pulumi-aws/sdk/v6/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{ TargetTrackingConfiguration: &autoscaling.PolicyTargetTrackingConfigurationArgs{ PredefinedMetricSpecification: &autoscaling.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs{ PredefinedMetricType: pulumi.String("ASGAverageCPUUtilization"), }, TargetValue: pulumi.Float64(40), }, }) 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.PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs; 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() .targetTrackingConfiguration(PolicyTargetTrackingConfigurationArgs.builder() .predefinedMetricSpecification(PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs.builder() .predefinedMetricType("ASGAverageCPUUtilization") .build()) .targetValue(40) .build()) .build()); } }
resources: example: type: aws:autoscaling:Policy properties: targetTrackingConfiguration: predefinedMetricSpecification: predefinedMetricType: ASGAverageCPUUtilization targetValue: 40
The following fields are available in target tracking configuration:
Supporting Types
PolicyPredictiveScalingConfiguration, PolicyPredictiveScalingConfigurationArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedCapacityMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecification, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedLoadMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecification, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricArgs
- 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, PolicyPredictiveScalingConfigurationMetricSpecificationCustomizedScalingMetricSpecificationMetricDataQueryMetricStatMetricDimensionArgs
PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification, PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationArgs
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification, PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationArgs
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification, PolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationArgs
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
- 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. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). Refer to PredefinedMetricSpecification for more information.
PolicyStepAdjustment, PolicyStepAdjustmentArgs
- 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.
Notice the bounds are relative to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official docs for a detailed example.
The following arguments are only available to "TargetTrackingScaling" type policies:
- 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.
Notice the bounds are relative to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official docs for a detailed example.
The following arguments are only available to "TargetTrackingScaling" type policies:
- 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.
Notice the bounds are relative to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official docs for a detailed example.
The following arguments are only available to "TargetTrackingScaling" type policies:
- 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.
Notice the bounds are relative to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official docs for a detailed example.
The following arguments are only available to "TargetTrackingScaling" type policies:
- 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.
Notice the bounds are relative to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official docs for a detailed example.
The following arguments are only available to "TargetTrackingScaling" type policies:
- 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.
Notice the bounds are relative to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official docs for a detailed example.
The following arguments are only available to "TargetTrackingScaling" type policies:
PolicyTargetTrackingConfiguration, PolicyTargetTrackingConfigurationArgs
- 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, PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs
- 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, PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricArgs
- 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, PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimensionArgs
PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStat, PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatArgs
- 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, PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs
- 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, PolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs
PolicyTargetTrackingConfigurationPredefinedMetricSpecification, PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs
- 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
Using pulumi import
, import AutoScaling scaling policy using the role autoscaling_group_name and name separated by /
. For example:
$ pulumi import aws:autoscaling/policy:Policy test-policy asg-name/policy-name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.