/** * 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 namespace Aws { namespace AutoScaling { namespace Model { /** */ class AWS_AUTOSCALING_API PutScalingPolicyRequest : public AutoScalingRequest { public: 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::String SerializePayload() const override; protected: 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)

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

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

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

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

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

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

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

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

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

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

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

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

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

One of the following policy types:

  • * TargetTrackingScaling

  • StepScaling *

  • SimpleScaling (default)

*/ 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 positive 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 positive 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 positive 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 positive value.

*

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

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

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.

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.

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

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.

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.

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

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.

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.

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

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.

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.

*/ 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; } /** *

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.

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

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.

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

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.

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

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.

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

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

The following predefined metrics are available:

*
  • ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel parameter 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. Includes support for predefined or * customized metrics.

The following predefined metrics are available:

*
  • ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel parameter 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. Includes support for predefined or * customized metrics.

The following predefined metrics are available:

*
  • ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel parameter 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. Includes support for predefined or * customized metrics.

The following predefined metrics are available:

*
  • ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel parameter 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. Includes support for predefined or * customized metrics.

The following predefined metrics are available:

*
  • ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel parameter 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. Includes support for predefined or * customized metrics.

The following predefined metrics are available:

*
  • ASGAverageCPUUtilization

  • * ASGAverageNetworkIn

  • * ASGAverageNetworkOut

  • * ALBRequestCountPerTarget

If you specify * ALBRequestCountPerTarget for the metric, you must specify the * ResourceLabel parameter 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;} private: Aws::String m_autoScalingGroupName; bool m_autoScalingGroupNameHasBeenSet; Aws::String m_policyName; bool m_policyNameHasBeenSet; Aws::String m_policyType; bool m_policyTypeHasBeenSet; Aws::String m_adjustmentType; bool m_adjustmentTypeHasBeenSet; int m_minAdjustmentStep; bool m_minAdjustmentStepHasBeenSet; int m_minAdjustmentMagnitude; bool m_minAdjustmentMagnitudeHasBeenSet; int m_scalingAdjustment; bool m_scalingAdjustmentHasBeenSet; int m_cooldown; bool m_cooldownHasBeenSet; Aws::String m_metricAggregationType; bool m_metricAggregationTypeHasBeenSet; Aws::Vector m_stepAdjustments; bool m_stepAdjustmentsHasBeenSet; int m_estimatedInstanceWarmup; bool m_estimatedInstanceWarmupHasBeenSet; TargetTrackingConfiguration m_targetTrackingConfiguration; bool m_targetTrackingConfigurationHasBeenSet; bool m_enabled; bool m_enabledHasBeenSet; }; } // namespace Model } // namespace AutoScaling } // namespace Aws