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:
- Adjustment
Type 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.
- Estimated
Instance intWarmup 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 stringType 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 intMagnitude 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 string - Policy
Type string One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
- Predictive
Scaling Pulumi.Configuration Aws Native. Auto Scaling. Outputs. Scaling Policy Predictive Scaling Configuration 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 List<Pulumi.Aws Native. Auto Scaling. Outputs. Scaling Policy Step Adjustment> 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 Pulumi.Configuration Aws Native. Auto Scaling. Outputs. Scaling Policy Target Tracking Configuration A target tracking scaling policy. Includes support for predefined or customized metrics.
- Adjustment
Type 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.
- Estimated
Instance intWarmup 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 stringType 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 intMagnitude 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 string - Policy
Type string One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
- Predictive
Scaling ScalingConfiguration Policy Predictive Scaling Configuration 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 []ScalingPolicy Step Adjustment 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 ScalingConfiguration Policy Target Tracking Configuration A target tracking scaling policy. Includes support for predefined or customized metrics.
- adjustment
Type 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.
- estimated
Instance IntegerWarmup 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 StringType 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 IntegerMagnitude 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 String - policy
Type String One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
- predictive
Scaling ScalingConfiguration Policy Predictive Scaling Configuration A predictive scaling policy. Includes support for predefined metrics only.
- scaling
Adjustment 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.)
- step
Adjustments List<ScalingPolicy Step Adjustment> 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 ScalingConfiguration Policy Target Tracking Configuration A target tracking scaling policy. Includes support for predefined or customized metrics.
- adjustment
Type 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.
- estimated
Instance numberWarmup 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 stringType 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 numberMagnitude 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 string - policy
Type string One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
- predictive
Scaling ScalingConfiguration Policy Predictive Scaling Configuration A predictive scaling policy. Includes support for predefined metrics only.
- scaling
Adjustment 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.)
- step
Adjustments ScalingPolicy Step Adjustment[] 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 ScalingConfiguration Policy Target Tracking Configuration 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_ intwarmup 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_ strtype 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_ intmagnitude 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_ Scalingconfiguration Policy Predictive Scaling Configuration 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[ScalingPolicy Step Adjustment] 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_ Scalingconfiguration Policy Target Tracking Configuration A target tracking scaling policy. Includes support for predefined or customized metrics.
- adjustment
Type 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.
- estimated
Instance NumberWarmup 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 StringType 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 NumberMagnitude 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 String - policy
Type String One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
- predictive
Scaling Property MapConfiguration A predictive scaling policy. Includes support for predefined metrics only.
- scaling
Adjustment 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.)
- step
Adjustments 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.)
- target
Tracking Property MapConfiguration A target tracking scaling policy. Includes support for predefined or customized metrics.
Supporting Types
ScalingPolicyCustomizedMetricSpecification
- Metric
Name string - Namespace string
- Statistic string
- Dimensions
List<Pulumi.
Aws Native. Auto Scaling. Inputs. Scaling Policy Metric Dimension> - Unit string
- Metric
Name string - Namespace string
- Statistic string
- Dimensions
[]Scaling
Policy Metric Dimension - Unit string
- metric
Name String - namespace String
- statistic String
- dimensions
List<Scaling
Policy Metric Dimension> - unit String
- metric
Name string - namespace string
- statistic string
- dimensions
Scaling
Policy Metric Dimension[] - unit string
- metric
Name String - namespace String
- statistic String
- dimensions List<Property Map>
- unit String
ScalingPolicyMetric
- Metric
Name string - Namespace string
- Dimensions
[]Scaling
Policy Metric Dimension
- metric
Name string - namespace string
- dimensions
Scaling
Policy Metric Dimension[]
- metric
Name String - namespace String
- dimensions List<Property Map>
ScalingPolicyMetricDataQuery
- Id string
- Expression string
- Label string
- Metric
Stat Pulumi.Aws Native. Auto Scaling. Inputs. Scaling Policy Metric Stat - Return
Data bool
- Id string
- Expression string
- Label string
- Metric
Stat ScalingPolicy Metric Stat - Return
Data bool
- id String
- expression String
- label String
- metric
Stat ScalingPolicy Metric Stat - return
Data Boolean
- id string
- expression string
- label string
- metric
Stat ScalingPolicy Metric Stat - return
Data boolean
- id str
- expression str
- label str
- metric_
stat ScalingPolicy Metric Stat - return_
data bool
- id String
- expression String
- label String
- metric
Stat Property Map - return
Data Boolean
ScalingPolicyMetricDimension
ScalingPolicyMetricStat
- Metric
Scaling
Policy Metric - Stat string
- Unit string
- metric
Scaling
Policy Metric - stat String
- unit String
- metric
Scaling
Policy Metric - stat string
- unit string
- metric
Scaling
Policy Metric - stat str
- unit str
- metric Property Map
- stat String
- unit String
ScalingPolicyPredefinedMetricSpecification
- Predefined
Metric stringType - Resource
Label string
- Predefined
Metric stringType - Resource
Label string
- predefined
Metric StringType - resource
Label String
- predefined
Metric stringType - resource
Label string
- predefined
Metric StringType - resource
Label String
ScalingPolicyPredictiveScalingConfiguration
- metric
Specifications List<Property Map> - max
Capacity StringBreach Behavior - max
Capacity NumberBuffer - mode String
- scheduling
Buffer NumberTime
ScalingPolicyPredictiveScalingCustomizedCapacityMetric
ScalingPolicyPredictiveScalingCustomizedLoadMetric
ScalingPolicyPredictiveScalingCustomizedScalingMetric
ScalingPolicyPredictiveScalingMetricSpecification
- Target
Value double - Customized
Capacity Pulumi.Metric Specification Aws Native. Auto Scaling. Inputs. Scaling Policy Predictive Scaling Customized Capacity Metric - Customized
Load Pulumi.Metric Specification Aws Native. Auto Scaling. Inputs. Scaling Policy Predictive Scaling Customized Load Metric - Customized
Scaling Pulumi.Metric Specification Aws Native. Auto Scaling. Inputs. Scaling Policy Predictive Scaling Customized Scaling Metric - Predefined
Load Pulumi.Metric Specification Aws Native. Auto Scaling. Inputs. Scaling Policy Predictive Scaling Predefined Load Metric - Predefined
Metric Pulumi.Pair Specification Aws Native. Auto Scaling. Inputs. Scaling Policy Predictive Scaling Predefined Metric Pair - Predefined
Scaling Pulumi.Metric Specification Aws Native. Auto Scaling. Inputs. Scaling Policy Predictive Scaling Predefined Scaling Metric
- Target
Value float64 - Customized
Capacity ScalingMetric Specification Policy Predictive Scaling Customized Capacity Metric - Customized
Load ScalingMetric Specification Policy Predictive Scaling Customized Load Metric - Customized
Scaling ScalingMetric Specification Policy Predictive Scaling Customized Scaling Metric - Predefined
Load ScalingMetric Specification Policy Predictive Scaling Predefined Load Metric - Predefined
Metric ScalingPair Specification Policy Predictive Scaling Predefined Metric Pair - Predefined
Scaling ScalingMetric Specification Policy Predictive Scaling Predefined Scaling Metric
- target
Value Double - customized
Capacity ScalingMetric Specification Policy Predictive Scaling Customized Capacity Metric - customized
Load ScalingMetric Specification Policy Predictive Scaling Customized Load Metric - customized
Scaling ScalingMetric Specification Policy Predictive Scaling Customized Scaling Metric - predefined
Load ScalingMetric Specification Policy Predictive Scaling Predefined Load Metric - predefined
Metric ScalingPair Specification Policy Predictive Scaling Predefined Metric Pair - predefined
Scaling ScalingMetric Specification Policy Predictive Scaling Predefined Scaling Metric
- target
Value number - customized
Capacity ScalingMetric Specification Policy Predictive Scaling Customized Capacity Metric - customized
Load ScalingMetric Specification Policy Predictive Scaling Customized Load Metric - customized
Scaling ScalingMetric Specification Policy Predictive Scaling Customized Scaling Metric - predefined
Load ScalingMetric Specification Policy Predictive Scaling Predefined Load Metric - predefined
Metric ScalingPair Specification Policy Predictive Scaling Predefined Metric Pair - predefined
Scaling ScalingMetric Specification Policy Predictive Scaling Predefined Scaling Metric
- target_
value float - customized_
capacity_ Scalingmetric_ specification Policy Predictive Scaling Customized Capacity Metric - customized_
load_ Scalingmetric_ specification Policy Predictive Scaling Customized Load Metric - customized_
scaling_ Scalingmetric_ specification Policy Predictive Scaling Customized Scaling Metric - predefined_
load_ Scalingmetric_ specification Policy Predictive Scaling Predefined Load Metric - predefined_
metric_ Scalingpair_ specification Policy Predictive Scaling Predefined Metric Pair - predefined_
scaling_ Scalingmetric_ specification Policy Predictive Scaling Predefined Scaling Metric
- target
Value Number - customized
Capacity Property MapMetric Specification - customized
Load Property MapMetric Specification - customized
Scaling Property MapMetric Specification - predefined
Load Property MapMetric Specification - predefined
Metric Property MapPair Specification - predefined
Scaling Property MapMetric Specification
ScalingPolicyPredictiveScalingPredefinedLoadMetric
- Predefined
Metric stringType - Resource
Label string
- Predefined
Metric stringType - Resource
Label string
- predefined
Metric StringType - resource
Label String
- predefined
Metric stringType - resource
Label string
- predefined
Metric StringType - resource
Label String
ScalingPolicyPredictiveScalingPredefinedMetricPair
- Predefined
Metric stringType - Resource
Label string
- Predefined
Metric stringType - Resource
Label string
- predefined
Metric StringType - resource
Label String
- predefined
Metric stringType - resource
Label string
- predefined
Metric StringType - resource
Label String
ScalingPolicyPredictiveScalingPredefinedScalingMetric
- Predefined
Metric stringType - Resource
Label string
- Predefined
Metric stringType - Resource
Label string
- predefined
Metric StringType - resource
Label String
- predefined
Metric stringType - resource
Label string
- predefined
Metric StringType - resource
Label String
ScalingPolicyStepAdjustment
- Scaling
Adjustment int - Metric
Interval doubleLower Bound - Metric
Interval doubleUpper Bound
- Scaling
Adjustment int - Metric
Interval float64Lower Bound - Metric
Interval float64Upper Bound
- scaling
Adjustment Integer - metric
Interval DoubleLower Bound - metric
Interval DoubleUpper Bound
- scaling
Adjustment number - metric
Interval numberLower Bound - metric
Interval numberUpper Bound
- scaling
Adjustment Number - metric
Interval NumberLower Bound - metric
Interval NumberUpper Bound
ScalingPolicyTargetTrackingConfiguration
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0