/** * 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 { /** *

Contains the parameters for AssignPrivateIpAddresses.

See * Also:

AWS * API Reference

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

Indicates whether to allow an IP address that is already assigned to another * network interface or instance to be reassigned to the specified network * interface.

*/ inline bool GetAllowReassignment() const{ return m_allowReassignment; } /** *

Indicates whether to allow an IP address that is already assigned to another * network interface or instance to be reassigned to the specified network * interface.

*/ inline bool AllowReassignmentHasBeenSet() const { return m_allowReassignmentHasBeenSet; } /** *

Indicates whether to allow an IP address that is already assigned to another * network interface or instance to be reassigned to the specified network * interface.

*/ inline void SetAllowReassignment(bool value) { m_allowReassignmentHasBeenSet = true; m_allowReassignment = value; } /** *

Indicates whether to allow an IP address that is already assigned to another * network interface or instance to be reassigned to the specified network * interface.

*/ inline AssignPrivateIpAddressesRequest& WithAllowReassignment(bool value) { SetAllowReassignment(value); return *this;} /** *

The ID of the network interface.

*/ inline const Aws::String& GetNetworkInterfaceId() const{ return m_networkInterfaceId; } /** *

The ID of the network interface.

*/ inline bool NetworkInterfaceIdHasBeenSet() const { return m_networkInterfaceIdHasBeenSet; } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(const Aws::String& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = value; } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(Aws::String&& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = std::move(value); } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(const char* value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId.assign(value); } /** *

The ID of the network interface.

*/ inline AssignPrivateIpAddressesRequest& WithNetworkInterfaceId(const Aws::String& value) { SetNetworkInterfaceId(value); return *this;} /** *

The ID of the network interface.

*/ inline AssignPrivateIpAddressesRequest& WithNetworkInterfaceId(Aws::String&& value) { SetNetworkInterfaceId(std::move(value)); return *this;} /** *

The ID of the network interface.

*/ inline AssignPrivateIpAddressesRequest& WithNetworkInterfaceId(const char* value) { SetNetworkInterfaceId(value); return *this;} /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline const Aws::Vector& GetPrivateIpAddresses() const{ return m_privateIpAddresses; } /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline bool PrivateIpAddressesHasBeenSet() const { return m_privateIpAddressesHasBeenSet; } /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline void SetPrivateIpAddresses(const Aws::Vector& value) { m_privateIpAddressesHasBeenSet = true; m_privateIpAddresses = value; } /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline void SetPrivateIpAddresses(Aws::Vector&& value) { m_privateIpAddressesHasBeenSet = true; m_privateIpAddresses = std::move(value); } /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline AssignPrivateIpAddressesRequest& WithPrivateIpAddresses(const Aws::Vector& value) { SetPrivateIpAddresses(value); return *this;} /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline AssignPrivateIpAddressesRequest& WithPrivateIpAddresses(Aws::Vector&& value) { SetPrivateIpAddresses(std::move(value)); return *this;} /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline AssignPrivateIpAddressesRequest& AddPrivateIpAddresses(const Aws::String& value) { m_privateIpAddressesHasBeenSet = true; m_privateIpAddresses.push_back(value); return *this; } /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline AssignPrivateIpAddressesRequest& AddPrivateIpAddresses(Aws::String&& value) { m_privateIpAddressesHasBeenSet = true; m_privateIpAddresses.push_back(std::move(value)); return *this; } /** *

The IP addresses to be assigned as a secondary private IP address to the * network interface. You can't specify this parameter when also specifying a * number of secondary IP addresses.

If you don't specify an IP address, * Amazon EC2 automatically selects an IP address within the subnet range.

*/ inline AssignPrivateIpAddressesRequest& AddPrivateIpAddresses(const char* value) { m_privateIpAddressesHasBeenSet = true; m_privateIpAddresses.push_back(value); return *this; } /** *

The number of secondary IP addresses to assign to the network interface. You * can't specify this parameter when also specifying private IP addresses.

*/ inline int GetSecondaryPrivateIpAddressCount() const{ return m_secondaryPrivateIpAddressCount; } /** *

The number of secondary IP addresses to assign to the network interface. You * can't specify this parameter when also specifying private IP addresses.

*/ inline bool SecondaryPrivateIpAddressCountHasBeenSet() const { return m_secondaryPrivateIpAddressCountHasBeenSet; } /** *

The number of secondary IP addresses to assign to the network interface. You * can't specify this parameter when also specifying private IP addresses.

*/ inline void SetSecondaryPrivateIpAddressCount(int value) { m_secondaryPrivateIpAddressCountHasBeenSet = true; m_secondaryPrivateIpAddressCount = value; } /** *

The number of secondary IP addresses to assign to the network interface. You * can't specify this parameter when also specifying private IP addresses.

*/ inline AssignPrivateIpAddressesRequest& WithSecondaryPrivateIpAddressCount(int value) { SetSecondaryPrivateIpAddressCount(value); return *this;} /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline const Aws::Vector& GetIpv4Prefixes() const{ return m_ipv4Prefixes; } /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline bool Ipv4PrefixesHasBeenSet() const { return m_ipv4PrefixesHasBeenSet; } /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline void SetIpv4Prefixes(const Aws::Vector& value) { m_ipv4PrefixesHasBeenSet = true; m_ipv4Prefixes = value; } /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline void SetIpv4Prefixes(Aws::Vector&& value) { m_ipv4PrefixesHasBeenSet = true; m_ipv4Prefixes = std::move(value); } /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline AssignPrivateIpAddressesRequest& WithIpv4Prefixes(const Aws::Vector& value) { SetIpv4Prefixes(value); return *this;} /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline AssignPrivateIpAddressesRequest& WithIpv4Prefixes(Aws::Vector&& value) { SetIpv4Prefixes(std::move(value)); return *this;} /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline AssignPrivateIpAddressesRequest& AddIpv4Prefixes(const Aws::String& value) { m_ipv4PrefixesHasBeenSet = true; m_ipv4Prefixes.push_back(value); return *this; } /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline AssignPrivateIpAddressesRequest& AddIpv4Prefixes(Aws::String&& value) { m_ipv4PrefixesHasBeenSet = true; m_ipv4Prefixes.push_back(std::move(value)); return *this; } /** *

One or more IPv4 prefixes assigned to the network interface. You cannot use * this option if you use the Ipv4PrefixCount option.

*/ inline AssignPrivateIpAddressesRequest& AddIpv4Prefixes(const char* value) { m_ipv4PrefixesHasBeenSet = true; m_ipv4Prefixes.push_back(value); return *this; } /** *

The number of IPv4 prefixes that Amazon Web Services automatically assigns to * the network interface. You cannot use this option if you use the Ipv4 * Prefixes option.

*/ inline int GetIpv4PrefixCount() const{ return m_ipv4PrefixCount; } /** *

The number of IPv4 prefixes that Amazon Web Services automatically assigns to * the network interface. You cannot use this option if you use the Ipv4 * Prefixes option.

*/ inline bool Ipv4PrefixCountHasBeenSet() const { return m_ipv4PrefixCountHasBeenSet; } /** *

The number of IPv4 prefixes that Amazon Web Services automatically assigns to * the network interface. You cannot use this option if you use the Ipv4 * Prefixes option.

*/ inline void SetIpv4PrefixCount(int value) { m_ipv4PrefixCountHasBeenSet = true; m_ipv4PrefixCount = value; } /** *

The number of IPv4 prefixes that Amazon Web Services automatically assigns to * the network interface. You cannot use this option if you use the Ipv4 * Prefixes option.

*/ inline AssignPrivateIpAddressesRequest& WithIpv4PrefixCount(int value) { SetIpv4PrefixCount(value); return *this;} private: bool m_allowReassignment; bool m_allowReassignmentHasBeenSet = false; Aws::String m_networkInterfaceId; bool m_networkInterfaceIdHasBeenSet = false; Aws::Vector m_privateIpAddresses; bool m_privateIpAddressesHasBeenSet = false; int m_secondaryPrivateIpAddressCount; bool m_secondaryPrivateIpAddressCountHasBeenSet = false; Aws::Vector m_ipv4Prefixes; bool m_ipv4PrefixesHasBeenSet = false; int m_ipv4PrefixCount; bool m_ipv4PrefixCountHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws