/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ApplicationAutoScaling { namespace Model { /** *

Represents a step scaling policy configuration to use with Application Auto * Scaling.

For more information, see Step * scaling policies in the Application Auto Scaling User * Guide.

See Also:

AWS * API Reference

*/ class StepScalingPolicyConfiguration { public: AWS_APPLICATIONAUTOSCALING_API StepScalingPolicyConfiguration(); AWS_APPLICATIONAUTOSCALING_API StepScalingPolicyConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_APPLICATIONAUTOSCALING_API StepScalingPolicyConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APPLICATIONAUTOSCALING_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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

AdjustmentType is * required if you are adding a new step scaling policy configuration.

*/ inline const AdjustmentType& GetAdjustmentType() const{ return m_adjustmentType; } /** *

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

AdjustmentType is * required if you are adding a new step scaling policy configuration.

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

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

AdjustmentType is * required if you are adding a new step scaling policy configuration.

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

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

AdjustmentType is * required if you are adding a new step scaling policy configuration.

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

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

AdjustmentType is * required if you are adding a new step scaling policy configuration.

*/ inline StepScalingPolicyConfiguration& WithAdjustmentType(const AdjustmentType& value) { SetAdjustmentType(value); return *this;} /** *

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

AdjustmentType is * required if you are adding a new step scaling policy configuration.

*/ inline StepScalingPolicyConfiguration& WithAdjustmentType(AdjustmentType&& value) { SetAdjustmentType(std::move(value)); return *this;} /** *

A set of adjustments that enable you to scale based on the size of the alarm * breach.

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

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

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

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

A set of adjustments that enable you to scale based on the size of the alarm * breach.

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

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

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

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

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

*/ inline StepScalingPolicyConfiguration& 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.

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

*/ inline StepScalingPolicyConfiguration& 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.

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

*/ inline StepScalingPolicyConfiguration& 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.

At least one step adjustment is required if you are adding a new * step scaling policy configuration.

*/ inline StepScalingPolicyConfiguration& AddStepAdjustments(StepAdjustment&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(std::move(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 Amazon ECS service by 25 percent and you * specify a MinAdjustmentMagnitude of 2. If the service has 4 tasks * and the scaling policy is performed, 25 percent of 4 is 1. However, because you * specified a MinAdjustmentMagnitude of 2, Application Auto Scaling * scales out the service by 2 tasks.

*/ 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 Amazon ECS service by 25 percent and you * specify a MinAdjustmentMagnitude of 2. If the service has 4 tasks * and the scaling policy is performed, 25 percent of 4 is 1. However, because you * specified a MinAdjustmentMagnitude of 2, Application Auto Scaling * scales out the service by 2 tasks.

*/ 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 Amazon ECS service by 25 percent and you * specify a MinAdjustmentMagnitude of 2. If the service has 4 tasks * and the scaling policy is performed, 25 percent of 4 is 1. However, because you * specified a MinAdjustmentMagnitude of 2, Application Auto Scaling * scales out the service by 2 tasks.

*/ 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 Amazon ECS service by 25 percent and you * specify a MinAdjustmentMagnitude of 2. If the service has 4 tasks * and the scaling policy is performed, 25 percent of 4 is 1. However, because you * specified a MinAdjustmentMagnitude of 2, Application Auto Scaling * scales out the service by 2 tasks.

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

The amount of time, in seconds, to wait for a previous scaling activity to * take effect. If not specified, the default value is 300. For more information, * see Cooldown * period in the Application Auto Scaling User Guide.

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

The amount of time, in seconds, to wait for a previous scaling activity to * take effect. If not specified, the default value is 300. For more information, * see Cooldown * period in the Application Auto Scaling User Guide.

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

The amount of time, in seconds, to wait for a previous scaling activity to * take effect. If not specified, the default value is 300. For more information, * see Cooldown * period in the Application Auto Scaling User Guide.

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

The amount of time, in seconds, to wait for a previous scaling activity to * take effect. If not specified, the default value is 300. For more information, * see Cooldown * period in the Application Auto Scaling User Guide.

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

The aggregation type for the CloudWatch metrics. Valid values are * Minimum, Maximum, and Average. If the * aggregation type is null, the value is treated as Average.

*/ inline const MetricAggregationType& GetMetricAggregationType() const{ return m_metricAggregationType; } /** *

The aggregation type for the CloudWatch metrics. Valid values are * Minimum, Maximum, and Average. If the * aggregation type is null, the value is treated as Average.

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

The aggregation type for the CloudWatch metrics. Valid values are * Minimum, Maximum, and Average. If the * aggregation type is null, the value is treated as Average.

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

The aggregation type for the CloudWatch metrics. Valid values are * Minimum, Maximum, and Average. If the * aggregation type is null, the value is treated as Average.

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

The aggregation type for the CloudWatch metrics. Valid values are * Minimum, Maximum, and Average. If the * aggregation type is null, the value is treated as Average.

*/ inline StepScalingPolicyConfiguration& WithMetricAggregationType(const MetricAggregationType& value) { SetMetricAggregationType(value); return *this;} /** *

The aggregation type for the CloudWatch metrics. Valid values are * Minimum, Maximum, and Average. If the * aggregation type is null, the value is treated as Average.

*/ inline StepScalingPolicyConfiguration& WithMetricAggregationType(MetricAggregationType&& value) { SetMetricAggregationType(std::move(value)); return *this;} private: AdjustmentType m_adjustmentType; bool m_adjustmentTypeHasBeenSet = false; Aws::Vector m_stepAdjustments; bool m_stepAdjustmentsHasBeenSet = false; int m_minAdjustmentMagnitude; bool m_minAdjustmentMagnitudeHasBeenSet = false; int m_cooldown; bool m_cooldownHasBeenSet = false; MetricAggregationType m_metricAggregationType; bool m_metricAggregationTypeHasBeenSet = false; }; } // namespace Model } // namespace ApplicationAutoScaling } // namespace Aws