AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateNetworkInterfaceRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/model/NetworkInterfaceCreationType.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/ec2/model/ConnectionTrackingSpecificationRequest.h>
13#include <aws/ec2/model/OperatorRequest.h>
14#include <aws/ec2/model/Ipv4PrefixSpecificationRequest.h>
15#include <aws/ec2/model/Ipv6PrefixSpecificationRequest.h>
16#include <aws/ec2/model/TagSpecification.h>
17#include <aws/ec2/model/PrivateIpAddressSpecification.h>
18#include <aws/ec2/model/InstanceIpv6Address.h>
19#include <utility>
20#include <aws/core/utils/UUID.h>
21
22namespace Aws
23{
24namespace EC2
25{
26namespace Model
27{
28
32 {
33 public:
34 AWS_EC2_API CreateNetworkInterfaceRequest() = default;
35
36 // Service request name is the Operation name which will send this request out,
37 // each operation should has unique request name, so that we can get operation's name from this request.
38 // Note: this is not true for response, multiple operations may have the same response name,
39 // so we can not get operation's name from response.
40 inline virtual const char* GetServiceRequestName() const override { return "CreateNetworkInterface"; }
41
42 AWS_EC2_API Aws::String SerializePayload() const override;
43
44 protected:
45 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
46
47 public:
48
50
56 inline const Aws::Vector<Ipv4PrefixSpecificationRequest>& GetIpv4Prefixes() const { return m_ipv4Prefixes; }
57 inline bool Ipv4PrefixesHasBeenSet() const { return m_ipv4PrefixesHasBeenSet; }
58 template<typename Ipv4PrefixesT = Aws::Vector<Ipv4PrefixSpecificationRequest>>
59 void SetIpv4Prefixes(Ipv4PrefixesT&& value) { m_ipv4PrefixesHasBeenSet = true; m_ipv4Prefixes = std::forward<Ipv4PrefixesT>(value); }
60 template<typename Ipv4PrefixesT = Aws::Vector<Ipv4PrefixSpecificationRequest>>
61 CreateNetworkInterfaceRequest& WithIpv4Prefixes(Ipv4PrefixesT&& value) { SetIpv4Prefixes(std::forward<Ipv4PrefixesT>(value)); return *this;}
62 template<typename Ipv4PrefixesT = Ipv4PrefixSpecificationRequest>
63 CreateNetworkInterfaceRequest& AddIpv4Prefixes(Ipv4PrefixesT&& value) { m_ipv4PrefixesHasBeenSet = true; m_ipv4Prefixes.emplace_back(std::forward<Ipv4PrefixesT>(value)); return *this; }
65
67
73 inline int GetIpv4PrefixCount() const { return m_ipv4PrefixCount; }
74 inline bool Ipv4PrefixCountHasBeenSet() const { return m_ipv4PrefixCountHasBeenSet; }
75 inline void SetIpv4PrefixCount(int value) { m_ipv4PrefixCountHasBeenSet = true; m_ipv4PrefixCount = value; }
76 inline CreateNetworkInterfaceRequest& WithIpv4PrefixCount(int value) { SetIpv4PrefixCount(value); return *this;}
78
80
85 inline const Aws::Vector<Ipv6PrefixSpecificationRequest>& GetIpv6Prefixes() const { return m_ipv6Prefixes; }
86 inline bool Ipv6PrefixesHasBeenSet() const { return m_ipv6PrefixesHasBeenSet; }
87 template<typename Ipv6PrefixesT = Aws::Vector<Ipv6PrefixSpecificationRequest>>
88 void SetIpv6Prefixes(Ipv6PrefixesT&& value) { m_ipv6PrefixesHasBeenSet = true; m_ipv6Prefixes = std::forward<Ipv6PrefixesT>(value); }
89 template<typename Ipv6PrefixesT = Aws::Vector<Ipv6PrefixSpecificationRequest>>
90 CreateNetworkInterfaceRequest& WithIpv6Prefixes(Ipv6PrefixesT&& value) { SetIpv6Prefixes(std::forward<Ipv6PrefixesT>(value)); return *this;}
91 template<typename Ipv6PrefixesT = Ipv6PrefixSpecificationRequest>
92 CreateNetworkInterfaceRequest& AddIpv6Prefixes(Ipv6PrefixesT&& value) { m_ipv6PrefixesHasBeenSet = true; m_ipv6Prefixes.emplace_back(std::forward<Ipv6PrefixesT>(value)); return *this; }
94
96
102 inline int GetIpv6PrefixCount() const { return m_ipv6PrefixCount; }
103 inline bool Ipv6PrefixCountHasBeenSet() const { return m_ipv6PrefixCountHasBeenSet; }
104 inline void SetIpv6PrefixCount(int value) { m_ipv6PrefixCountHasBeenSet = true; m_ipv6PrefixCount = value; }
105 inline CreateNetworkInterfaceRequest& WithIpv6PrefixCount(int value) { SetIpv6PrefixCount(value); return *this;}
107
109
116 inline NetworkInterfaceCreationType GetInterfaceType() const { return m_interfaceType; }
117 inline bool InterfaceTypeHasBeenSet() const { return m_interfaceTypeHasBeenSet; }
118 inline void SetInterfaceType(NetworkInterfaceCreationType value) { m_interfaceTypeHasBeenSet = true; m_interfaceType = value; }
121
123
126 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
127 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
128 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
129 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
130 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
131 CreateNetworkInterfaceRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
132 template<typename TagSpecificationsT = TagSpecification>
133 CreateNetworkInterfaceRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
135
137
143 inline const Aws::String& GetClientToken() const { return m_clientToken; }
144 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
145 template<typename ClientTokenT = Aws::String>
146 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
147 template<typename ClientTokenT = Aws::String>
148 CreateNetworkInterfaceRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
150
152
167 inline bool GetEnablePrimaryIpv6() const { return m_enablePrimaryIpv6; }
168 inline bool EnablePrimaryIpv6HasBeenSet() const { return m_enablePrimaryIpv6HasBeenSet; }
169 inline void SetEnablePrimaryIpv6(bool value) { m_enablePrimaryIpv6HasBeenSet = true; m_enablePrimaryIpv6 = value; }
172
174
177 inline const ConnectionTrackingSpecificationRequest& GetConnectionTrackingSpecification() const { return m_connectionTrackingSpecification; }
178 inline bool ConnectionTrackingSpecificationHasBeenSet() const { return m_connectionTrackingSpecificationHasBeenSet; }
179 template<typename ConnectionTrackingSpecificationT = ConnectionTrackingSpecificationRequest>
180 void SetConnectionTrackingSpecification(ConnectionTrackingSpecificationT&& value) { m_connectionTrackingSpecificationHasBeenSet = true; m_connectionTrackingSpecification = std::forward<ConnectionTrackingSpecificationT>(value); }
181 template<typename ConnectionTrackingSpecificationT = ConnectionTrackingSpecificationRequest>
182 CreateNetworkInterfaceRequest& WithConnectionTrackingSpecification(ConnectionTrackingSpecificationT&& value) { SetConnectionTrackingSpecification(std::forward<ConnectionTrackingSpecificationT>(value)); return *this;}
184
186
189 inline const OperatorRequest& GetOperator() const { return m_operator; }
190 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
191 template<typename OperatorT = OperatorRequest>
192 void SetOperator(OperatorT&& value) { m_operatorHasBeenSet = true; m_operator = std::forward<OperatorT>(value); }
193 template<typename OperatorT = OperatorRequest>
194 CreateNetworkInterfaceRequest& WithOperator(OperatorT&& value) { SetOperator(std::forward<OperatorT>(value)); return *this;}
196
198
201 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
202 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
203 template<typename SubnetIdT = Aws::String>
204 void SetSubnetId(SubnetIdT&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::forward<SubnetIdT>(value); }
205 template<typename SubnetIdT = Aws::String>
206 CreateNetworkInterfaceRequest& WithSubnetId(SubnetIdT&& value) { SetSubnetId(std::forward<SubnetIdT>(value)); return *this;}
208
210
213 inline const Aws::String& GetDescription() const { return m_description; }
214 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
215 template<typename DescriptionT = Aws::String>
216 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
217 template<typename DescriptionT = Aws::String>
218 CreateNetworkInterfaceRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
220
222
229 inline const Aws::String& GetPrivateIpAddress() const { return m_privateIpAddress; }
230 inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; }
231 template<typename PrivateIpAddressT = Aws::String>
232 void SetPrivateIpAddress(PrivateIpAddressT&& value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress = std::forward<PrivateIpAddressT>(value); }
233 template<typename PrivateIpAddressT = Aws::String>
234 CreateNetworkInterfaceRequest& WithPrivateIpAddress(PrivateIpAddressT&& value) { SetPrivateIpAddress(std::forward<PrivateIpAddressT>(value)); return *this;}
236
238
241 inline const Aws::Vector<Aws::String>& GetGroups() const { return m_groups; }
242 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
243 template<typename GroupsT = Aws::Vector<Aws::String>>
244 void SetGroups(GroupsT&& value) { m_groupsHasBeenSet = true; m_groups = std::forward<GroupsT>(value); }
245 template<typename GroupsT = Aws::Vector<Aws::String>>
246 CreateNetworkInterfaceRequest& WithGroups(GroupsT&& value) { SetGroups(std::forward<GroupsT>(value)); return *this;}
247 template<typename GroupsT = Aws::String>
248 CreateNetworkInterfaceRequest& AddGroups(GroupsT&& value) { m_groupsHasBeenSet = true; m_groups.emplace_back(std::forward<GroupsT>(value)); return *this; }
250
252
257 inline const Aws::Vector<PrivateIpAddressSpecification>& GetPrivateIpAddresses() const { return m_privateIpAddresses; }
258 inline bool PrivateIpAddressesHasBeenSet() const { return m_privateIpAddressesHasBeenSet; }
259 template<typename PrivateIpAddressesT = Aws::Vector<PrivateIpAddressSpecification>>
260 void SetPrivateIpAddresses(PrivateIpAddressesT&& value) { m_privateIpAddressesHasBeenSet = true; m_privateIpAddresses = std::forward<PrivateIpAddressesT>(value); }
261 template<typename PrivateIpAddressesT = Aws::Vector<PrivateIpAddressSpecification>>
262 CreateNetworkInterfaceRequest& WithPrivateIpAddresses(PrivateIpAddressesT&& value) { SetPrivateIpAddresses(std::forward<PrivateIpAddressesT>(value)); return *this;}
263 template<typename PrivateIpAddressesT = PrivateIpAddressSpecification>
264 CreateNetworkInterfaceRequest& AddPrivateIpAddresses(PrivateIpAddressesT&& value) { m_privateIpAddressesHasBeenSet = true; m_privateIpAddresses.emplace_back(std::forward<PrivateIpAddressesT>(value)); return *this; }
266
268
277 inline int GetSecondaryPrivateIpAddressCount() const { return m_secondaryPrivateIpAddressCount; }
278 inline bool SecondaryPrivateIpAddressCountHasBeenSet() const { return m_secondaryPrivateIpAddressCountHasBeenSet; }
279 inline void SetSecondaryPrivateIpAddressCount(int value) { m_secondaryPrivateIpAddressCountHasBeenSet = true; m_secondaryPrivateIpAddressCount = value; }
282
284
290 inline const Aws::Vector<InstanceIpv6Address>& GetIpv6Addresses() const { return m_ipv6Addresses; }
291 inline bool Ipv6AddressesHasBeenSet() const { return m_ipv6AddressesHasBeenSet; }
292 template<typename Ipv6AddressesT = Aws::Vector<InstanceIpv6Address>>
293 void SetIpv6Addresses(Ipv6AddressesT&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses = std::forward<Ipv6AddressesT>(value); }
294 template<typename Ipv6AddressesT = Aws::Vector<InstanceIpv6Address>>
295 CreateNetworkInterfaceRequest& WithIpv6Addresses(Ipv6AddressesT&& value) { SetIpv6Addresses(std::forward<Ipv6AddressesT>(value)); return *this;}
296 template<typename Ipv6AddressesT = InstanceIpv6Address>
297 CreateNetworkInterfaceRequest& AddIpv6Addresses(Ipv6AddressesT&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses.emplace_back(std::forward<Ipv6AddressesT>(value)); return *this; }
299
301
310 inline int GetIpv6AddressCount() const { return m_ipv6AddressCount; }
311 inline bool Ipv6AddressCountHasBeenSet() const { return m_ipv6AddressCountHasBeenSet; }
312 inline void SetIpv6AddressCount(int value) { m_ipv6AddressCountHasBeenSet = true; m_ipv6AddressCount = value; }
315
317
323 inline bool GetDryRun() const { return m_dryRun; }
324 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
325 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
326 inline CreateNetworkInterfaceRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
328 private:
329
331 bool m_ipv4PrefixesHasBeenSet = false;
332
333 int m_ipv4PrefixCount{0};
334 bool m_ipv4PrefixCountHasBeenSet = false;
335
337 bool m_ipv6PrefixesHasBeenSet = false;
338
339 int m_ipv6PrefixCount{0};
340 bool m_ipv6PrefixCountHasBeenSet = false;
341
343 bool m_interfaceTypeHasBeenSet = false;
344
345 Aws::Vector<TagSpecification> m_tagSpecifications;
346 bool m_tagSpecificationsHasBeenSet = false;
347
349 bool m_clientTokenHasBeenSet = true;
350
351 bool m_enablePrimaryIpv6{false};
352 bool m_enablePrimaryIpv6HasBeenSet = false;
353
354 ConnectionTrackingSpecificationRequest m_connectionTrackingSpecification;
355 bool m_connectionTrackingSpecificationHasBeenSet = false;
356
357 OperatorRequest m_operator;
358 bool m_operatorHasBeenSet = false;
359
360 Aws::String m_subnetId;
361 bool m_subnetIdHasBeenSet = false;
362
363 Aws::String m_description;
364 bool m_descriptionHasBeenSet = false;
365
366 Aws::String m_privateIpAddress;
367 bool m_privateIpAddressHasBeenSet = false;
368
370 bool m_groupsHasBeenSet = false;
371
373 bool m_privateIpAddressesHasBeenSet = false;
374
375 int m_secondaryPrivateIpAddressCount{0};
376 bool m_secondaryPrivateIpAddressCountHasBeenSet = false;
377
378 Aws::Vector<InstanceIpv6Address> m_ipv6Addresses;
379 bool m_ipv6AddressesHasBeenSet = false;
380
381 int m_ipv6AddressCount{0};
382 bool m_ipv6AddressCountHasBeenSet = false;
383
384 bool m_dryRun{false};
385 bool m_dryRunHasBeenSet = false;
386 };
387
388} // namespace Model
389} // namespace EC2
390} // namespace Aws
const Aws::Vector< Aws::String > & GetGroups() const
CreateNetworkInterfaceRequest & WithSecondaryPrivateIpAddressCount(int value)
CreateNetworkInterfaceRequest & WithPrivateIpAddress(PrivateIpAddressT &&value)
const Aws::Vector< PrivateIpAddressSpecification > & GetPrivateIpAddresses() const
void SetConnectionTrackingSpecification(ConnectionTrackingSpecificationT &&value)
const Aws::Vector< Ipv6PrefixSpecificationRequest > & GetIpv6Prefixes() const
CreateNetworkInterfaceRequest & AddPrivateIpAddresses(PrivateIpAddressesT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateNetworkInterfaceRequest & WithPrivateIpAddresses(PrivateIpAddressesT &&value)
CreateNetworkInterfaceRequest & WithIpv4PrefixCount(int value)
CreateNetworkInterfaceRequest & WithIpv6AddressCount(int value)
CreateNetworkInterfaceRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateNetworkInterfaceRequest & WithOperator(OperatorT &&value)
CreateNetworkInterfaceRequest & WithClientToken(ClientTokenT &&value)
CreateNetworkInterfaceRequest & AddIpv4Prefixes(Ipv4PrefixesT &&value)
const ConnectionTrackingSpecificationRequest & GetConnectionTrackingSpecification() const
CreateNetworkInterfaceRequest & WithEnablePrimaryIpv6(bool value)
CreateNetworkInterfaceRequest & WithDryRun(bool value)
CreateNetworkInterfaceRequest & WithIpv4Prefixes(Ipv4PrefixesT &&value)
const Aws::Vector< InstanceIpv6Address > & GetIpv6Addresses() const
CreateNetworkInterfaceRequest & WithIpv6PrefixCount(int value)
CreateNetworkInterfaceRequest & WithSubnetId(SubnetIdT &&value)
CreateNetworkInterfaceRequest & WithIpv6Addresses(Ipv6AddressesT &&value)
CreateNetworkInterfaceRequest & AddIpv6Addresses(Ipv6AddressesT &&value)
CreateNetworkInterfaceRequest & AddIpv6Prefixes(Ipv6PrefixesT &&value)
CreateNetworkInterfaceRequest & WithInterfaceType(NetworkInterfaceCreationType value)
CreateNetworkInterfaceRequest & WithGroups(GroupsT &&value)
CreateNetworkInterfaceRequest & WithDescription(DescriptionT &&value)
CreateNetworkInterfaceRequest & AddTagSpecifications(TagSpecificationsT &&value)
void SetInterfaceType(NetworkInterfaceCreationType value)
CreateNetworkInterfaceRequest & WithConnectionTrackingSpecification(ConnectionTrackingSpecificationT &&value)
CreateNetworkInterfaceRequest & AddGroups(GroupsT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
const Aws::Vector< Ipv4PrefixSpecificationRequest > & GetIpv4Prefixes() const
virtual const char * GetServiceRequestName() const override
CreateNetworkInterfaceRequest & WithIpv6Prefixes(Ipv6PrefixesT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector