/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Describes a target tracking configuration to use with AWS Auto Scaling. Used
* with ScalingInstruction and ScalingPolicy.See
* Also:
AWS
* API Reference
A predefined metric. You can specify either a predefined metric or a * customized metric.
*/ inline const PredefinedScalingMetricSpecification& GetPredefinedScalingMetricSpecification() const{ return m_predefinedScalingMetricSpecification; } /** *A predefined metric. You can specify either a predefined metric or a * customized metric.
*/ inline bool PredefinedScalingMetricSpecificationHasBeenSet() const { return m_predefinedScalingMetricSpecificationHasBeenSet; } /** *A predefined metric. You can specify either a predefined metric or a * customized metric.
*/ inline void SetPredefinedScalingMetricSpecification(const PredefinedScalingMetricSpecification& value) { m_predefinedScalingMetricSpecificationHasBeenSet = true; m_predefinedScalingMetricSpecification = value; } /** *A predefined metric. You can specify either a predefined metric or a * customized metric.
*/ inline void SetPredefinedScalingMetricSpecification(PredefinedScalingMetricSpecification&& value) { m_predefinedScalingMetricSpecificationHasBeenSet = true; m_predefinedScalingMetricSpecification = std::move(value); } /** *A predefined metric. You can specify either a predefined metric or a * customized metric.
*/ inline TargetTrackingConfiguration& WithPredefinedScalingMetricSpecification(const PredefinedScalingMetricSpecification& value) { SetPredefinedScalingMetricSpecification(value); return *this;} /** *A predefined metric. You can specify either a predefined metric or a * customized metric.
*/ inline TargetTrackingConfiguration& WithPredefinedScalingMetricSpecification(PredefinedScalingMetricSpecification&& value) { SetPredefinedScalingMetricSpecification(std::move(value)); return *this;} /** *A customized metric. You can specify either a predefined metric or a * customized metric.
*/ inline const CustomizedScalingMetricSpecification& GetCustomizedScalingMetricSpecification() const{ return m_customizedScalingMetricSpecification; } /** *A customized metric. You can specify either a predefined metric or a * customized metric.
*/ inline bool CustomizedScalingMetricSpecificationHasBeenSet() const { return m_customizedScalingMetricSpecificationHasBeenSet; } /** *A customized metric. You can specify either a predefined metric or a * customized metric.
*/ inline void SetCustomizedScalingMetricSpecification(const CustomizedScalingMetricSpecification& value) { m_customizedScalingMetricSpecificationHasBeenSet = true; m_customizedScalingMetricSpecification = value; } /** *A customized metric. You can specify either a predefined metric or a * customized metric.
*/ inline void SetCustomizedScalingMetricSpecification(CustomizedScalingMetricSpecification&& value) { m_customizedScalingMetricSpecificationHasBeenSet = true; m_customizedScalingMetricSpecification = std::move(value); } /** *A customized metric. You can specify either a predefined metric or a * customized metric.
*/ inline TargetTrackingConfiguration& WithCustomizedScalingMetricSpecification(const CustomizedScalingMetricSpecification& value) { SetCustomizedScalingMetricSpecification(value); return *this;} /** *A customized metric. You can specify either a predefined metric or a * customized metric.
*/ inline TargetTrackingConfiguration& WithCustomizedScalingMetricSpecification(CustomizedScalingMetricSpecification&& value) { SetCustomizedScalingMetricSpecification(std::move(value)); return *this;} /** *The target value for the metric. Although this property accepts numbers of * type Double, it won't accept values that are either too small or too large. * Values must be in the range of -2^360 to 2^360.
*/ inline double GetTargetValue() const{ return m_targetValue; } /** *The target value for the metric. Although this property accepts numbers of * type Double, it won't accept values that are either too small or too large. * Values must be in the range of -2^360 to 2^360.
*/ inline bool TargetValueHasBeenSet() const { return m_targetValueHasBeenSet; } /** *The target value for the metric. Although this property accepts numbers of * type Double, it won't accept values that are either too small or too large. * Values must be in the range of -2^360 to 2^360.
*/ inline void SetTargetValue(double value) { m_targetValueHasBeenSet = true; m_targetValue = value; } /** *The target value for the metric. Although this property accepts numbers of * type Double, it won't accept values that are either too small or too large. * Values must be in the range of -2^360 to 2^360.
*/ inline TargetTrackingConfiguration& WithTargetValue(double value) { SetTargetValue(value); return *this;} /** *Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is true
, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource.
The default value is false
.
Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is true
, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource.
The default value is false
.
Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is true
, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource.
The default value is false
.
Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is true
, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource.
The default value is false
.
The amount of time, in seconds, to wait for a previous scale-out activity to * take effect. This property is not used if the scalable resource is an Auto * Scaling group.
With the scale-out cooldown period, the intention * is to continuously (but not excessively) scale out. After Auto Scaling * successfully scales out using a target tracking scaling policy, it starts to * calculate the cooldown time. The scaling policy won't increase the desired * capacity again unless either a larger scale out is triggered or the cooldown * period ends.
*/ inline int GetScaleOutCooldown() const{ return m_scaleOutCooldown; } /** *The amount of time, in seconds, to wait for a previous scale-out activity to * take effect. This property is not used if the scalable resource is an Auto * Scaling group.
With the scale-out cooldown period, the intention * is to continuously (but not excessively) scale out. After Auto Scaling * successfully scales out using a target tracking scaling policy, it starts to * calculate the cooldown time. The scaling policy won't increase the desired * capacity again unless either a larger scale out is triggered or the cooldown * period ends.
*/ inline bool ScaleOutCooldownHasBeenSet() const { return m_scaleOutCooldownHasBeenSet; } /** *The amount of time, in seconds, to wait for a previous scale-out activity to * take effect. This property is not used if the scalable resource is an Auto * Scaling group.
With the scale-out cooldown period, the intention * is to continuously (but not excessively) scale out. After Auto Scaling * successfully scales out using a target tracking scaling policy, it starts to * calculate the cooldown time. The scaling policy won't increase the desired * capacity again unless either a larger scale out is triggered or the cooldown * period ends.
*/ inline void SetScaleOutCooldown(int value) { m_scaleOutCooldownHasBeenSet = true; m_scaleOutCooldown = value; } /** *The amount of time, in seconds, to wait for a previous scale-out activity to * take effect. This property is not used if the scalable resource is an Auto * Scaling group.
With the scale-out cooldown period, the intention * is to continuously (but not excessively) scale out. After Auto Scaling * successfully scales out using a target tracking scaling policy, it starts to * calculate the cooldown time. The scaling policy won't increase the desired * capacity again unless either a larger scale out is triggered or the cooldown * period ends.
*/ inline TargetTrackingConfiguration& WithScaleOutCooldown(int value) { SetScaleOutCooldown(value); return *this;} /** *The amount of time, in seconds, after a scale-in activity completes before * another scale-in activity can start. This property is not used if the scalable * resource is an Auto Scaling group.
With the scale-in cooldown * period, the intention is to scale in conservatively to protect your * application’s availability, so scale-in activities are blocked until the * cooldown period has expired. However, if another alarm triggers a scale-out * activity during the scale-in cooldown period, Auto Scaling scales out the target * immediately. In this case, the scale-in cooldown period stops and doesn't * complete.
*/ inline int GetScaleInCooldown() const{ return m_scaleInCooldown; } /** *The amount of time, in seconds, after a scale-in activity completes before * another scale-in activity can start. This property is not used if the scalable * resource is an Auto Scaling group.
With the scale-in cooldown * period, the intention is to scale in conservatively to protect your * application’s availability, so scale-in activities are blocked until the * cooldown period has expired. However, if another alarm triggers a scale-out * activity during the scale-in cooldown period, Auto Scaling scales out the target * immediately. In this case, the scale-in cooldown period stops and doesn't * complete.
*/ inline bool ScaleInCooldownHasBeenSet() const { return m_scaleInCooldownHasBeenSet; } /** *The amount of time, in seconds, after a scale-in activity completes before * another scale-in activity can start. This property is not used if the scalable * resource is an Auto Scaling group.
With the scale-in cooldown * period, the intention is to scale in conservatively to protect your * application’s availability, so scale-in activities are blocked until the * cooldown period has expired. However, if another alarm triggers a scale-out * activity during the scale-in cooldown period, Auto Scaling scales out the target * immediately. In this case, the scale-in cooldown period stops and doesn't * complete.
*/ inline void SetScaleInCooldown(int value) { m_scaleInCooldownHasBeenSet = true; m_scaleInCooldown = value; } /** *The amount of time, in seconds, after a scale-in activity completes before * another scale-in activity can start. This property is not used if the scalable * resource is an Auto Scaling group.
With the scale-in cooldown * period, the intention is to scale in conservatively to protect your * application’s availability, so scale-in activities are blocked until the * cooldown period has expired. However, if another alarm triggers a scale-out * activity during the scale-in cooldown period, Auto Scaling scales out the target * immediately. In this case, the scale-in cooldown period stops and doesn't * complete.
*/ inline TargetTrackingConfiguration& WithScaleInCooldown(int value) { SetScaleInCooldown(value); return *this;} /** *The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics. This value is used only if the resource is * an Auto Scaling group.
*/ inline int GetEstimatedInstanceWarmup() const{ return m_estimatedInstanceWarmup; } /** *The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics. This value is used only if the resource is * an Auto Scaling group.
*/ inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; } /** *The estimated time, in seconds, until a newly launched instance can * contribute to the CloudWatch metrics. This value is used only if the resource is * an Auto Scaling group.
*/ 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. This value is used only if the resource is * an Auto Scaling group.
*/ inline TargetTrackingConfiguration& WithEstimatedInstanceWarmup(int value) { SetEstimatedInstanceWarmup(value); return *this;} private: PredefinedScalingMetricSpecification m_predefinedScalingMetricSpecification; bool m_predefinedScalingMetricSpecificationHasBeenSet = false; CustomizedScalingMetricSpecification m_customizedScalingMetricSpecification; bool m_customizedScalingMetricSpecificationHasBeenSet = false; double m_targetValue; bool m_targetValueHasBeenSet = false; bool m_disableScaleIn; bool m_disableScaleInHasBeenSet = false; int m_scaleOutCooldown; bool m_scaleOutCooldownHasBeenSet = false; int m_scaleInCooldown; bool m_scaleInCooldownHasBeenSet = false; int m_estimatedInstanceWarmup; bool m_estimatedInstanceWarmupHasBeenSet = false; }; } // namespace Model } // namespace AutoScalingPlans } // namespace Aws