/** * 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 AWS_AUTOSCALING_API StartInstanceRefreshRequest : public AutoScalingRequest { public: StartInstanceRefreshRequest(); // 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 "StartInstanceRefresh"; } Aws::String SerializePayload() const override; protected: 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 StartInstanceRefreshRequest& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;} /** *

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The strategy to use for the instance refresh. The only valid value is * Rolling.

A rolling update is an update that is applied to * all instances in an Auto Scaling group until all instances have been updated. A * rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any * instances that were already replaced are not rolled back to their previous * configuration.

*/ inline const RefreshStrategy& GetStrategy() const{ return m_strategy; } /** *

The strategy to use for the instance refresh. The only valid value is * Rolling.

A rolling update is an update that is applied to * all instances in an Auto Scaling group until all instances have been updated. A * rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any * instances that were already replaced are not rolled back to their previous * configuration.

*/ inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; } /** *

The strategy to use for the instance refresh. The only valid value is * Rolling.

A rolling update is an update that is applied to * all instances in an Auto Scaling group until all instances have been updated. A * rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any * instances that were already replaced are not rolled back to their previous * configuration.

*/ inline void SetStrategy(const RefreshStrategy& value) { m_strategyHasBeenSet = true; m_strategy = value; } /** *

The strategy to use for the instance refresh. The only valid value is * Rolling.

A rolling update is an update that is applied to * all instances in an Auto Scaling group until all instances have been updated. A * rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any * instances that were already replaced are not rolled back to their previous * configuration.

*/ inline void SetStrategy(RefreshStrategy&& value) { m_strategyHasBeenSet = true; m_strategy = std::move(value); } /** *

The strategy to use for the instance refresh. The only valid value is * Rolling.

A rolling update is an update that is applied to * all instances in an Auto Scaling group until all instances have been updated. A * rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any * instances that were already replaced are not rolled back to their previous * configuration.

*/ inline StartInstanceRefreshRequest& WithStrategy(const RefreshStrategy& value) { SetStrategy(value); return *this;} /** *

The strategy to use for the instance refresh. The only valid value is * Rolling.

A rolling update is an update that is applied to * all instances in an Auto Scaling group until all instances have been updated. A * rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any * instances that were already replaced are not rolled back to their previous * configuration.

*/ inline StartInstanceRefreshRequest& WithStrategy(RefreshStrategy&& value) { SetStrategy(std::move(value)); return *this;} /** *

Set of preferences associated with the instance refresh request.

If * not provided, the default values are used. For * MinHealthyPercentage, the default value is 90. For * InstanceWarmup, the default is to use the value specified for the * health check grace period for the Auto Scaling group.

For more * information, see RefreshPreferences * in the Amazon EC2 Auto Scaling API Reference.

*/ inline const RefreshPreferences& GetPreferences() const{ return m_preferences; } /** *

Set of preferences associated with the instance refresh request.

If * not provided, the default values are used. For * MinHealthyPercentage, the default value is 90. For * InstanceWarmup, the default is to use the value specified for the * health check grace period for the Auto Scaling group.

For more * information, see RefreshPreferences * in the Amazon EC2 Auto Scaling API Reference.

*/ inline bool PreferencesHasBeenSet() const { return m_preferencesHasBeenSet; } /** *

Set of preferences associated with the instance refresh request.

If * not provided, the default values are used. For * MinHealthyPercentage, the default value is 90. For * InstanceWarmup, the default is to use the value specified for the * health check grace period for the Auto Scaling group.

For more * information, see RefreshPreferences * in the Amazon EC2 Auto Scaling API Reference.

*/ inline void SetPreferences(const RefreshPreferences& value) { m_preferencesHasBeenSet = true; m_preferences = value; } /** *

Set of preferences associated with the instance refresh request.

If * not provided, the default values are used. For * MinHealthyPercentage, the default value is 90. For * InstanceWarmup, the default is to use the value specified for the * health check grace period for the Auto Scaling group.

For more * information, see RefreshPreferences * in the Amazon EC2 Auto Scaling API Reference.

*/ inline void SetPreferences(RefreshPreferences&& value) { m_preferencesHasBeenSet = true; m_preferences = std::move(value); } /** *

Set of preferences associated with the instance refresh request.

If * not provided, the default values are used. For * MinHealthyPercentage, the default value is 90. For * InstanceWarmup, the default is to use the value specified for the * health check grace period for the Auto Scaling group.

For more * information, see RefreshPreferences * in the Amazon EC2 Auto Scaling API Reference.

*/ inline StartInstanceRefreshRequest& WithPreferences(const RefreshPreferences& value) { SetPreferences(value); return *this;} /** *

Set of preferences associated with the instance refresh request.

If * not provided, the default values are used. For * MinHealthyPercentage, the default value is 90. For * InstanceWarmup, the default is to use the value specified for the * health check grace period for the Auto Scaling group.

For more * information, see RefreshPreferences * in the Amazon EC2 Auto Scaling API Reference.

*/ inline StartInstanceRefreshRequest& WithPreferences(RefreshPreferences&& value) { SetPreferences(std::move(value)); return *this;} private: Aws::String m_autoScalingGroupName; bool m_autoScalingGroupNameHasBeenSet; RefreshStrategy m_strategy; bool m_strategyHasBeenSet; RefreshPreferences m_preferences; bool m_preferencesHasBeenSet; }; } // namespace Model } // namespace AutoScaling } // namespace Aws