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

An automatic scaling configuration, which describes how the policy adds or * removes instances, the cooldown period, and the number of Amazon EC2 instances * that will be added each time the CloudWatch metric alarm condition is * satisfied.

See Also:

AWS * API Reference

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

The way in which Amazon EC2 instances are added (if * ScalingAdjustment is a positive number) or terminated (if * ScalingAdjustment is a negative number) each time the scaling * activity is triggered. CHANGE_IN_CAPACITY is the default. * CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count * increments or decrements by ScalingAdjustment, which should be * expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the * instance count increments or decrements by the percentage specified by * ScalingAdjustment, which should be expressed as an integer. For * example, 20 indicates an increase in 20% increments of cluster capacity. * EXACT_CAPACITY indicates the scaling activity results in an * instance group with the number of Amazon EC2 instances specified by * ScalingAdjustment, which should be expressed as a positive * integer.

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

The way in which Amazon EC2 instances are added (if * ScalingAdjustment is a positive number) or terminated (if * ScalingAdjustment is a negative number) each time the scaling * activity is triggered. CHANGE_IN_CAPACITY is the default. * CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count * increments or decrements by ScalingAdjustment, which should be * expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the * instance count increments or decrements by the percentage specified by * ScalingAdjustment, which should be expressed as an integer. For * example, 20 indicates an increase in 20% increments of cluster capacity. * EXACT_CAPACITY indicates the scaling activity results in an * instance group with the number of Amazon EC2 instances specified by * ScalingAdjustment, which should be expressed as a positive * integer.

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

The way in which Amazon EC2 instances are added (if * ScalingAdjustment is a positive number) or terminated (if * ScalingAdjustment is a negative number) each time the scaling * activity is triggered. CHANGE_IN_CAPACITY is the default. * CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count * increments or decrements by ScalingAdjustment, which should be * expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the * instance count increments or decrements by the percentage specified by * ScalingAdjustment, which should be expressed as an integer. For * example, 20 indicates an increase in 20% increments of cluster capacity. * EXACT_CAPACITY indicates the scaling activity results in an * instance group with the number of Amazon EC2 instances specified by * ScalingAdjustment, which should be expressed as a positive * integer.

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

The way in which Amazon EC2 instances are added (if * ScalingAdjustment is a positive number) or terminated (if * ScalingAdjustment is a negative number) each time the scaling * activity is triggered. CHANGE_IN_CAPACITY is the default. * CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count * increments or decrements by ScalingAdjustment, which should be * expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the * instance count increments or decrements by the percentage specified by * ScalingAdjustment, which should be expressed as an integer. For * example, 20 indicates an increase in 20% increments of cluster capacity. * EXACT_CAPACITY indicates the scaling activity results in an * instance group with the number of Amazon EC2 instances specified by * ScalingAdjustment, which should be expressed as a positive * integer.

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

The way in which Amazon EC2 instances are added (if * ScalingAdjustment is a positive number) or terminated (if * ScalingAdjustment is a negative number) each time the scaling * activity is triggered. CHANGE_IN_CAPACITY is the default. * CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count * increments or decrements by ScalingAdjustment, which should be * expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the * instance count increments or decrements by the percentage specified by * ScalingAdjustment, which should be expressed as an integer. For * example, 20 indicates an increase in 20% increments of cluster capacity. * EXACT_CAPACITY indicates the scaling activity results in an * instance group with the number of Amazon EC2 instances specified by * ScalingAdjustment, which should be expressed as a positive * integer.

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

The way in which Amazon EC2 instances are added (if * ScalingAdjustment is a positive number) or terminated (if * ScalingAdjustment is a negative number) each time the scaling * activity is triggered. CHANGE_IN_CAPACITY is the default. * CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count * increments or decrements by ScalingAdjustment, which should be * expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the * instance count increments or decrements by the percentage specified by * ScalingAdjustment, which should be expressed as an integer. For * example, 20 indicates an increase in 20% increments of cluster capacity. * EXACT_CAPACITY indicates the scaling activity results in an * instance group with the number of Amazon EC2 instances specified by * ScalingAdjustment, which should be expressed as a positive * integer.

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

The amount by which to scale in or scale out, based on the specified * AdjustmentType. A positive value adds to the instance group's * Amazon EC2 instance count while a negative number removes instances. If * AdjustmentType is set to EXACT_CAPACITY, the number * should only be a positive integer. If AdjustmentType is set to * PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage * as an integer. For example, -20 indicates a decrease in 20% increments of * cluster capacity.

*/ inline int GetScalingAdjustment() const{ return m_scalingAdjustment; } /** *

The amount by which to scale in or scale out, based on the specified * AdjustmentType. A positive value adds to the instance group's * Amazon EC2 instance count while a negative number removes instances. If * AdjustmentType is set to EXACT_CAPACITY, the number * should only be a positive integer. If AdjustmentType is set to * PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage * as an integer. For example, -20 indicates a decrease in 20% increments of * cluster capacity.

*/ inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; } /** *

The amount by which to scale in or scale out, based on the specified * AdjustmentType. A positive value adds to the instance group's * Amazon EC2 instance count while a negative number removes instances. If * AdjustmentType is set to EXACT_CAPACITY, the number * should only be a positive integer. If AdjustmentType is set to * PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage * as an integer. For example, -20 indicates a decrease in 20% increments of * cluster capacity.

*/ inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; } /** *

The amount by which to scale in or scale out, based on the specified * AdjustmentType. A positive value adds to the instance group's * Amazon EC2 instance count while a negative number removes instances. If * AdjustmentType is set to EXACT_CAPACITY, the number * should only be a positive integer. If AdjustmentType is set to * PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage * as an integer. For example, -20 indicates a decrease in 20% increments of * cluster capacity.

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

The amount of time, in seconds, after a scaling activity completes before any * further trigger-related scaling activities can start. The default value is * 0.

*/ inline int GetCoolDown() const{ return m_coolDown; } /** *

The amount of time, in seconds, after a scaling activity completes before any * further trigger-related scaling activities can start. The default value is * 0.

*/ inline bool CoolDownHasBeenSet() const { return m_coolDownHasBeenSet; } /** *

The amount of time, in seconds, after a scaling activity completes before any * further trigger-related scaling activities can start. The default value is * 0.

*/ inline void SetCoolDown(int value) { m_coolDownHasBeenSet = true; m_coolDown = value; } /** *

The amount of time, in seconds, after a scaling activity completes before any * further trigger-related scaling activities can start. The default value is * 0.

*/ inline SimpleScalingPolicyConfiguration& WithCoolDown(int value) { SetCoolDown(value); return *this;} private: AdjustmentType m_adjustmentType; bool m_adjustmentTypeHasBeenSet = false; int m_scalingAdjustment; bool m_scalingAdjustmentHasBeenSet = false; int m_coolDown; bool m_coolDownHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws