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

An object representing the scaling configuration details for the Auto Scaling * group that is associated with your node group. When creating a node group, you * must specify all or none of the properties. When updating a node group, you can * specify any or none of the properties.

See Also:

AWS * API Reference

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

The minimum number of nodes that the managed node group can scale in to.

*/ inline int GetMinSize() const{ return m_minSize; } /** *

The minimum number of nodes that the managed node group can scale in to.

*/ inline bool MinSizeHasBeenSet() const { return m_minSizeHasBeenSet; } /** *

The minimum number of nodes that the managed node group can scale in to.

*/ inline void SetMinSize(int value) { m_minSizeHasBeenSet = true; m_minSize = value; } /** *

The minimum number of nodes that the managed node group can scale in to.

*/ inline NodegroupScalingConfig& WithMinSize(int value) { SetMinSize(value); return *this;} /** *

The maximum number of nodes that the managed node group can scale out to. For * information about the maximum number that you can specify, see Amazon * EKS service quotas in the Amazon EKS User Guide.

*/ inline int GetMaxSize() const{ return m_maxSize; } /** *

The maximum number of nodes that the managed node group can scale out to. For * information about the maximum number that you can specify, see Amazon * EKS service quotas in the Amazon EKS User Guide.

*/ inline bool MaxSizeHasBeenSet() const { return m_maxSizeHasBeenSet; } /** *

The maximum number of nodes that the managed node group can scale out to. For * information about the maximum number that you can specify, see Amazon * EKS service quotas in the Amazon EKS User Guide.

*/ inline void SetMaxSize(int value) { m_maxSizeHasBeenSet = true; m_maxSize = value; } /** *

The maximum number of nodes that the managed node group can scale out to. For * information about the maximum number that you can specify, see Amazon * EKS service quotas in the Amazon EKS User Guide.

*/ inline NodegroupScalingConfig& WithMaxSize(int value) { SetMaxSize(value); return *this;} /** *

The current number of nodes that the managed node group should maintain.

*

If you use Cluster Autoscaler, you shouldn't change the * desiredSize value directly, as this can cause the Cluster Autoscaler to suddenly * scale up or scale down.

Whenever this parameter changes, the * number of worker nodes in the node group is updated to the specified size. If * this parameter is given a value that is smaller than the current number of * running worker nodes, the necessary number of worker nodes are terminated to * match the given value. When using CloudFormation, no action occurs if you remove * this parameter from your CFN template.

This parameter can be different * from minSize in some cases, such as when starting with extra hosts for testing. * This parameter can also be different when you want to start with an estimated * number of needed hosts, but let Cluster Autoscaler reduce the number if there * are too many. When Cluster Autoscaler is used, the desiredSize parameter is * altered by Cluster Autoscaler (but can be out-of-date for short periods of * time). Cluster Autoscaler doesn't scale a managed node group lower than minSize * or higher than maxSize.

*/ inline int GetDesiredSize() const{ return m_desiredSize; } /** *

The current number of nodes that the managed node group should maintain.

*

If you use Cluster Autoscaler, you shouldn't change the * desiredSize value directly, as this can cause the Cluster Autoscaler to suddenly * scale up or scale down.

Whenever this parameter changes, the * number of worker nodes in the node group is updated to the specified size. If * this parameter is given a value that is smaller than the current number of * running worker nodes, the necessary number of worker nodes are terminated to * match the given value. When using CloudFormation, no action occurs if you remove * this parameter from your CFN template.

This parameter can be different * from minSize in some cases, such as when starting with extra hosts for testing. * This parameter can also be different when you want to start with an estimated * number of needed hosts, but let Cluster Autoscaler reduce the number if there * are too many. When Cluster Autoscaler is used, the desiredSize parameter is * altered by Cluster Autoscaler (but can be out-of-date for short periods of * time). Cluster Autoscaler doesn't scale a managed node group lower than minSize * or higher than maxSize.

*/ inline bool DesiredSizeHasBeenSet() const { return m_desiredSizeHasBeenSet; } /** *

The current number of nodes that the managed node group should maintain.

*

If you use Cluster Autoscaler, you shouldn't change the * desiredSize value directly, as this can cause the Cluster Autoscaler to suddenly * scale up or scale down.

Whenever this parameter changes, the * number of worker nodes in the node group is updated to the specified size. If * this parameter is given a value that is smaller than the current number of * running worker nodes, the necessary number of worker nodes are terminated to * match the given value. When using CloudFormation, no action occurs if you remove * this parameter from your CFN template.

This parameter can be different * from minSize in some cases, such as when starting with extra hosts for testing. * This parameter can also be different when you want to start with an estimated * number of needed hosts, but let Cluster Autoscaler reduce the number if there * are too many. When Cluster Autoscaler is used, the desiredSize parameter is * altered by Cluster Autoscaler (but can be out-of-date for short periods of * time). Cluster Autoscaler doesn't scale a managed node group lower than minSize * or higher than maxSize.

*/ inline void SetDesiredSize(int value) { m_desiredSizeHasBeenSet = true; m_desiredSize = value; } /** *

The current number of nodes that the managed node group should maintain.

*

If you use Cluster Autoscaler, you shouldn't change the * desiredSize value directly, as this can cause the Cluster Autoscaler to suddenly * scale up or scale down.

Whenever this parameter changes, the * number of worker nodes in the node group is updated to the specified size. If * this parameter is given a value that is smaller than the current number of * running worker nodes, the necessary number of worker nodes are terminated to * match the given value. When using CloudFormation, no action occurs if you remove * this parameter from your CFN template.

This parameter can be different * from minSize in some cases, such as when starting with extra hosts for testing. * This parameter can also be different when you want to start with an estimated * number of needed hosts, but let Cluster Autoscaler reduce the number if there * are too many. When Cluster Autoscaler is used, the desiredSize parameter is * altered by Cluster Autoscaler (but can be out-of-date for short periods of * time). Cluster Autoscaler doesn't scale a managed node group lower than minSize * or higher than maxSize.

*/ inline NodegroupScalingConfig& WithDesiredSize(int value) { SetDesiredSize(value); return *this;} private: int m_minSize; bool m_minSizeHasBeenSet = false; int m_maxSize; bool m_maxSizeHasBeenSet = false; int m_desiredSize; bool m_desiredSizeHasBeenSet = false; }; } // namespace Model } // namespace EKS } // namespace Aws