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

The network (vpc).

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

The network (vpc).

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

The network (vpc).

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

The network (vpc).

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

The network (vpc).

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

The network (vpc).

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

The Elastic IP address to recover or an IPv4 address from an address * pool.

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

The Elastic IP address to recover or an IPv4 address from an address * pool.

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

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; } /** *

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); } /** *

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); } /** *

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;} /** *

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;} /** *

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 Amazon Web Services 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 receive an * InvalidParameterCombination error.

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

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which Amazon Web Services 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 receive an * InvalidParameterCombination error.

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

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which Amazon Web Services 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 receive an * InvalidParameterCombination error.

*/ 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 Amazon Web Services 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 receive an * InvalidParameterCombination error.

*/ 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 Amazon Web Services 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 receive an * InvalidParameterCombination error.

*/ 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 Amazon Web Services 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 receive an * InvalidParameterCombination error.

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

A unique set of Availability Zones, Local Zones, or Wavelength Zones from * which Amazon Web Services 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 receive an * InvalidParameterCombination error.

*/ 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 Amazon Web Services 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 receive an * InvalidParameterCombination error.

*/ 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;} /** *

The tags to assign to the Elastic IP address.

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

The tags to assign to the Elastic IP address.

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

The tags to assign to the Elastic IP address.

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

The tags to assign to the Elastic IP address.

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

The tags to assign to the Elastic IP address.

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

The tags to assign to the Elastic IP address.

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

The tags to assign to the Elastic IP address.

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

The tags to assign to the Elastic IP address.

*/ inline AllocateAddressRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } private: DomainType m_domain; bool m_domainHasBeenSet = false; Aws::String m_address; bool m_addressHasBeenSet = false; Aws::String m_publicIpv4Pool; bool m_publicIpv4PoolHasBeenSet = false; Aws::String m_networkBorderGroup; bool m_networkBorderGroupHasBeenSet = false; Aws::String m_customerOwnedIpv4Pool; bool m_customerOwnedIpv4PoolHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws