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

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

See * Also:

AWS * API Reference

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

The lower boundary of Amazon EC2 instances in an instance group below which * scaling activities are not allowed to shrink. Scale-in activities will not * terminate instances below this boundary.

*/ inline int GetMinCapacity() const{ return m_minCapacity; } /** *

The lower boundary of Amazon EC2 instances in an instance group below which * scaling activities are not allowed to shrink. Scale-in activities will not * terminate instances below this boundary.

*/ inline bool MinCapacityHasBeenSet() const { return m_minCapacityHasBeenSet; } /** *

The lower boundary of Amazon EC2 instances in an instance group below which * scaling activities are not allowed to shrink. Scale-in activities will not * terminate instances below this boundary.

*/ inline void SetMinCapacity(int value) { m_minCapacityHasBeenSet = true; m_minCapacity = value; } /** *

The lower boundary of Amazon EC2 instances in an instance group below which * scaling activities are not allowed to shrink. Scale-in activities will not * terminate instances below this boundary.

*/ inline ScalingConstraints& WithMinCapacity(int value) { SetMinCapacity(value); return *this;} /** *

The upper boundary of Amazon EC2 instances in an instance group beyond which * scaling activities are not allowed to grow. Scale-out activities will not add * instances beyond this boundary.

*/ inline int GetMaxCapacity() const{ return m_maxCapacity; } /** *

The upper boundary of Amazon EC2 instances in an instance group beyond which * scaling activities are not allowed to grow. Scale-out activities will not add * instances beyond this boundary.

*/ inline bool MaxCapacityHasBeenSet() const { return m_maxCapacityHasBeenSet; } /** *

The upper boundary of Amazon EC2 instances in an instance group beyond which * scaling activities are not allowed to grow. Scale-out activities will not add * instances beyond this boundary.

*/ inline void SetMaxCapacity(int value) { m_maxCapacityHasBeenSet = true; m_maxCapacity = value; } /** *

The upper boundary of Amazon EC2 instances in an instance group beyond which * scaling activities are not allowed to grow. Scale-out activities will not add * instances beyond this boundary.

*/ inline ScalingConstraints& WithMaxCapacity(int value) { SetMaxCapacity(value); return *this;} private: int m_minCapacity; bool m_minCapacityHasBeenSet = false; int m_maxCapacity; bool m_maxCapacityHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws