/** * 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 ECS { namespace Model { /** *

The managed scaling settings for the Auto Scaling group capacity * provider.

When managed scaling is enabled, Amazon ECS manages the * scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a * target tracking scaling policy using an Amazon ECS-managed CloudWatch metric * with the specified targetCapacity value as the target value for the * metric. For more information, see Using * Managed Scaling in the Amazon Elastic Container Service Developer * Guide.

If managed scaling is disabled, the user must manage the * scaling of the Auto Scaling group.

See Also:

AWS * API Reference

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

Whether or not to enable managed scaling for the capacity provider.

*/ inline const ManagedScalingStatus& GetStatus() const{ return m_status; } /** *

Whether or not to enable managed scaling for the capacity provider.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

Whether or not to enable managed scaling for the capacity provider.

*/ inline void SetStatus(const ManagedScalingStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

Whether or not to enable managed scaling for the capacity provider.

*/ inline void SetStatus(ManagedScalingStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

Whether or not to enable managed scaling for the capacity provider.

*/ inline ManagedScaling& WithStatus(const ManagedScalingStatus& value) { SetStatus(value); return *this;} /** *

Whether or not to enable managed scaling for the capacity provider.

*/ inline ManagedScaling& WithStatus(ManagedScalingStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The target capacity value for the capacity provider. The specified value must * be greater than 0 and less than or equal to 100. A * value of 100 will result in the Amazon EC2 instances in your Auto * Scaling group being completely utilized.

*/ inline int GetTargetCapacity() const{ return m_targetCapacity; } /** *

The target capacity value for the capacity provider. The specified value must * be greater than 0 and less than or equal to 100. A * value of 100 will result in the Amazon EC2 instances in your Auto * Scaling group being completely utilized.

*/ inline bool TargetCapacityHasBeenSet() const { return m_targetCapacityHasBeenSet; } /** *

The target capacity value for the capacity provider. The specified value must * be greater than 0 and less than or equal to 100. A * value of 100 will result in the Amazon EC2 instances in your Auto * Scaling group being completely utilized.

*/ inline void SetTargetCapacity(int value) { m_targetCapacityHasBeenSet = true; m_targetCapacity = value; } /** *

The target capacity value for the capacity provider. The specified value must * be greater than 0 and less than or equal to 100. A * value of 100 will result in the Amazon EC2 instances in your Auto * Scaling group being completely utilized.

*/ inline ManagedScaling& WithTargetCapacity(int value) { SetTargetCapacity(value); return *this;} /** *

The minimum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 1 is used.

*/ inline int GetMinimumScalingStepSize() const{ return m_minimumScalingStepSize; } /** *

The minimum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 1 is used.

*/ inline bool MinimumScalingStepSizeHasBeenSet() const { return m_minimumScalingStepSizeHasBeenSet; } /** *

The minimum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 1 is used.

*/ inline void SetMinimumScalingStepSize(int value) { m_minimumScalingStepSizeHasBeenSet = true; m_minimumScalingStepSize = value; } /** *

The minimum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 1 is used.

*/ inline ManagedScaling& WithMinimumScalingStepSize(int value) { SetMinimumScalingStepSize(value); return *this;} /** *

The maximum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 10000 is used.

*/ inline int GetMaximumScalingStepSize() const{ return m_maximumScalingStepSize; } /** *

The maximum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 10000 is used.

*/ inline bool MaximumScalingStepSizeHasBeenSet() const { return m_maximumScalingStepSizeHasBeenSet; } /** *

The maximum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 10000 is used.

*/ inline void SetMaximumScalingStepSize(int value) { m_maximumScalingStepSizeHasBeenSet = true; m_maximumScalingStepSize = value; } /** *

The maximum number of container instances that Amazon ECS will scale in or * scale out at one time. If this parameter is omitted, the default value of * 10000 is used.

*/ inline ManagedScaling& WithMaximumScalingStepSize(int value) { SetMaximumScalingStepSize(value); return *this;} private: ManagedScalingStatus m_status; bool m_statusHasBeenSet; int m_targetCapacity; bool m_targetCapacityHasBeenSet; int m_minimumScalingStepSize; bool m_minimumScalingStepSizeHasBeenSet; int m_maximumScalingStepSize; bool m_maximumScalingStepSizeHasBeenSet; }; } // namespace Model } // namespace ECS } // namespace Aws