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

Describes a warm pool configuration.

See Also:

AWS * API Reference

*/ class WarmPoolConfiguration { public: AWS_AUTOSCALING_API WarmPoolConfiguration(); AWS_AUTOSCALING_API WarmPoolConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_AUTOSCALING_API WarmPoolConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The maximum number of instances that are allowed to be in the warm pool or in * any state except Terminated for the Auto Scaling group.

*/ inline int GetMaxGroupPreparedCapacity() const{ return m_maxGroupPreparedCapacity; } /** *

The maximum number of instances that are allowed to be in the warm pool or in * any state except Terminated for the Auto Scaling group.

*/ inline bool MaxGroupPreparedCapacityHasBeenSet() const { return m_maxGroupPreparedCapacityHasBeenSet; } /** *

The maximum number of instances that are allowed to be in the warm pool or in * any state except Terminated for the Auto Scaling group.

*/ inline void SetMaxGroupPreparedCapacity(int value) { m_maxGroupPreparedCapacityHasBeenSet = true; m_maxGroupPreparedCapacity = value; } /** *

The maximum number of instances that are allowed to be in the warm pool or in * any state except Terminated for the Auto Scaling group.

*/ inline WarmPoolConfiguration& WithMaxGroupPreparedCapacity(int value) { SetMaxGroupPreparedCapacity(value); return *this;} /** *

The minimum number of instances to maintain in the warm pool.

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

The minimum number of instances to maintain in the warm pool.

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

The minimum number of instances to maintain in the warm pool.

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

The minimum number of instances to maintain in the warm pool.

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

The instance state to transition to after the lifecycle actions are * complete.

*/ inline const WarmPoolState& GetPoolState() const{ return m_poolState; } /** *

The instance state to transition to after the lifecycle actions are * complete.

*/ inline bool PoolStateHasBeenSet() const { return m_poolStateHasBeenSet; } /** *

The instance state to transition to after the lifecycle actions are * complete.

*/ inline void SetPoolState(const WarmPoolState& value) { m_poolStateHasBeenSet = true; m_poolState = value; } /** *

The instance state to transition to after the lifecycle actions are * complete.

*/ inline void SetPoolState(WarmPoolState&& value) { m_poolStateHasBeenSet = true; m_poolState = std::move(value); } /** *

The instance state to transition to after the lifecycle actions are * complete.

*/ inline WarmPoolConfiguration& WithPoolState(const WarmPoolState& value) { SetPoolState(value); return *this;} /** *

The instance state to transition to after the lifecycle actions are * complete.

*/ inline WarmPoolConfiguration& WithPoolState(WarmPoolState&& value) { SetPoolState(std::move(value)); return *this;} /** *

The status of a warm pool that is marked for deletion.

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

The status of a warm pool that is marked for deletion.

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

The status of a warm pool that is marked for deletion.

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

The status of a warm pool that is marked for deletion.

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

The status of a warm pool that is marked for deletion.

*/ inline WarmPoolConfiguration& WithStatus(const WarmPoolStatus& value) { SetStatus(value); return *this;} /** *

The status of a warm pool that is marked for deletion.

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

The instance reuse policy.

*/ inline const InstanceReusePolicy& GetInstanceReusePolicy() const{ return m_instanceReusePolicy; } /** *

The instance reuse policy.

*/ inline bool InstanceReusePolicyHasBeenSet() const { return m_instanceReusePolicyHasBeenSet; } /** *

The instance reuse policy.

*/ inline void SetInstanceReusePolicy(const InstanceReusePolicy& value) { m_instanceReusePolicyHasBeenSet = true; m_instanceReusePolicy = value; } /** *

The instance reuse policy.

*/ inline void SetInstanceReusePolicy(InstanceReusePolicy&& value) { m_instanceReusePolicyHasBeenSet = true; m_instanceReusePolicy = std::move(value); } /** *

The instance reuse policy.

*/ inline WarmPoolConfiguration& WithInstanceReusePolicy(const InstanceReusePolicy& value) { SetInstanceReusePolicy(value); return *this;} /** *

The instance reuse policy.

*/ inline WarmPoolConfiguration& WithInstanceReusePolicy(InstanceReusePolicy&& value) { SetInstanceReusePolicy(std::move(value)); return *this;} private: int m_maxGroupPreparedCapacity; bool m_maxGroupPreparedCapacityHasBeenSet = false; int m_minSize; bool m_minSizeHasBeenSet = false; WarmPoolState m_poolState; bool m_poolStateHasBeenSet = false; WarmPoolStatus m_status; bool m_statusHasBeenSet = false; InstanceReusePolicy m_instanceReusePolicy; bool m_instanceReusePolicyHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws