/** * 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 AutoScaling { namespace Model { /** */ class PutWarmPoolRequest : public AutoScalingRequest { public: AWS_AUTOSCALING_API PutWarmPoolRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutWarmPool"; } AWS_AUTOSCALING_API Aws::String SerializePayload() const override; protected: AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the Auto Scaling group.

*/ inline const Aws::String& GetAutoScalingGroupName() const{ return m_autoScalingGroupName; } /** *

The name of the Auto Scaling group.

*/ inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(const Aws::String& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(Aws::String&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::move(value); } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(const char* value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName.assign(value); } /** *

The name of the Auto Scaling group.

*/ inline PutWarmPoolRequest& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;} /** *

The name of the Auto Scaling group.

*/ inline PutWarmPoolRequest& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(std::move(value)); return *this;} /** *

The name of the Auto Scaling group.

*/ inline PutWarmPoolRequest& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;} /** *

Specifies 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. * This is an optional property. Specify it only if you do not want the warm pool * size to be determined by the difference between the group's maximum capacity and * its desired capacity.

If a value for * MaxGroupPreparedCapacity is not specified, Amazon EC2 Auto Scaling * launches and maintains the difference between the group's maximum capacity and * its desired capacity. If you specify a value for * MaxGroupPreparedCapacity, Amazon EC2 Auto Scaling uses the * difference between the MaxGroupPreparedCapacity and the desired * capacity instead.

The size of the warm pool is dynamic. Only when * MaxGroupPreparedCapacity and MinSize are set to the * same value does the warm pool have an absolute size.

If the * desired capacity of the Auto Scaling group is higher than the * MaxGroupPreparedCapacity, the capacity of the warm pool is 0, * unless you specify a value for MinSize. To remove a value that you * previously set, include the property but specify -1 for the value.

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

Specifies 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. * This is an optional property. Specify it only if you do not want the warm pool * size to be determined by the difference between the group's maximum capacity and * its desired capacity.

If a value for * MaxGroupPreparedCapacity is not specified, Amazon EC2 Auto Scaling * launches and maintains the difference between the group's maximum capacity and * its desired capacity. If you specify a value for * MaxGroupPreparedCapacity, Amazon EC2 Auto Scaling uses the * difference between the MaxGroupPreparedCapacity and the desired * capacity instead.

The size of the warm pool is dynamic. Only when * MaxGroupPreparedCapacity and MinSize are set to the * same value does the warm pool have an absolute size.

If the * desired capacity of the Auto Scaling group is higher than the * MaxGroupPreparedCapacity, the capacity of the warm pool is 0, * unless you specify a value for MinSize. To remove a value that you * previously set, include the property but specify -1 for the value.

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

Specifies 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. * This is an optional property. Specify it only if you do not want the warm pool * size to be determined by the difference between the group's maximum capacity and * its desired capacity.

If a value for * MaxGroupPreparedCapacity is not specified, Amazon EC2 Auto Scaling * launches and maintains the difference between the group's maximum capacity and * its desired capacity. If you specify a value for * MaxGroupPreparedCapacity, Amazon EC2 Auto Scaling uses the * difference between the MaxGroupPreparedCapacity and the desired * capacity instead.

The size of the warm pool is dynamic. Only when * MaxGroupPreparedCapacity and MinSize are set to the * same value does the warm pool have an absolute size.

If the * desired capacity of the Auto Scaling group is higher than the * MaxGroupPreparedCapacity, the capacity of the warm pool is 0, * unless you specify a value for MinSize. To remove a value that you * previously set, include the property but specify -1 for the value.

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

Specifies 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. * This is an optional property. Specify it only if you do not want the warm pool * size to be determined by the difference between the group's maximum capacity and * its desired capacity.

If a value for * MaxGroupPreparedCapacity is not specified, Amazon EC2 Auto Scaling * launches and maintains the difference between the group's maximum capacity and * its desired capacity. If you specify a value for * MaxGroupPreparedCapacity, Amazon EC2 Auto Scaling uses the * difference between the MaxGroupPreparedCapacity and the desired * capacity instead.

The size of the warm pool is dynamic. Only when * MaxGroupPreparedCapacity and MinSize are set to the * same value does the warm pool have an absolute size.

If the * desired capacity of the Auto Scaling group is higher than the * MaxGroupPreparedCapacity, the capacity of the warm pool is 0, * unless you specify a value for MinSize. To remove a value that you * previously set, include the property but specify -1 for the value.

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

Specifies the minimum number of instances to maintain in the warm pool. This * helps you to ensure that there is always a certain number of warmed instances * available to handle traffic spikes. Defaults to 0 if not specified.

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

Specifies the minimum number of instances to maintain in the warm pool. This * helps you to ensure that there is always a certain number of warmed instances * available to handle traffic spikes. Defaults to 0 if not specified.

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

Specifies the minimum number of instances to maintain in the warm pool. This * helps you to ensure that there is always a certain number of warmed instances * available to handle traffic spikes. Defaults to 0 if not specified.

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

Specifies the minimum number of instances to maintain in the warm pool. This * helps you to ensure that there is always a certain number of warmed instances * available to handle traffic spikes. Defaults to 0 if not specified.

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

Sets the instance state to transition to after the lifecycle actions are * complete. Default is Stopped.

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

Sets the instance state to transition to after the lifecycle actions are * complete. Default is Stopped.

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

Sets the instance state to transition to after the lifecycle actions are * complete. Default is Stopped.

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

Sets the instance state to transition to after the lifecycle actions are * complete. Default is Stopped.

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

Sets the instance state to transition to after the lifecycle actions are * complete. Default is Stopped.

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

Sets the instance state to transition to after the lifecycle actions are * complete. Default is Stopped.

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

Indicates whether instances in the Auto Scaling group can be returned to the * warm pool on scale in. The default is to terminate instances in the Auto Scaling * group when the group scales in.

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

Indicates whether instances in the Auto Scaling group can be returned to the * warm pool on scale in. The default is to terminate instances in the Auto Scaling * group when the group scales in.

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

Indicates whether instances in the Auto Scaling group can be returned to the * warm pool on scale in. The default is to terminate instances in the Auto Scaling * group when the group scales in.

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

Indicates whether instances in the Auto Scaling group can be returned to the * warm pool on scale in. The default is to terminate instances in the Auto Scaling * group when the group scales in.

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

Indicates whether instances in the Auto Scaling group can be returned to the * warm pool on scale in. The default is to terminate instances in the Auto Scaling * group when the group scales in.

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

Indicates whether instances in the Auto Scaling group can be returned to the * warm pool on scale in. The default is to terminate instances in the Auto Scaling * group when the group scales in.

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