/** * 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 ModifyInstancePlacementRequest : public EC2Request { public: AWS_EC2_API 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_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API 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.

For T3 instances, you must launch * the instance on a Dedicated Host to use a tenancy of host. You * can't change the tenancy from host to dedicated or * default. Attempting to make one of these unsupported tenancy * changes results in an InvalidRequest error code.

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

The tenancy for the instance.

For T3 instances, you must launch * the instance on a Dedicated Host to use a tenancy of host. You * can't change the tenancy from host to dedicated or * default. Attempting to make one of these unsupported tenancy * changes results in an InvalidRequest error code.

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

The tenancy for the instance.

For T3 instances, you must launch * the instance on a Dedicated Host to use a tenancy of host. You * can't change the tenancy from host to dedicated or * default. Attempting to make one of these unsupported tenancy * changes results in an InvalidRequest error code.

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

The tenancy for the instance.

For T3 instances, you must launch * the instance on a Dedicated Host to use a tenancy of host. You * can't change the tenancy from host to dedicated or * default. Attempting to make one of these unsupported tenancy * changes results in an InvalidRequest error code.

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

The tenancy for the instance.

For T3 instances, you must launch * the instance on a Dedicated Host to use a tenancy of host. You * can't change the tenancy from host to dedicated or * default. Attempting to make one of these unsupported tenancy * changes results in an InvalidRequest error code.

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

The tenancy for the instance.

For T3 instances, you must launch * the instance on a Dedicated Host to use a tenancy of host. You * can't change the tenancy from host to dedicated or * default. Attempting to make one of these unsupported tenancy * changes results in an InvalidRequest error code.

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

The number of the partition in which to place the instance. Valid only if the * placement group strategy is set to partition.

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

The number of the partition in which to place the instance. Valid only if the * placement group strategy is set to partition.

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

The number of the partition in which to place the instance. Valid only if the * placement group strategy is set to partition.

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

The number of the partition in which to place the instance. Valid only if the * placement group strategy is set to partition.

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

The ARN of the host resource group in which to place the instance. The * instance must have a tenancy of host to specify this parameter.

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

The ARN of the host resource group in which to place the instance. The * instance must have a tenancy of host to specify this parameter.

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

The ARN of the host resource group in which to place the instance. The * instance must have a tenancy of host to specify this parameter.

*/ 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. The * instance must have a tenancy of host to specify this parameter.

*/ 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. The * instance must have a tenancy of host to specify this parameter.

*/ 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. The * instance must have a tenancy of host to specify this parameter.

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

The ARN of the host resource group in which to place the instance. The * instance must have a tenancy of host to specify this parameter.

*/ 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. The * instance must have a tenancy of host to specify this parameter.

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

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

*/ inline const Aws::String& GetGroupId() const{ return m_groupId; } /** *

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

*/ inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

*/ inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

*/ inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

*/ inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

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

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

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

The Group Id of a placement group. You must specify the Placement Group * Group Id to launch an instance in a shared placement group.

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