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

The configuration based on which FinSpace will scale in or scale out nodes in * your cluster.

See Also:

AWS * API Reference

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

The lowest number of nodes to scale. This value must be at least 1 and less * than the maxNodeCount. If the nodes in a cluster belong to multiple * availability zones, then minNodeCount must be at least 3.

*/ inline int GetMinNodeCount() const{ return m_minNodeCount; } /** *

The lowest number of nodes to scale. This value must be at least 1 and less * than the maxNodeCount. If the nodes in a cluster belong to multiple * availability zones, then minNodeCount must be at least 3.

*/ inline bool MinNodeCountHasBeenSet() const { return m_minNodeCountHasBeenSet; } /** *

The lowest number of nodes to scale. This value must be at least 1 and less * than the maxNodeCount. If the nodes in a cluster belong to multiple * availability zones, then minNodeCount must be at least 3.

*/ inline void SetMinNodeCount(int value) { m_minNodeCountHasBeenSet = true; m_minNodeCount = value; } /** *

The lowest number of nodes to scale. This value must be at least 1 and less * than the maxNodeCount. If the nodes in a cluster belong to multiple * availability zones, then minNodeCount must be at least 3.

*/ inline AutoScalingConfiguration& WithMinNodeCount(int value) { SetMinNodeCount(value); return *this;} /** *

The highest number of nodes to scale. This value cannot be greater than * 5.

*/ inline int GetMaxNodeCount() const{ return m_maxNodeCount; } /** *

The highest number of nodes to scale. This value cannot be greater than * 5.

*/ inline bool MaxNodeCountHasBeenSet() const { return m_maxNodeCountHasBeenSet; } /** *

The highest number of nodes to scale. This value cannot be greater than * 5.

*/ inline void SetMaxNodeCount(int value) { m_maxNodeCountHasBeenSet = true; m_maxNodeCount = value; } /** *

The highest number of nodes to scale. This value cannot be greater than * 5.

*/ inline AutoScalingConfiguration& WithMaxNodeCount(int value) { SetMaxNodeCount(value); return *this;} /** *

The metric your cluster will track in order to scale in and out. For * example, CPU_UTILIZATION_PERCENTAGE is the average CPU usage across * all the nodes in a cluster.

*/ inline const AutoScalingMetric& GetAutoScalingMetric() const{ return m_autoScalingMetric; } /** *

The metric your cluster will track in order to scale in and out. For * example, CPU_UTILIZATION_PERCENTAGE is the average CPU usage across * all the nodes in a cluster.

*/ inline bool AutoScalingMetricHasBeenSet() const { return m_autoScalingMetricHasBeenSet; } /** *

The metric your cluster will track in order to scale in and out. For * example, CPU_UTILIZATION_PERCENTAGE is the average CPU usage across * all the nodes in a cluster.

*/ inline void SetAutoScalingMetric(const AutoScalingMetric& value) { m_autoScalingMetricHasBeenSet = true; m_autoScalingMetric = value; } /** *

The metric your cluster will track in order to scale in and out. For * example, CPU_UTILIZATION_PERCENTAGE is the average CPU usage across * all the nodes in a cluster.

*/ inline void SetAutoScalingMetric(AutoScalingMetric&& value) { m_autoScalingMetricHasBeenSet = true; m_autoScalingMetric = std::move(value); } /** *

The metric your cluster will track in order to scale in and out. For * example, CPU_UTILIZATION_PERCENTAGE is the average CPU usage across * all the nodes in a cluster.

*/ inline AutoScalingConfiguration& WithAutoScalingMetric(const AutoScalingMetric& value) { SetAutoScalingMetric(value); return *this;} /** *

The metric your cluster will track in order to scale in and out. For * example, CPU_UTILIZATION_PERCENTAGE is the average CPU usage across * all the nodes in a cluster.

*/ inline AutoScalingConfiguration& WithAutoScalingMetric(AutoScalingMetric&& value) { SetAutoScalingMetric(std::move(value)); return *this;} /** *

The desired value of the chosen autoScalingMetric. When the * metric drops below this value, the cluster will scale in. When the metric goes * above this value, the cluster will scale out. You can set the target value * between 1 and 100 percent.

*/ inline double GetMetricTarget() const{ return m_metricTarget; } /** *

The desired value of the chosen autoScalingMetric. When the * metric drops below this value, the cluster will scale in. When the metric goes * above this value, the cluster will scale out. You can set the target value * between 1 and 100 percent.

*/ inline bool MetricTargetHasBeenSet() const { return m_metricTargetHasBeenSet; } /** *

The desired value of the chosen autoScalingMetric. When the * metric drops below this value, the cluster will scale in. When the metric goes * above this value, the cluster will scale out. You can set the target value * between 1 and 100 percent.

*/ inline void SetMetricTarget(double value) { m_metricTargetHasBeenSet = true; m_metricTarget = value; } /** *

The desired value of the chosen autoScalingMetric. When the * metric drops below this value, the cluster will scale in. When the metric goes * above this value, the cluster will scale out. You can set the target value * between 1 and 100 percent.

*/ inline AutoScalingConfiguration& WithMetricTarget(double value) { SetMetricTarget(value); return *this;} /** *

The duration in seconds that FinSpace will wait after a scale in event before * initiating another scaling event.

*/ inline double GetScaleInCooldownSeconds() const{ return m_scaleInCooldownSeconds; } /** *

The duration in seconds that FinSpace will wait after a scale in event before * initiating another scaling event.

*/ inline bool ScaleInCooldownSecondsHasBeenSet() const { return m_scaleInCooldownSecondsHasBeenSet; } /** *

The duration in seconds that FinSpace will wait after a scale in event before * initiating another scaling event.

*/ inline void SetScaleInCooldownSeconds(double value) { m_scaleInCooldownSecondsHasBeenSet = true; m_scaleInCooldownSeconds = value; } /** *

The duration in seconds that FinSpace will wait after a scale in event before * initiating another scaling event.

*/ inline AutoScalingConfiguration& WithScaleInCooldownSeconds(double value) { SetScaleInCooldownSeconds(value); return *this;} /** *

The duration in seconds that FinSpace will wait after a scale out event * before initiating another scaling event.

*/ inline double GetScaleOutCooldownSeconds() const{ return m_scaleOutCooldownSeconds; } /** *

The duration in seconds that FinSpace will wait after a scale out event * before initiating another scaling event.

*/ inline bool ScaleOutCooldownSecondsHasBeenSet() const { return m_scaleOutCooldownSecondsHasBeenSet; } /** *

The duration in seconds that FinSpace will wait after a scale out event * before initiating another scaling event.

*/ inline void SetScaleOutCooldownSeconds(double value) { m_scaleOutCooldownSecondsHasBeenSet = true; m_scaleOutCooldownSeconds = value; } /** *

The duration in seconds that FinSpace will wait after a scale out event * before initiating another scaling event.

*/ inline AutoScalingConfiguration& WithScaleOutCooldownSeconds(double value) { SetScaleOutCooldownSeconds(value); return *this;} private: int m_minNodeCount; bool m_minNodeCountHasBeenSet = false; int m_maxNodeCount; bool m_maxNodeCountHasBeenSet = false; AutoScalingMetric m_autoScalingMetric; bool m_autoScalingMetricHasBeenSet = false; double m_metricTarget; bool m_metricTargetHasBeenSet = false; double m_scaleInCooldownSeconds; bool m_scaleInCooldownSecondsHasBeenSet = false; double m_scaleOutCooldownSeconds; bool m_scaleOutCooldownSecondsHasBeenSet = false; }; } // namespace Model } // namespace finspace } // namespace Aws