aws-native logo
AWS Native v0.54.0, Mar 21 23

aws-native.autoscaling.getScalingPolicy

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

Using getScalingPolicy

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getScalingPolicy(args: GetScalingPolicyArgs, opts?: InvokeOptions): Promise<GetScalingPolicyResult>
function getScalingPolicyOutput(args: GetScalingPolicyOutputArgs, opts?: InvokeOptions): Output<GetScalingPolicyResult>
def get_scaling_policy(arn: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetScalingPolicyResult
def get_scaling_policy_output(arn: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetScalingPolicyResult]
func LookupScalingPolicy(ctx *Context, args *LookupScalingPolicyArgs, opts ...InvokeOption) (*LookupScalingPolicyResult, error)
func LookupScalingPolicyOutput(ctx *Context, args *LookupScalingPolicyOutputArgs, opts ...InvokeOption) LookupScalingPolicyResultOutput

> Note: This function is named LookupScalingPolicy in the Go SDK.

public static class GetScalingPolicy 
{
    public static Task<GetScalingPolicyResult> InvokeAsync(GetScalingPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetScalingPolicyResult> Invoke(GetScalingPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetScalingPolicyResult> getScalingPolicy(GetScalingPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws-native:autoscaling:getScalingPolicy
  arguments:
    # arguments dictionary

The following arguments are supported:

Arn string

The ARN of the AutoScaling scaling policy

Arn string

The ARN of the AutoScaling scaling policy

arn String

The ARN of the AutoScaling scaling policy

arn string

The ARN of the AutoScaling scaling policy

arn str

The ARN of the AutoScaling scaling policy

arn String

The ARN of the AutoScaling scaling policy

getScalingPolicy Result

The following output properties are available:

AdjustmentType string

Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

Arn string

The ARN of the AutoScaling scaling policy

Cooldown string

The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.

EstimatedInstanceWarmup int

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.

MetricAggregationType string

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.

MinAdjustmentMagnitude int

The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.

PolicyName string
PolicyType string

One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling

PredictiveScalingConfiguration Pulumi.AwsNative.AutoScaling.Outputs.ScalingPolicyPredictiveScalingConfiguration

A predictive scaling policy. Includes support for predefined metrics only.

ScalingAdjustment int

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)

StepAdjustments List<Pulumi.AwsNative.AutoScaling.Outputs.ScalingPolicyStepAdjustment>

A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)

TargetTrackingConfiguration Pulumi.AwsNative.AutoScaling.Outputs.ScalingPolicyTargetTrackingConfiguration

A target tracking scaling policy. Includes support for predefined or customized metrics.

AdjustmentType string

Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

Arn string

The ARN of the AutoScaling scaling policy

Cooldown string

The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.

EstimatedInstanceWarmup int

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.

MetricAggregationType string

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.

MinAdjustmentMagnitude int

The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.

PolicyName string
PolicyType string

One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling

PredictiveScalingConfiguration ScalingPolicyPredictiveScalingConfiguration

A predictive scaling policy. Includes support for predefined metrics only.

ScalingAdjustment int

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)

StepAdjustments []ScalingPolicyStepAdjustment

A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)

TargetTrackingConfiguration ScalingPolicyTargetTrackingConfiguration

A target tracking scaling policy. Includes support for predefined or customized metrics.

adjustmentType String

Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

arn String

The ARN of the AutoScaling scaling policy

cooldown String

The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.

estimatedInstanceWarmup Integer

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.

metricAggregationType String

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.

minAdjustmentMagnitude Integer

The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.

policyName String
policyType String

One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling

predictiveScalingConfiguration ScalingPolicyPredictiveScalingConfiguration

A predictive scaling policy. Includes support for predefined metrics only.

scalingAdjustment Integer

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)

stepAdjustments List<ScalingPolicyStepAdjustment>

A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)

targetTrackingConfiguration ScalingPolicyTargetTrackingConfiguration

A target tracking scaling policy. Includes support for predefined or customized metrics.

adjustmentType string

Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

arn string

The ARN of the AutoScaling scaling policy

cooldown string

The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.

estimatedInstanceWarmup number

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.

metricAggregationType string

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.

minAdjustmentMagnitude number

The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.

policyName string
policyType string

One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling

predictiveScalingConfiguration ScalingPolicyPredictiveScalingConfiguration

A predictive scaling policy. Includes support for predefined metrics only.

scalingAdjustment number

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)

stepAdjustments ScalingPolicyStepAdjustment[]

A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)

targetTrackingConfiguration ScalingPolicyTargetTrackingConfiguration

A target tracking scaling policy. Includes support for predefined or customized metrics.

adjustment_type str

Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

arn str

The ARN of the AutoScaling scaling policy

cooldown str

The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.

estimated_instance_warmup int

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.

metric_aggregation_type str

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.

min_adjustment_magnitude int

The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.

policy_name str
policy_type str

One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling

predictive_scaling_configuration ScalingPolicyPredictiveScalingConfiguration

A predictive scaling policy. Includes support for predefined metrics only.

scaling_adjustment int

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)

step_adjustments Sequence[ScalingPolicyStepAdjustment]

A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)

target_tracking_configuration ScalingPolicyTargetTrackingConfiguration

A target tracking scaling policy. Includes support for predefined or customized metrics.

adjustmentType String

Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

arn String

The ARN of the AutoScaling scaling policy

cooldown String

The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.

estimatedInstanceWarmup Number

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.

metricAggregationType String

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.

minAdjustmentMagnitude Number

The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.

policyName String
policyType String

One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling

predictiveScalingConfiguration Property Map

A predictive scaling policy. Includes support for predefined metrics only.

scalingAdjustment Number

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)

stepAdjustments List<Property Map>

A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)

targetTrackingConfiguration Property Map

A target tracking scaling policy. Includes support for predefined or customized metrics.

Supporting Types

ScalingPolicyCustomizedMetricSpecification

ScalingPolicyMetric

ScalingPolicyMetricDataQuery

ScalingPolicyMetricDimension

Name string
Value string
Name string
Value string
name String
value String
name string
value string
name str
value str
name String
value String

ScalingPolicyMetricStat

ScalingPolicyPredefinedMetricSpecification

ScalingPolicyPredictiveScalingConfiguration

ScalingPolicyPredictiveScalingCustomizedCapacityMetric

ScalingPolicyPredictiveScalingCustomizedLoadMetric

ScalingPolicyPredictiveScalingCustomizedScalingMetric

ScalingPolicyPredictiveScalingMetricSpecification

ScalingPolicyPredictiveScalingPredefinedLoadMetric

ScalingPolicyPredictiveScalingPredefinedMetricPair

ScalingPolicyPredictiveScalingPredefinedScalingMetric

ScalingPolicyStepAdjustment

ScalingPolicyTargetTrackingConfiguration

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0