/**
* 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. The range is 8.515920e-109 to 1.174271e+108 * (Base 10) or 2e-360 to 2e360 (Base 2).
*/ inline double GetTargetValue() const{ return m_targetValue; } /** *The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 * (Base 10) or 2e-360 to 2e360 (Base 2).
*/ inline bool TargetValueHasBeenSet() const { return m_targetValueHasBeenSet; } /** *The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 * (Base 10) or 2e-360 to 2e360 (Base 2).
*/ inline void SetTargetValue(double value) { m_targetValueHasBeenSet = true; m_targetValue = value; } /** *The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 * (Base 10) or 2e-360 to 2e360 (Base 2).
*/ 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, after a scale-out activity completes before * another scale-out activity can start. This value is not used if the scalable * resource is an Auto Scaling group.
While the cooldown period is in * effect, the capacity that has been added by the previous scale-out event that * initiated the cooldown is calculated as part of the desired capacity for the * next scale out. The intention is to continuously (but not excessively) scale * out.
*/ inline int GetScaleOutCooldown() const{ return m_scaleOutCooldown; } /** *The amount of time, in seconds, after a scale-out activity completes before * another scale-out activity can start. This value is not used if the scalable * resource is an Auto Scaling group.
While the cooldown period is in * effect, the capacity that has been added by the previous scale-out event that * initiated the cooldown is calculated as part of the desired capacity for the * next scale out. The intention is to continuously (but not excessively) scale * out.
*/ inline bool ScaleOutCooldownHasBeenSet() const { return m_scaleOutCooldownHasBeenSet; } /** *The amount of time, in seconds, after a scale-out activity completes before * another scale-out activity can start. This value is not used if the scalable * resource is an Auto Scaling group.
While the cooldown period is in * effect, the capacity that has been added by the previous scale-out event that * initiated the cooldown is calculated as part of the desired capacity for the * next scale out. The intention is to continuously (but not excessively) scale * out.
*/ inline void SetScaleOutCooldown(int value) { m_scaleOutCooldownHasBeenSet = true; m_scaleOutCooldown = value; } /** *The amount of time, in seconds, after a scale-out activity completes before * another scale-out activity can start. This value is not used if the scalable * resource is an Auto Scaling group.
While the cooldown period is in * effect, the capacity that has been added by the previous scale-out event that * initiated the cooldown is calculated as part of the desired capacity for the * next scale out. The intention is to continuously (but not excessively) scale * out.
*/ 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 value is not used if the scalable * resource is an Auto Scaling group.
The cooldown period is used to block * subsequent scale in requests until it has expired. The intention is to scale in * conservatively to protect your application's availability. However, if another * alarm triggers a scale-out policy during the cooldown period after a scale-in, * AWS Auto Scaling scales out your scalable target immediately.
*/ 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 value is not used if the scalable * resource is an Auto Scaling group.
The cooldown period is used to block * subsequent scale in requests until it has expired. The intention is to scale in * conservatively to protect your application's availability. However, if another * alarm triggers a scale-out policy during the cooldown period after a scale-in, * AWS Auto Scaling scales out your scalable target immediately.
*/ 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 value is not used if the scalable * resource is an Auto Scaling group.
The cooldown period is used to block * subsequent scale in requests until it has expired. The intention is to scale in * conservatively to protect your application's availability. However, if another * alarm triggers a scale-out policy during the cooldown period after a scale-in, * AWS Auto Scaling scales out your scalable target immediately.
*/ 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 value is not used if the scalable * resource is an Auto Scaling group.
The cooldown period is used to block * subsequent scale in requests until it has expired. The intention is to scale in * conservatively to protect your application's availability. However, if another * alarm triggers a scale-out policy during the cooldown period after a scale-in, * AWS Auto Scaling scales out your scalable target immediately.
*/ 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; CustomizedScalingMetricSpecification m_customizedScalingMetricSpecification; bool m_customizedScalingMetricSpecificationHasBeenSet; double m_targetValue; bool m_targetValueHasBeenSet; bool m_disableScaleIn; bool m_disableScaleInHasBeenSet; int m_scaleOutCooldown; bool m_scaleOutCooldownHasBeenSet; int m_scaleInCooldown; bool m_scaleInCooldownHasBeenSet; int m_estimatedInstanceWarmup; bool m_estimatedInstanceWarmupHasBeenSet; }; } // namespace Model } // namespace AutoScalingPlans } // namespace Aws