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

Indicates whether the Elastic IP address is for use with instances in a VPC * or instances in EC2-Classic.

Default: If the Region supports EC2-Classic, * the default is standard. Otherwise, the default is * vpc.

*/ inline const DomainType& GetDomain() const{ return m_domain; } /** *

Indicates whether the Elastic IP address is for use with instances in a VPC * or instances in EC2-Classic.

Default: If the Region supports EC2-Classic, * the default is standard. Otherwise, the default is * vpc.

*/ inline bool DomainHasBeenSet() const { return m_domainHasBeenSet; } /** *

Indicates whether the Elastic IP address is for use with instances in a VPC * or instances in EC2-Classic.

Default: If the Region supports EC2-Classic, * the default is standard. Otherwise, the default is * vpc.

*/ inline void SetDomain(const DomainType& value) { m_domainHasBeenSet = true; m_domain = value; } /** *

Indicates whether the Elastic IP address is for use with instances in a VPC * or instances in EC2-Classic.

Default: If the Region supports EC2-Classic, * the default is standard. Otherwise, the default is * vpc.

*/ inline void SetDomain(DomainType&& value) { m_domainHasBeenSet = true; m_domain = std::move(value); } /** *

Indicates whether the Elastic IP address is for use with instances in a VPC * or instances in EC2-Classic.

Default: If the Region supports EC2-Classic, * the default is standard. Otherwise, the default is * vpc.

*/ inline AllocateAddressRequest& WithDomain(const DomainType& value) { SetDomain(value); return *this;} /** *

Indicates whether the Elastic IP address is for use with instances in a VPC * or instances in EC2-Classic.

Default: If the Region supports EC2-Classic, * the default is standard. Otherwise, the default is * vpc.

*/ inline AllocateAddressRequest& WithDomain(DomainType&& value) { SetDomain(std::move(value)); return *this;} /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline const Aws::String& GetAddress() const{ return m_address; } /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline bool AddressHasBeenSet() const { return m_addressHasBeenSet; } /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline void SetAddress(const Aws::String& value) { m_addressHasBeenSet = true; m_address = value; } /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline void SetAddress(Aws::String&& value) { m_addressHasBeenSet = true; m_address = std::move(value); } /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline void SetAddress(const char* value) { m_addressHasBeenSet = true; m_address.assign(value); } /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline AllocateAddressRequest& WithAddress(const Aws::String& value) { SetAddress(value); return *this;} /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline AllocateAddressRequest& WithAddress(Aws::String&& value) { SetAddress(std::move(value)); return *this;} /** *

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an * address pool.

*/ inline AllocateAddressRequest& WithAddress(const char* value) { SetAddress(value); return *this;} /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline const Aws::String& GetPublicIpv4Pool() const{ return m_publicIpv4Pool; } /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline bool PublicIpv4PoolHasBeenSet() const { return m_publicIpv4PoolHasBeenSet; } /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline void SetPublicIpv4Pool(const Aws::String& value) { m_publicIpv4PoolHasBeenSet = true; m_publicIpv4Pool = value; } /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline void SetPublicIpv4Pool(Aws::String&& value) { m_publicIpv4PoolHasBeenSet = true; m_publicIpv4Pool = std::move(value); } /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline void SetPublicIpv4Pool(const char* value) { m_publicIpv4PoolHasBeenSet = true; m_publicIpv4Pool.assign(value); } /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline AllocateAddressRequest& WithPublicIpv4Pool(const Aws::String& value) { SetPublicIpv4Pool(value); return *this;} /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline AllocateAddressRequest& WithPublicIpv4Pool(Aws::String&& value) { SetPublicIpv4Pool(std::move(value)); return *this;} /** *

The ID of an address pool that you own. Use this parameter to let Amazon EC2 * select an address from the address pool. To specify a specific address from the * address pool, use the Address parameter instead.

*/ inline AllocateAddressRequest& WithPublicIpv4Pool(const char* value) { SetPublicIpv4Pool(value); return *this;} /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline const Aws::String& GetNetworkBorderGroup() const{ return m_networkBorderGroup; } /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline bool NetworkBorderGroupHasBeenSet() const { return m_networkBorderGroupHasBeenSet; } /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline void SetNetworkBorderGroup(const Aws::String& value) { m_networkBorderGroupHasBeenSet = true; m_networkBorderGroup = value; } /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline void SetNetworkBorderGroup(Aws::String&& value) { m_networkBorderGroupHasBeenSet = true; m_networkBorderGroup = std::move(value); } /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline void SetNetworkBorderGroup(const char* value) { m_networkBorderGroupHasBeenSet = true; m_networkBorderGroup.assign(value); } /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline AllocateAddressRequest& WithNetworkBorderGroup(const Aws::String& value) { SetNetworkBorderGroup(value); return *this;} /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline AllocateAddressRequest& WithNetworkBorderGroup(Aws::String&& value) { SetNetworkBorderGroup(std::move(value)); return *this;} /** *

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which AWS advertises IP addresses. Use this parameter to limit the IP address to * this location. IP addresses cannot move between network border groups.

*

Use DescribeAvailabilityZones * to view the network border groups.

You cannot use a network border * group with EC2 Classic. If you attempt this operation on EC2 classic, you will * receive an InvalidParameterCombination error. For more information, * see Error * Codes.

*/ inline AllocateAddressRequest& WithNetworkBorderGroup(const char* value) { SetNetworkBorderGroup(value); return *this;} /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline const Aws::String& GetCustomerOwnedIpv4Pool() const{ return m_customerOwnedIpv4Pool; } /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline bool CustomerOwnedIpv4PoolHasBeenSet() const { return m_customerOwnedIpv4PoolHasBeenSet; } /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline void SetCustomerOwnedIpv4Pool(const Aws::String& value) { m_customerOwnedIpv4PoolHasBeenSet = true; m_customerOwnedIpv4Pool = value; } /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline void SetCustomerOwnedIpv4Pool(Aws::String&& value) { m_customerOwnedIpv4PoolHasBeenSet = true; m_customerOwnedIpv4Pool = std::move(value); } /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline void SetCustomerOwnedIpv4Pool(const char* value) { m_customerOwnedIpv4PoolHasBeenSet = true; m_customerOwnedIpv4Pool.assign(value); } /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline AllocateAddressRequest& WithCustomerOwnedIpv4Pool(const Aws::String& value) { SetCustomerOwnedIpv4Pool(value); return *this;} /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline AllocateAddressRequest& WithCustomerOwnedIpv4Pool(Aws::String&& value) { SetCustomerOwnedIpv4Pool(std::move(value)); return *this;} /** *

The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 * select an address from the address pool. Alternatively, specify a specific * address from the address pool.

*/ inline AllocateAddressRequest& WithCustomerOwnedIpv4Pool(const char* value) { SetCustomerOwnedIpv4Pool(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline AllocateAddressRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: DomainType m_domain; bool m_domainHasBeenSet; Aws::String m_address; bool m_addressHasBeenSet; Aws::String m_publicIpv4Pool; bool m_publicIpv4PoolHasBeenSet; Aws::String m_networkBorderGroup; bool m_networkBorderGroupHasBeenSet; Aws::String m_customerOwnedIpv4Pool; bool m_customerOwnedIpv4PoolHasBeenSet; bool m_dryRun; bool m_dryRunHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws