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

An automatic scaling policy for a core instance group or task instance group * in an Amazon EMR cluster. An automatic scaling policy defines how an instance * group dynamically adds and terminates Amazon EC2 instances in response to the * value of a CloudWatch metric. See PutAutoScalingPolicy.

See * Also:

AWS * API Reference

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

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline const ScalingConstraints& GetConstraints() const{ return m_constraints; } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline void SetConstraints(const ScalingConstraints& value) { m_constraintsHasBeenSet = true; m_constraints = value; } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline void SetConstraints(ScalingConstraints&& value) { m_constraintsHasBeenSet = true; m_constraints = std::move(value); } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline AutoScalingPolicy& WithConstraints(const ScalingConstraints& value) { SetConstraints(value); return *this;} /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline AutoScalingPolicy& WithConstraints(ScalingConstraints&& value) { SetConstraints(std::move(value)); return *this;} /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline const Aws::Vector& GetRules() const{ return m_rules; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline void SetRules(const Aws::Vector& value) { m_rulesHasBeenSet = true; m_rules = value; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline void SetRules(Aws::Vector&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicy& WithRules(const Aws::Vector& value) { SetRules(value); return *this;} /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicy& WithRules(Aws::Vector&& value) { SetRules(std::move(value)); return *this;} /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicy& AddRules(const ScalingRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicy& AddRules(ScalingRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; } private: ScalingConstraints m_constraints; bool m_constraintsHasBeenSet = false; Aws::Vector m_rules; bool m_rulesHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws