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

Indicates whether the host accepts any untargeted instance launches that * match its instance type configuration, or if it only accepts Host tenancy * instance launches that specify its unique host ID. For more information, see * Understanding Instance Placement and Host Affinity in the Amazon EC2 User * Guide for Linux Instances.

Default: on

*/ inline const AutoPlacement& GetAutoPlacement() const{ return m_autoPlacement; } /** *

Indicates whether the host accepts any untargeted instance launches that * match its instance type configuration, or if it only accepts Host tenancy * instance launches that specify its unique host ID. For more information, see * Understanding Instance Placement and Host Affinity in the Amazon EC2 User * Guide for Linux Instances.

Default: on

*/ inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; } /** *

Indicates whether the host accepts any untargeted instance launches that * match its instance type configuration, or if it only accepts Host tenancy * instance launches that specify its unique host ID. For more information, see * Understanding Instance Placement and Host Affinity in the Amazon EC2 User * Guide for Linux Instances.

Default: on

*/ inline void SetAutoPlacement(const AutoPlacement& value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = value; } /** *

Indicates whether the host accepts any untargeted instance launches that * match its instance type configuration, or if it only accepts Host tenancy * instance launches that specify its unique host ID. For more information, see * Understanding Instance Placement and Host Affinity in the Amazon EC2 User * Guide for Linux Instances.

Default: on

*/ inline void SetAutoPlacement(AutoPlacement&& value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = std::move(value); } /** *

Indicates whether the host accepts any untargeted instance launches that * match its instance type configuration, or if it only accepts Host tenancy * instance launches that specify its unique host ID. For more information, see * Understanding Instance Placement and Host Affinity in the Amazon EC2 User * Guide for Linux Instances.

Default: on

*/ inline AllocateHostsRequest& WithAutoPlacement(const AutoPlacement& value) { SetAutoPlacement(value); return *this;} /** *

Indicates whether the host accepts any untargeted instance launches that * match its instance type configuration, or if it only accepts Host tenancy * instance launches that specify its unique host ID. For more information, see * Understanding Instance Placement and Host Affinity in the Amazon EC2 User * Guide for Linux Instances.

Default: on

*/ inline AllocateHostsRequest& WithAutoPlacement(AutoPlacement&& value) { SetAutoPlacement(std::move(value)); return *this;} /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline AllocateHostsRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline AllocateHostsRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone in which to allocate the Dedicated Host.

*/ inline AllocateHostsRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline AllocateHostsRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline AllocateHostsRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see How * to Ensure Idempotency.

*/ inline AllocateHostsRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline AllocateHostsRequest& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline AllocateHostsRequest& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

Specifies the instance type to be supported by the Dedicated Hosts. If you * specify an instance type, the Dedicated Hosts support instances of the specified * instance type only.

If you want the Dedicated Hosts to support multiple * instance types in a specific instance family, omit this parameter and specify * InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request.

*/ inline AllocateHostsRequest& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline const Aws::String& GetInstanceFamily() const{ return m_instanceFamily; } /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; } /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline void SetInstanceFamily(const Aws::String& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = value; } /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline void SetInstanceFamily(Aws::String&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::move(value); } /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline void SetInstanceFamily(const char* value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily.assign(value); } /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline AllocateHostsRequest& WithInstanceFamily(const Aws::String& value) { SetInstanceFamily(value); return *this;} /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline AllocateHostsRequest& WithInstanceFamily(Aws::String&& value) { SetInstanceFamily(std::move(value)); return *this;} /** *

Specifies the instance family to be supported by the Dedicated Hosts. If you * specify an instance family, the Dedicated Hosts support multiple instance types * within that instance family.

If you want the Dedicated Hosts to support a * specific instance type only, omit this parameter and specify InstanceType * instead. You cannot specify InstanceFamily and InstanceType in the * same request.

*/ inline AllocateHostsRequest& WithInstanceFamily(const char* value) { SetInstanceFamily(value); return *this;} /** *

The number of Dedicated Hosts to allocate to your account with these * parameters.

*/ inline int GetQuantity() const{ return m_quantity; } /** *

The number of Dedicated Hosts to allocate to your account with these * parameters.

*/ inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; } /** *

The number of Dedicated Hosts to allocate to your account with these * parameters.

*/ inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; } /** *

The number of Dedicated Hosts to allocate to your account with these * parameters.

*/ inline AllocateHostsRequest& WithQuantity(int value) { SetQuantity(value); return *this;} /** *

The tags to apply to the Dedicated Host during creation.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to apply to the Dedicated Host during creation.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to apply to the Dedicated Host during creation.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to apply to the Dedicated Host during creation.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to apply to the Dedicated Host during creation.

*/ inline AllocateHostsRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to apply to the Dedicated Host during creation.

*/ inline AllocateHostsRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to apply to the Dedicated Host during creation.

*/ inline AllocateHostsRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to apply to the Dedicated Host during creation.

*/ inline AllocateHostsRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } /** *

Indicates whether to enable or disable host recovery for the Dedicated Host. * Host recovery is disabled by default. For more information, see * Host Recovery in the Amazon Elastic Compute Cloud User Guide.

*

Default: off

*/ inline const HostRecovery& GetHostRecovery() const{ return m_hostRecovery; } /** *

Indicates whether to enable or disable host recovery for the Dedicated Host. * Host recovery is disabled by default. For more information, see * Host Recovery in the Amazon Elastic Compute Cloud User Guide.

*

Default: off

*/ inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; } /** *

Indicates whether to enable or disable host recovery for the Dedicated Host. * Host recovery is disabled by default. For more information, see * Host Recovery in the Amazon Elastic Compute Cloud User Guide.

*

Default: off

*/ inline void SetHostRecovery(const HostRecovery& value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = value; } /** *

Indicates whether to enable or disable host recovery for the Dedicated Host. * Host recovery is disabled by default. For more information, see * Host Recovery in the Amazon Elastic Compute Cloud User Guide.

*

Default: off

*/ inline void SetHostRecovery(HostRecovery&& value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = std::move(value); } /** *

Indicates whether to enable or disable host recovery for the Dedicated Host. * Host recovery is disabled by default. For more information, see * Host Recovery in the Amazon Elastic Compute Cloud User Guide.

*

Default: off

*/ inline AllocateHostsRequest& WithHostRecovery(const HostRecovery& value) { SetHostRecovery(value); return *this;} /** *

Indicates whether to enable or disable host recovery for the Dedicated Host. * Host recovery is disabled by default. For more information, see * Host Recovery in the Amazon Elastic Compute Cloud User Guide.

*

Default: off

*/ inline AllocateHostsRequest& WithHostRecovery(HostRecovery&& value) { SetHostRecovery(std::move(value)); return *this;} private: AutoPlacement m_autoPlacement; bool m_autoPlacementHasBeenSet; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet; Aws::String m_clientToken; bool m_clientTokenHasBeenSet; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet; Aws::String m_instanceFamily; bool m_instanceFamilyHasBeenSet; int m_quantity; bool m_quantityHasBeenSet; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet; HostRecovery m_hostRecovery; bool m_hostRecoveryHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws