/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace AutoScaling { namespace Model { /** */ class SetInstanceProtectionRequest : public AutoScalingRequest { public: AWS_AUTOSCALING_API SetInstanceProtectionRequest(); // 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 "SetInstanceProtection"; } AWS_AUTOSCALING_API Aws::String SerializePayload() const override; protected: AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline const Aws::Vector& GetInstanceIds() const{ return m_instanceIds; } /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; } /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline void SetInstanceIds(const Aws::Vector& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; } /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline void SetInstanceIds(Aws::Vector&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); } /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline SetInstanceProtectionRequest& WithInstanceIds(const Aws::Vector& value) { SetInstanceIds(value); return *this;} /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline SetInstanceProtectionRequest& WithInstanceIds(Aws::Vector&& value) { SetInstanceIds(std::move(value)); return *this;} /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline SetInstanceProtectionRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; } /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline SetInstanceProtectionRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; } /** *

One or more instance IDs. You can specify up to 50 instances.

*/ inline SetInstanceProtectionRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; } /** *

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 SetInstanceProtectionRequest& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;} /** *

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline bool GetProtectedFromScaleIn() const{ return m_protectedFromScaleIn; } /** *

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline bool ProtectedFromScaleInHasBeenSet() const { return m_protectedFromScaleInHasBeenSet; } /** *

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline void SetProtectedFromScaleIn(bool value) { m_protectedFromScaleInHasBeenSet = true; m_protectedFromScaleIn = value; } /** *

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline SetInstanceProtectionRequest& WithProtectedFromScaleIn(bool value) { SetProtectedFromScaleIn(value); return *this;} private: Aws::Vector m_instanceIds; bool m_instanceIdsHasBeenSet = false; Aws::String m_autoScalingGroupName; bool m_autoScalingGroupNameHasBeenSet = false; bool m_protectedFromScaleIn; bool m_protectedFromScaleInHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws