/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Describes a scaling policy.See Also:
AWS
* API Reference
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 ScalingPolicy& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;} /** *The name of the Auto Scaling group.
*/ inline ScalingPolicy& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(std::move(value)); return *this;} /** *The name of the Auto Scaling group.
*/ inline ScalingPolicy& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;} /** *The name of the scaling policy.
*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *The name of the scaling policy.
*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *The name of the scaling policy.
*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *The name of the scaling policy.
*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *The name of the scaling policy.
*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *The name of the scaling policy.
*/ inline ScalingPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *The name of the scaling policy.
*/ inline ScalingPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *The name of the scaling policy.
*/ inline ScalingPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *The Amazon Resource Name (ARN) of the policy.
*/ inline const Aws::String& GetPolicyARN() const{ return m_policyARN; } /** *The Amazon Resource Name (ARN) of the policy.
*/ inline bool PolicyARNHasBeenSet() const { return m_policyARNHasBeenSet; } /** *The Amazon Resource Name (ARN) of the policy.
*/ inline void SetPolicyARN(const Aws::String& value) { m_policyARNHasBeenSet = true; m_policyARN = value; } /** *The Amazon Resource Name (ARN) of the policy.
*/ inline void SetPolicyARN(Aws::String&& value) { m_policyARNHasBeenSet = true; m_policyARN = std::move(value); } /** *The Amazon Resource Name (ARN) of the policy.
*/ inline void SetPolicyARN(const char* value) { m_policyARNHasBeenSet = true; m_policyARN.assign(value); } /** *The Amazon Resource Name (ARN) of the policy.
*/ inline ScalingPolicy& WithPolicyARN(const Aws::String& value) { SetPolicyARN(value); return *this;} /** *The Amazon Resource Name (ARN) of the policy.
*/ inline ScalingPolicy& WithPolicyARN(Aws::String&& value) { SetPolicyARN(std::move(value)); return *this;} /** *The Amazon Resource Name (ARN) of the policy.
*/ inline ScalingPolicy& WithPolicyARN(const char* value) { SetPolicyARN(value); return *this;} /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline const Aws::String& GetPolicyType() const{ return m_policyType; } /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; } /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline void SetPolicyType(const Aws::String& value) { m_policyTypeHasBeenSet = true; m_policyType = value; } /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline void SetPolicyType(Aws::String&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); } /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline void SetPolicyType(const char* value) { m_policyTypeHasBeenSet = true; m_policyType.assign(value); } /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline ScalingPolicy& WithPolicyType(const Aws::String& value) { SetPolicyType(value); return *this;} /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline ScalingPolicy& WithPolicyType(Aws::String&& value) { SetPolicyType(std::move(value)); return *this;} /** *One of the following policy types:
* TargetTrackingScaling
StepScaling
*
SimpleScaling (default)
For * more information, see Target * Tracking Scaling Policies and Step * and Simple Scaling Policies in the Amazon EC2 Auto Scaling User * Guide.
*/ inline ScalingPolicy& 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.
Specifies how the scaling adjustment is interpreted (for example, an absolute
* number or a percentage). The valid values are ChangeInCapacity,
* ExactCapacity, and PercentChangeInCapacity.
Specifies how the scaling adjustment is interpreted (for example, an absolute
* number or a percentage). The valid values are ChangeInCapacity,
* ExactCapacity, and PercentChangeInCapacity.
Specifies how the scaling adjustment is interpreted (for example, an absolute
* number or a percentage). The valid values are ChangeInCapacity,
* ExactCapacity, and PercentChangeInCapacity.
Specifies how the scaling adjustment is interpreted (for example, an absolute
* number or a percentage). The valid values are ChangeInCapacity,
* ExactCapacity, and PercentChangeInCapacity.
Specifies how the scaling adjustment is interpreted (for example, an absolute
* number or a percentage). The valid values are ChangeInCapacity,
* ExactCapacity, and PercentChangeInCapacity.
Specifies how the scaling adjustment is interpreted (for example, an absolute
* number or a percentage). The valid values are ChangeInCapacity,
* ExactCapacity, and PercentChangeInCapacity.
Specifies how the scaling adjustment is interpreted (for example, an absolute
* number or a percentage). The valid values are ChangeInCapacity,
* ExactCapacity, and PercentChangeInCapacity.
Available for backward compatibility. Use MinAdjustmentMagnitude
* instead.
Available for backward compatibility. Use MinAdjustmentMagnitude
* instead.
Available for backward compatibility. Use MinAdjustmentMagnitude
* instead.
Available for backward compatibility. Use MinAdjustmentMagnitude
* instead.
The minimum value to scale by when the adjustment type is
* PercentChangeInCapacity.
The minimum value to scale by when the adjustment type is
* PercentChangeInCapacity.
The minimum value to scale by when the adjustment type is
* PercentChangeInCapacity.
The minimum value to scale by when the adjustment type is
* PercentChangeInCapacity.
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.
*/ 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.
*/ 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.
*/ 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.
*/ inline ScalingPolicy& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;} /** *The duration of the policy's cooldown period, in seconds.
*/ inline int GetCooldown() const{ return m_cooldown; } /** *The duration of the policy's cooldown period, in seconds.
*/ inline bool CooldownHasBeenSet() const { return m_cooldownHasBeenSet; } /** *The duration of the policy's cooldown period, in seconds.
*/ inline void SetCooldown(int value) { m_cooldownHasBeenSet = true; m_cooldown = value; } /** *The duration of the policy's cooldown period, in seconds.
*/ inline ScalingPolicy& WithCooldown(int value) { SetCooldown(value); return *this;} /** *A set of adjustments that enable you to scale based on the size of the alarm * breach.
*/ inline const Aws::VectorA set of adjustments that enable you to scale based on the size of the alarm * breach.
*/ inline bool StepAdjustmentsHasBeenSet() const { return m_stepAdjustmentsHasBeenSet; } /** *A set of adjustments that enable you to scale based on the size of the alarm * breach.
*/ inline void SetStepAdjustments(const Aws::VectorA set of adjustments that enable you to scale based on the size of the alarm * breach.
*/ inline void SetStepAdjustments(Aws::VectorA set of adjustments that enable you to scale based on the size of the alarm * breach.
*/ inline ScalingPolicy& WithStepAdjustments(const Aws::VectorA set of adjustments that enable you to scale based on the size of the alarm * breach.
*/ inline ScalingPolicy& WithStepAdjustments(Aws::VectorA set of adjustments that enable you to scale based on the size of the alarm * breach.
*/ inline ScalingPolicy& 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.
*/ inline ScalingPolicy& AddStepAdjustments(StepAdjustment&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(std::move(value)); return *this; } /** *The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The aggregation type for the CloudWatch metrics. The valid values are
* Minimum, Maximum, and Average.
The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics.
*/ inline int GetEstimatedInstanceWarmup() const{ return m_estimatedInstanceWarmup; } /** *The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics.
*/ inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; } /** *The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics.
*/ 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.
*/ inline ScalingPolicy& WithEstimatedInstanceWarmup(int value) { SetEstimatedInstanceWarmup(value); return *this;} /** *The CloudWatch alarms related to the policy.
*/ inline const Aws::VectorThe CloudWatch alarms related to the policy.
*/ inline bool AlarmsHasBeenSet() const { return m_alarmsHasBeenSet; } /** *The CloudWatch alarms related to the policy.
*/ inline void SetAlarms(const Aws::VectorThe CloudWatch alarms related to the policy.
*/ inline void SetAlarms(Aws::VectorThe CloudWatch alarms related to the policy.
*/ inline ScalingPolicy& WithAlarms(const Aws::VectorThe CloudWatch alarms related to the policy.
*/ inline ScalingPolicy& WithAlarms(Aws::VectorThe CloudWatch alarms related to the policy.
*/ inline ScalingPolicy& AddAlarms(const Alarm& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(value); return *this; } /** *The CloudWatch alarms related to the policy.
*/ inline ScalingPolicy& AddAlarms(Alarm&& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(std::move(value)); return *this; } /** *A target tracking scaling policy.
*/ inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const{ return m_targetTrackingConfiguration; } /** *A target tracking scaling policy.
*/ inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; } /** *A target tracking scaling policy.
*/ inline void SetTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = value; } /** *A target tracking scaling policy.
*/ inline void SetTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = std::move(value); } /** *A target tracking scaling policy.
*/ inline ScalingPolicy& WithTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { SetTargetTrackingConfiguration(value); return *this;} /** *A target tracking scaling policy.
*/ inline ScalingPolicy& WithTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { SetTargetTrackingConfiguration(std::move(value)); return *this;} /** *Indicates whether the policy is enabled (true) or disabled
* (false).
Indicates whether the policy is enabled (true) or disabled
* (false).
Indicates whether the policy is enabled (true) or disabled
* (false).
Indicates whether the policy is enabled (true) or disabled
* (false).