/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace AutoScaling { namespace Model { /** */ class PutScalingPolicyRequest : public AutoScalingRequest { public: AWS_AUTOSCALING_API PutScalingPolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutScalingPolicy"; } AWS_AUTOSCALING_API Aws::String SerializePayload() const override; protected: AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the Auto Scaling group.

*/ inline const Aws::String& GetAutoScalingGroupName() const{ return m_autoScalingGroupName; } /** *

The name of the Auto Scaling group.

*/ inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(const Aws::String& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(Aws::String&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::move(value); } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(const char* value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName.assign(value); } /** *

The name of the Auto Scaling group.

*/ inline PutScalingPolicyRequest& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;} /** *

The name of the Auto Scaling group.

*/ inline PutScalingPolicyRequest& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(std::move(value)); return *this;} /** *

The name of the Auto Scaling group.

*/ inline PutScalingPolicyRequest& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;} /** *

The name of the policy.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name of the policy.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name of the policy.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name of the policy.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name of the policy.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name of the policy.

*/ inline PutScalingPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the policy.

*/ inline PutScalingPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name of the policy.

*/ inline PutScalingPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline const Aws::String& GetPolicyType() const{ return m_policyType; } /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; } /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline void SetPolicyType(const Aws::String& value) { m_policyTypeHasBeenSet = true; m_policyType = value; } /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline void SetPolicyType(Aws::String&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); } /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline void SetPolicyType(const char* value) { m_policyTypeHasBeenSet = true; m_policyType.assign(value); } /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline PutScalingPolicyRequest& WithPolicyType(const Aws::String& value) { SetPolicyType(value); return *this;} /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline PutScalingPolicyRequest& WithPolicyType(Aws::String&& value) { SetPolicyType(std::move(value)); return *this;} /** *

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

  • * PredictiveScaling

*/ inline PutScalingPolicyRequest& WithPolicyType(const char* value) { SetPolicyType(value); return *this;} /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline const Aws::String& GetAdjustmentType() const{ return m_adjustmentType; } /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline bool AdjustmentTypeHasBeenSet() const { return m_adjustmentTypeHasBeenSet; } /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline void SetAdjustmentType(const Aws::String& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = value; } /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline void SetAdjustmentType(Aws::String&& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = std::move(value); } /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline void SetAdjustmentType(const char* value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType.assign(value); } /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline PutScalingPolicyRequest& WithAdjustmentType(const Aws::String& value) { SetAdjustmentType(value); return *this;} /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline PutScalingPolicyRequest& WithAdjustmentType(Aws::String&& value) { SetAdjustmentType(std::move(value)); return *this;} /** *

Specifies how the scaling adjustment is interpreted (for example, an absolute * number or a percentage). The valid values are ChangeInCapacity, * ExactCapacity, and PercentChangeInCapacity.

*

Required if the policy type is StepScaling or * SimpleScaling. For more information, see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*/ inline PutScalingPolicyRequest& WithAdjustmentType(const char* value) { SetAdjustmentType(value); return *this;} /** *

Available for backward compatibility. Use MinAdjustmentMagnitude * instead.

*/ inline int GetMinAdjustmentStep() const{ return m_minAdjustmentStep; } /** *

Available for backward compatibility. Use MinAdjustmentMagnitude * instead.

*/ inline bool MinAdjustmentStepHasBeenSet() const { return m_minAdjustmentStepHasBeenSet; } /** *

Available for backward compatibility. Use MinAdjustmentMagnitude * instead.

*/ inline void SetMinAdjustmentStep(int value) { m_minAdjustmentStepHasBeenSet = true; m_minAdjustmentStep = value; } /** *

Available for backward compatibility. Use MinAdjustmentMagnitude * instead.

*/ inline PutScalingPolicyRequest& WithMinAdjustmentStep(int value) { SetMinAdjustmentStep(value); return *this;} /** *

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.

Valid only if the policy type is * StepScaling or SimpleScaling. For more information, * see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*

Some Auto Scaling groups use instance weights. In this case, set the * MinAdjustmentMagnitude to a value that is at least as large as your * largest instance weight.

*/ inline int GetMinAdjustmentMagnitude() const{ return m_minAdjustmentMagnitude; } /** *

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.

Valid only if the policy type is * StepScaling or SimpleScaling. For more information, * see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*

Some Auto Scaling groups use instance weights. In this case, set the * MinAdjustmentMagnitude to a value that is at least as large as your * largest instance weight.

*/ inline bool MinAdjustmentMagnitudeHasBeenSet() const { return m_minAdjustmentMagnitudeHasBeenSet; } /** *

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.

Valid only if the policy type is * StepScaling or SimpleScaling. For more information, * see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*

Some Auto Scaling groups use instance weights. In this case, set the * MinAdjustmentMagnitude to a value that is at least as large as your * largest instance weight.

*/ inline void SetMinAdjustmentMagnitude(int value) { m_minAdjustmentMagnitudeHasBeenSet = true; m_minAdjustmentMagnitude = value; } /** *

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.

Valid only if the policy type is * StepScaling or SimpleScaling. For more information, * see Scaling * adjustment types in the Amazon EC2 Auto Scaling User Guide.

*

Some Auto Scaling groups use instance weights. In this case, set the * MinAdjustmentMagnitude to a value that is at least as large as your * largest instance weight.

*/ inline PutScalingPolicyRequest& WithMinAdjustmentMagnitude(int value) { SetMinAdjustmentMagnitude(value); return *this;} /** *

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 non-negative * value.

Required if the policy type is SimpleScaling. (Not * used with any other policy type.)

*/ inline int GetScalingAdjustment() const{ return m_scalingAdjustment; } /** *

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 non-negative * value.

Required if the policy type is SimpleScaling. (Not * used with any other policy type.)

*/ inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; } /** *

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 non-negative * value.

Required if the policy type is SimpleScaling. (Not * used with any other policy type.)

*/ inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; } /** *

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 non-negative * value.

Required if the policy type is SimpleScaling. (Not * used with any other policy type.)

*/ inline PutScalingPolicyRequest& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;} /** *

A cooldown period, in seconds, that applies to a specific simple scaling * policy. When a cooldown period is specified here, it overrides the default * cooldown.

Valid only if the policy type is SimpleScaling. * For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

Default: None

*/ inline int GetCooldown() const{ return m_cooldown; } /** *

A cooldown period, in seconds, that applies to a specific simple scaling * policy. When a cooldown period is specified here, it overrides the default * cooldown.

Valid only if the policy type is SimpleScaling. * For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

Default: None

*/ inline bool CooldownHasBeenSet() const { return m_cooldownHasBeenSet; } /** *

A cooldown period, in seconds, that applies to a specific simple scaling * policy. When a cooldown period is specified here, it overrides the default * cooldown.

Valid only if the policy type is SimpleScaling. * For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

Default: None

*/ inline void SetCooldown(int value) { m_cooldownHasBeenSet = true; m_cooldown = value; } /** *

A cooldown period, in seconds, that applies to a specific simple scaling * policy. When a cooldown period is specified here, it overrides the default * cooldown.

Valid only if the policy type is SimpleScaling. * For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

Default: None

*/ inline PutScalingPolicyRequest& WithCooldown(int value) { SetCooldown(value); return *this;} /** *

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.

*/ inline const Aws::String& GetMetricAggregationType() const{ return m_metricAggregationType; } /** *

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.

*/ inline bool MetricAggregationTypeHasBeenSet() const { return m_metricAggregationTypeHasBeenSet; } /** *

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.

*/ inline void SetMetricAggregationType(const Aws::String& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = value; } /** *

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.

*/ inline void SetMetricAggregationType(Aws::String&& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = std::move(value); } /** *

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.

*/ inline void SetMetricAggregationType(const char* value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType.assign(value); } /** *

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.

*/ inline PutScalingPolicyRequest& WithMetricAggregationType(const Aws::String& value) { SetMetricAggregationType(value); return *this;} /** *

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.

*/ inline PutScalingPolicyRequest& WithMetricAggregationType(Aws::String&& value) { SetMetricAggregationType(std::move(value)); return *this;} /** *

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.

*/ inline PutScalingPolicyRequest& WithMetricAggregationType(const char* value) { SetMetricAggregationType(value); return *this;} /** *

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.)

*/ inline const Aws::Vector& GetStepAdjustments() const{ return m_stepAdjustments; } /** *

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.)

*/ inline bool StepAdjustmentsHasBeenSet() const { return m_stepAdjustmentsHasBeenSet; } /** *

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.)

*/ inline void SetStepAdjustments(const Aws::Vector& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = value; } /** *

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.)

*/ inline void SetStepAdjustments(Aws::Vector&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = std::move(value); } /** *

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.)

*/ inline PutScalingPolicyRequest& WithStepAdjustments(const Aws::Vector& value) { SetStepAdjustments(value); return *this;} /** *

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.)

*/ inline PutScalingPolicyRequest& WithStepAdjustments(Aws::Vector&& value) { SetStepAdjustments(std::move(value)); return *this;} /** *

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.)

*/ inline PutScalingPolicyRequest& AddStepAdjustments(const StepAdjustment& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(value); return *this; } /** *

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.)

*/ inline PutScalingPolicyRequest& AddStepAdjustments(StepAdjustment&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(std::move(value)); return *this; } /** *

Not needed if the default instance warmup is defined for the group. *

The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics. This warm-up period applies to instances * launched due to a specific target tracking or step scaling policy. When a * warm-up period is specified here, it overrides the default instance warmup.

*

Valid only if the policy type is TargetTrackingScaling or * StepScaling.

The default is to use the value for the * default instance warmup defined for the group. If default instance warmup is * null, then EstimatedInstanceWarmup falls back to the value of * default cooldown.

*/ inline int GetEstimatedInstanceWarmup() const{ return m_estimatedInstanceWarmup; } /** *

Not needed if the default instance warmup is defined for the group. *

The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics. This warm-up period applies to instances * launched due to a specific target tracking or step scaling policy. When a * warm-up period is specified here, it overrides the default instance warmup.

*

Valid only if the policy type is TargetTrackingScaling or * StepScaling.

The default is to use the value for the * default instance warmup defined for the group. If default instance warmup is * null, then EstimatedInstanceWarmup falls back to the value of * default cooldown.

*/ inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; } /** *

Not needed if the default instance warmup is defined for the group. *

The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics. This warm-up period applies to instances * launched due to a specific target tracking or step scaling policy. When a * warm-up period is specified here, it overrides the default instance warmup.

*

Valid only if the policy type is TargetTrackingScaling or * StepScaling.

The default is to use the value for the * default instance warmup defined for the group. If default instance warmup is * null, then EstimatedInstanceWarmup falls back to the value of * default cooldown.

*/ inline void SetEstimatedInstanceWarmup(int value) { m_estimatedInstanceWarmupHasBeenSet = true; m_estimatedInstanceWarmup = value; } /** *

Not needed if the default instance warmup is defined for the group. *

The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics. This warm-up period applies to instances * launched due to a specific target tracking or step scaling policy. When a * warm-up period is specified here, it overrides the default instance warmup.

*

Valid only if the policy type is TargetTrackingScaling or * StepScaling.

The default is to use the value for the * default instance warmup defined for the group. If default instance warmup is * null, then EstimatedInstanceWarmup falls back to the value of * default cooldown.

*/ inline PutScalingPolicyRequest& WithEstimatedInstanceWarmup(int value) { SetEstimatedInstanceWarmup(value); return *this;} /** *

A target tracking scaling policy. Provides support for predefined or custom * metrics.

The following predefined metrics are available:

  • *

    ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel property with the * PredefinedMetricSpecification.

For more information, see TargetTrackingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is TargetTrackingScaling.

*/ inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const{ return m_targetTrackingConfiguration; } /** *

A target tracking scaling policy. Provides support for predefined or custom * metrics.

The following predefined metrics are available:

  • *

    ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel property with the * PredefinedMetricSpecification.

For more information, see TargetTrackingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is TargetTrackingScaling.

*/ inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; } /** *

A target tracking scaling policy. Provides support for predefined or custom * metrics.

The following predefined metrics are available:

  • *

    ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel property with the * PredefinedMetricSpecification.

For more information, see TargetTrackingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is TargetTrackingScaling.

*/ inline void SetTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = value; } /** *

A target tracking scaling policy. Provides support for predefined or custom * metrics.

The following predefined metrics are available:

  • *

    ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel property with the * PredefinedMetricSpecification.

For more information, see TargetTrackingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is TargetTrackingScaling.

*/ inline void SetTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = std::move(value); } /** *

A target tracking scaling policy. Provides support for predefined or custom * metrics.

The following predefined metrics are available:

  • *

    ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel property with the * PredefinedMetricSpecification.

For more information, see TargetTrackingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is TargetTrackingScaling.

*/ inline PutScalingPolicyRequest& WithTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { SetTargetTrackingConfiguration(value); return *this;} /** *

A target tracking scaling policy. Provides support for predefined or custom * metrics.

The following predefined metrics are available:

  • *

    ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel property with the * PredefinedMetricSpecification.

For more information, see TargetTrackingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is TargetTrackingScaling.

*/ inline PutScalingPolicyRequest& WithTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { SetTargetTrackingConfiguration(std::move(value)); return *this;} /** *

Indicates whether the scaling policy is enabled or disabled. The default is * enabled. For more information, see Disabling * a scaling policy for an Auto Scaling group in the Amazon EC2 Auto Scaling * User Guide.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Indicates whether the scaling policy is enabled or disabled. The default is * enabled. For more information, see Disabling * a scaling policy for an Auto Scaling group in the Amazon EC2 Auto Scaling * User Guide.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Indicates whether the scaling policy is enabled or disabled. The default is * enabled. For more information, see Disabling * a scaling policy for an Auto Scaling group in the Amazon EC2 Auto Scaling * User Guide.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Indicates whether the scaling policy is enabled or disabled. The default is * enabled. For more information, see Disabling * a scaling policy for an Auto Scaling group in the Amazon EC2 Auto Scaling * User Guide.

*/ inline PutScalingPolicyRequest& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

A predictive scaling policy. Provides support for predefined and custom * metrics.

Predefined metrics include CPU utilization, network in/out, and * the Application Load Balancer request count.

For more information, see PredictiveScalingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is PredictiveScaling.

*/ inline const PredictiveScalingConfiguration& GetPredictiveScalingConfiguration() const{ return m_predictiveScalingConfiguration; } /** *

A predictive scaling policy. Provides support for predefined and custom * metrics.

Predefined metrics include CPU utilization, network in/out, and * the Application Load Balancer request count.

For more information, see PredictiveScalingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is PredictiveScaling.

*/ inline bool PredictiveScalingConfigurationHasBeenSet() const { return m_predictiveScalingConfigurationHasBeenSet; } /** *

A predictive scaling policy. Provides support for predefined and custom * metrics.

Predefined metrics include CPU utilization, network in/out, and * the Application Load Balancer request count.

For more information, see PredictiveScalingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is PredictiveScaling.

*/ inline void SetPredictiveScalingConfiguration(const PredictiveScalingConfiguration& value) { m_predictiveScalingConfigurationHasBeenSet = true; m_predictiveScalingConfiguration = value; } /** *

A predictive scaling policy. Provides support for predefined and custom * metrics.

Predefined metrics include CPU utilization, network in/out, and * the Application Load Balancer request count.

For more information, see PredictiveScalingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is PredictiveScaling.

*/ inline void SetPredictiveScalingConfiguration(PredictiveScalingConfiguration&& value) { m_predictiveScalingConfigurationHasBeenSet = true; m_predictiveScalingConfiguration = std::move(value); } /** *

A predictive scaling policy. Provides support for predefined and custom * metrics.

Predefined metrics include CPU utilization, network in/out, and * the Application Load Balancer request count.

For more information, see PredictiveScalingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is PredictiveScaling.

*/ inline PutScalingPolicyRequest& WithPredictiveScalingConfiguration(const PredictiveScalingConfiguration& value) { SetPredictiveScalingConfiguration(value); return *this;} /** *

A predictive scaling policy. Provides support for predefined and custom * metrics.

Predefined metrics include CPU utilization, network in/out, and * the Application Load Balancer request count.

For more information, see PredictiveScalingConfiguration * in the Amazon EC2 Auto Scaling API Reference.

Required if the * policy type is PredictiveScaling.

*/ inline PutScalingPolicyRequest& WithPredictiveScalingConfiguration(PredictiveScalingConfiguration&& value) { SetPredictiveScalingConfiguration(std::move(value)); return *this;} private: Aws::String m_autoScalingGroupName; bool m_autoScalingGroupNameHasBeenSet = false; Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_policyType; bool m_policyTypeHasBeenSet = false; Aws::String m_adjustmentType; bool m_adjustmentTypeHasBeenSet = false; int m_minAdjustmentStep; bool m_minAdjustmentStepHasBeenSet = false; int m_minAdjustmentMagnitude; bool m_minAdjustmentMagnitudeHasBeenSet = false; int m_scalingAdjustment; bool m_scalingAdjustmentHasBeenSet = false; int m_cooldown; bool m_cooldownHasBeenSet = false; Aws::String m_metricAggregationType; bool m_metricAggregationTypeHasBeenSet = false; Aws::Vector m_stepAdjustments; bool m_stepAdjustmentsHasBeenSet = false; int m_estimatedInstanceWarmup; bool m_estimatedInstanceWarmupHasBeenSet = false; TargetTrackingConfiguration m_targetTrackingConfiguration; bool m_targetTrackingConfigurationHasBeenSet = false; bool m_enabled; bool m_enabledHasBeenSet = false; PredictiveScalingConfiguration m_predictiveScalingConfiguration; bool m_predictiveScalingConfigurationHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws