/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace AutoScaling { namespace Model { /** */ class StartInstanceRefreshRequest : public AutoScalingRequest { public: AWS_AUTOSCALING_API 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_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 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.

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

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

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

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

*/ 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.

*/ 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.

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

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

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

The desired configuration. For example, the desired configuration can specify * a new launch template or a new version of the current launch template.

*

Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the * settings of the Auto Scaling group to reflect the new desired configuration. *

When you specify a new launch template or a new version of the * current launch template for your desired configuration, consider enabling the * SkipMatching property in preferences. If it's enabled, Amazon EC2 * Auto Scaling skips replacing instances that already use the specified launch * template and instance types. This can help you reduce the number of replacements * that are required to apply updates.

*/ inline const DesiredConfiguration& GetDesiredConfiguration() const{ return m_desiredConfiguration; } /** *

The desired configuration. For example, the desired configuration can specify * a new launch template or a new version of the current launch template.

*

Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the * settings of the Auto Scaling group to reflect the new desired configuration. *

When you specify a new launch template or a new version of the * current launch template for your desired configuration, consider enabling the * SkipMatching property in preferences. If it's enabled, Amazon EC2 * Auto Scaling skips replacing instances that already use the specified launch * template and instance types. This can help you reduce the number of replacements * that are required to apply updates.

*/ inline bool DesiredConfigurationHasBeenSet() const { return m_desiredConfigurationHasBeenSet; } /** *

The desired configuration. For example, the desired configuration can specify * a new launch template or a new version of the current launch template.

*

Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the * settings of the Auto Scaling group to reflect the new desired configuration. *

When you specify a new launch template or a new version of the * current launch template for your desired configuration, consider enabling the * SkipMatching property in preferences. If it's enabled, Amazon EC2 * Auto Scaling skips replacing instances that already use the specified launch * template and instance types. This can help you reduce the number of replacements * that are required to apply updates.

*/ inline void SetDesiredConfiguration(const DesiredConfiguration& value) { m_desiredConfigurationHasBeenSet = true; m_desiredConfiguration = value; } /** *

The desired configuration. For example, the desired configuration can specify * a new launch template or a new version of the current launch template.

*

Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the * settings of the Auto Scaling group to reflect the new desired configuration. *

When you specify a new launch template or a new version of the * current launch template for your desired configuration, consider enabling the * SkipMatching property in preferences. If it's enabled, Amazon EC2 * Auto Scaling skips replacing instances that already use the specified launch * template and instance types. This can help you reduce the number of replacements * that are required to apply updates.

*/ inline void SetDesiredConfiguration(DesiredConfiguration&& value) { m_desiredConfigurationHasBeenSet = true; m_desiredConfiguration = std::move(value); } /** *

The desired configuration. For example, the desired configuration can specify * a new launch template or a new version of the current launch template.

*

Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the * settings of the Auto Scaling group to reflect the new desired configuration. *

When you specify a new launch template or a new version of the * current launch template for your desired configuration, consider enabling the * SkipMatching property in preferences. If it's enabled, Amazon EC2 * Auto Scaling skips replacing instances that already use the specified launch * template and instance types. This can help you reduce the number of replacements * that are required to apply updates.

*/ inline StartInstanceRefreshRequest& WithDesiredConfiguration(const DesiredConfiguration& value) { SetDesiredConfiguration(value); return *this;} /** *

The desired configuration. For example, the desired configuration can specify * a new launch template or a new version of the current launch template.

*

Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the * settings of the Auto Scaling group to reflect the new desired configuration. *

When you specify a new launch template or a new version of the * current launch template for your desired configuration, consider enabling the * SkipMatching property in preferences. If it's enabled, Amazon EC2 * Auto Scaling skips replacing instances that already use the specified launch * template and instance types. This can help you reduce the number of replacements * that are required to apply updates.

*/ inline StartInstanceRefreshRequest& WithDesiredConfiguration(DesiredConfiguration&& value) { SetDesiredConfiguration(std::move(value)); return *this;} /** *

Sets your preferences for the instance refresh so that it performs as * expected when you start it. Includes the instance warmup time, the minimum * healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to * use if instances that are in Standby state or protected from scale * in are found. You can also choose to enable additional features, such as the * following:

  • Auto rollback

  • Checkpoints

    *
  • Skip matching

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

Sets your preferences for the instance refresh so that it performs as * expected when you start it. Includes the instance warmup time, the minimum * healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to * use if instances that are in Standby state or protected from scale * in are found. You can also choose to enable additional features, such as the * following:

  • Auto rollback

  • Checkpoints

    *
  • Skip matching

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

Sets your preferences for the instance refresh so that it performs as * expected when you start it. Includes the instance warmup time, the minimum * healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to * use if instances that are in Standby state or protected from scale * in are found. You can also choose to enable additional features, such as the * following:

  • Auto rollback

  • Checkpoints

    *
  • Skip matching

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

Sets your preferences for the instance refresh so that it performs as * expected when you start it. Includes the instance warmup time, the minimum * healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to * use if instances that are in Standby state or protected from scale * in are found. You can also choose to enable additional features, such as the * following:

  • Auto rollback

  • Checkpoints

    *
  • Skip matching

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

Sets your preferences for the instance refresh so that it performs as * expected when you start it. Includes the instance warmup time, the minimum * healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to * use if instances that are in Standby state or protected from scale * in are found. You can also choose to enable additional features, such as the * following:

  • Auto rollback

  • Checkpoints

    *
  • Skip matching

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

Sets your preferences for the instance refresh so that it performs as * expected when you start it. Includes the instance warmup time, the minimum * healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to * use if instances that are in Standby state or protected from scale * in are found. You can also choose to enable additional features, such as the * following:

  • Auto rollback

  • Checkpoints

    *
  • Skip matching

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