/** * 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 EC2 { namespace Model { /** */ class AWS_EC2_API ModifyInstancePlacementRequest : public EC2Request { public: ModifyInstancePlacementRequest(); // 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 "ModifyInstancePlacement"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The affinity setting for the instance.

*/ inline const Affinity& GetAffinity() const{ return m_affinity; } /** *

The affinity setting for the instance.

*/ inline bool AffinityHasBeenSet() const { return m_affinityHasBeenSet; } /** *

The affinity setting for the instance.

*/ inline void SetAffinity(const Affinity& value) { m_affinityHasBeenSet = true; m_affinity = value; } /** *

The affinity setting for the instance.

*/ inline void SetAffinity(Affinity&& value) { m_affinityHasBeenSet = true; m_affinity = std::move(value); } /** *

The affinity setting for the instance.

*/ inline ModifyInstancePlacementRequest& WithAffinity(const Affinity& value) { SetAffinity(value); return *this;} /** *

The affinity setting for the instance.

*/ inline ModifyInstancePlacementRequest& WithAffinity(Affinity&& value) { SetAffinity(std::move(value)); return *this;} /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline const Aws::String& GetGroupName() const{ return m_groupName; } /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline ModifyInstancePlacementRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline ModifyInstancePlacementRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} /** *

The name of the placement group in which to place the instance. For spread * placement groups, the instance must have a tenancy of default. For * cluster and partition placement groups, the instance must have a tenancy of * default or dedicated.

To remove an instance * from a placement group, specify an empty string ("").

*/ inline ModifyInstancePlacementRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;} /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline const Aws::String& GetHostId() const{ return m_hostId; } /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline bool HostIdHasBeenSet() const { return m_hostIdHasBeenSet; } /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline void SetHostId(const Aws::String& value) { m_hostIdHasBeenSet = true; m_hostId = value; } /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline void SetHostId(Aws::String&& value) { m_hostIdHasBeenSet = true; m_hostId = std::move(value); } /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline void SetHostId(const char* value) { m_hostIdHasBeenSet = true; m_hostId.assign(value); } /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline ModifyInstancePlacementRequest& WithHostId(const Aws::String& value) { SetHostId(value); return *this;} /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline ModifyInstancePlacementRequest& WithHostId(Aws::String&& value) { SetHostId(std::move(value)); return *this;} /** *

The ID of the Dedicated Host with which to associate the instance.

*/ inline ModifyInstancePlacementRequest& WithHostId(const char* value) { SetHostId(value); return *this;} /** *

The ID of the instance that you are modifying.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance that you are modifying.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance that you are modifying.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance that you are modifying.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance that you are modifying.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance that you are modifying.

*/ inline ModifyInstancePlacementRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance that you are modifying.

*/ inline ModifyInstancePlacementRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance that you are modifying.

*/ inline ModifyInstancePlacementRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The tenancy for the instance.

*/ inline const HostTenancy& GetTenancy() const{ return m_tenancy; } /** *

The tenancy for the instance.

*/ inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; } /** *

The tenancy for the instance.

*/ inline void SetTenancy(const HostTenancy& value) { m_tenancyHasBeenSet = true; m_tenancy = value; } /** *

The tenancy for the instance.

*/ inline void SetTenancy(HostTenancy&& value) { m_tenancyHasBeenSet = true; m_tenancy = std::move(value); } /** *

The tenancy for the instance.

*/ inline ModifyInstancePlacementRequest& WithTenancy(const HostTenancy& value) { SetTenancy(value); return *this;} /** *

The tenancy for the instance.

*/ inline ModifyInstancePlacementRequest& WithTenancy(HostTenancy&& value) { SetTenancy(std::move(value)); return *this;} /** *

Reserved for future use.

*/ inline int GetPartitionNumber() const{ return m_partitionNumber; } /** *

Reserved for future use.

*/ inline bool PartitionNumberHasBeenSet() const { return m_partitionNumberHasBeenSet; } /** *

Reserved for future use.

*/ inline void SetPartitionNumber(int value) { m_partitionNumberHasBeenSet = true; m_partitionNumber = value; } /** *

Reserved for future use.

*/ inline ModifyInstancePlacementRequest& WithPartitionNumber(int value) { SetPartitionNumber(value); return *this;} /** *

The ARN of the host resource group in which to place the instance.

*/ inline const Aws::String& GetHostResourceGroupArn() const{ return m_hostResourceGroupArn; } /** *

The ARN of the host resource group in which to place the instance.

*/ inline bool HostResourceGroupArnHasBeenSet() const { return m_hostResourceGroupArnHasBeenSet; } /** *

The ARN of the host resource group in which to place the instance.

*/ inline void SetHostResourceGroupArn(const Aws::String& value) { m_hostResourceGroupArnHasBeenSet = true; m_hostResourceGroupArn = value; } /** *

The ARN of the host resource group in which to place the instance.

*/ inline void SetHostResourceGroupArn(Aws::String&& value) { m_hostResourceGroupArnHasBeenSet = true; m_hostResourceGroupArn = std::move(value); } /** *

The ARN of the host resource group in which to place the instance.

*/ inline void SetHostResourceGroupArn(const char* value) { m_hostResourceGroupArnHasBeenSet = true; m_hostResourceGroupArn.assign(value); } /** *

The ARN of the host resource group in which to place the instance.

*/ inline ModifyInstancePlacementRequest& WithHostResourceGroupArn(const Aws::String& value) { SetHostResourceGroupArn(value); return *this;} /** *

The ARN of the host resource group in which to place the instance.

*/ inline ModifyInstancePlacementRequest& WithHostResourceGroupArn(Aws::String&& value) { SetHostResourceGroupArn(std::move(value)); return *this;} /** *

The ARN of the host resource group in which to place the instance.

*/ inline ModifyInstancePlacementRequest& WithHostResourceGroupArn(const char* value) { SetHostResourceGroupArn(value); return *this;} private: Affinity m_affinity; bool m_affinityHasBeenSet; Aws::String m_groupName; bool m_groupNameHasBeenSet; Aws::String m_hostId; bool m_hostIdHasBeenSet; Aws::String m_instanceId; bool m_instanceIdHasBeenSet; HostTenancy m_tenancy; bool m_tenancyHasBeenSet; int m_partitionNumber; bool m_partitionNumberHasBeenSet; Aws::String m_hostResourceGroupArn; bool m_hostResourceGroupArnHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws