AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
RequestSpotLaunchSpecification.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/BlockDeviceMapping.h>
12#include <aws/ec2/model/IamInstanceProfileSpecification.h>
13#include <aws/ec2/model/InstanceNetworkInterfaceSpecification.h>
14#include <aws/ec2/model/InstanceType.h>
15#include <aws/ec2/model/RunInstancesMonitoringEnabled.h>
16#include <aws/ec2/model/SpotPlacement.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Xml {
23class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace EC2 {
27namespace Model {
28
36 public:
37 AWS_EC2_API RequestSpotLaunchSpecification() = default;
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
45
48 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
49 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
50 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
51 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
52 m_securityGroupIdsHasBeenSet = true;
53 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
54 }
55 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
57 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
58 return *this;
59 }
60 template <typename SecurityGroupIdsT = Aws::String>
62 m_securityGroupIdsHasBeenSet = true;
63 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
64 return *this;
65 }
67
69
72 inline const Aws::Vector<Aws::String>& GetSecurityGroups() const { return m_securityGroups; }
73 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
74 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
75 void SetSecurityGroups(SecurityGroupsT&& value) {
76 m_securityGroupsHasBeenSet = true;
77 m_securityGroups = std::forward<SecurityGroupsT>(value);
78 }
79 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
81 SetSecurityGroups(std::forward<SecurityGroupsT>(value));
82 return *this;
83 }
84 template <typename SecurityGroupsT = Aws::String>
86 m_securityGroupsHasBeenSet = true;
87 m_securityGroups.emplace_back(std::forward<SecurityGroupsT>(value));
88 return *this;
89 }
91
93
96 inline const Aws::String& GetAddressingType() const { return m_addressingType; }
97 inline bool AddressingTypeHasBeenSet() const { return m_addressingTypeHasBeenSet; }
98 template <typename AddressingTypeT = Aws::String>
99 void SetAddressingType(AddressingTypeT&& value) {
100 m_addressingTypeHasBeenSet = true;
101 m_addressingType = std::forward<AddressingTypeT>(value);
102 }
103 template <typename AddressingTypeT = Aws::String>
105 SetAddressingType(std::forward<AddressingTypeT>(value));
106 return *this;
107 }
109
111
117 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
118 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
119 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
120 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
121 m_blockDeviceMappingsHasBeenSet = true;
122 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
123 }
124 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
126 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
127 return *this;
128 }
129 template <typename BlockDeviceMappingsT = BlockDeviceMapping>
131 m_blockDeviceMappingsHasBeenSet = true;
132 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
133 return *this;
134 }
136
138
145 inline bool GetEbsOptimized() const { return m_ebsOptimized; }
146 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
147 inline void SetEbsOptimized(bool value) {
148 m_ebsOptimizedHasBeenSet = true;
149 m_ebsOptimized = value;
150 }
152 SetEbsOptimized(value);
153 return *this;
154 }
156
158
161 inline const IamInstanceProfileSpecification& GetIamInstanceProfile() const { return m_iamInstanceProfile; }
162 inline bool IamInstanceProfileHasBeenSet() const { return m_iamInstanceProfileHasBeenSet; }
163 template <typename IamInstanceProfileT = IamInstanceProfileSpecification>
164 void SetIamInstanceProfile(IamInstanceProfileT&& value) {
165 m_iamInstanceProfileHasBeenSet = true;
166 m_iamInstanceProfile = std::forward<IamInstanceProfileT>(value);
167 }
168 template <typename IamInstanceProfileT = IamInstanceProfileSpecification>
170 SetIamInstanceProfile(std::forward<IamInstanceProfileT>(value));
171 return *this;
172 }
174
176
179 inline const Aws::String& GetImageId() const { return m_imageId; }
180 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
181 template <typename ImageIdT = Aws::String>
182 void SetImageId(ImageIdT&& value) {
183 m_imageIdHasBeenSet = true;
184 m_imageId = std::forward<ImageIdT>(value);
185 }
186 template <typename ImageIdT = Aws::String>
188 SetImageId(std::forward<ImageIdT>(value));
189 return *this;
190 }
192
194
197 inline InstanceType GetInstanceType() const { return m_instanceType; }
198 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
199 inline void SetInstanceType(InstanceType value) {
200 m_instanceTypeHasBeenSet = true;
201 m_instanceType = value;
202 }
204 SetInstanceType(value);
205 return *this;
206 }
208
210
213 inline const Aws::String& GetKernelId() const { return m_kernelId; }
214 inline bool KernelIdHasBeenSet() const { return m_kernelIdHasBeenSet; }
215 template <typename KernelIdT = Aws::String>
216 void SetKernelId(KernelIdT&& value) {
217 m_kernelIdHasBeenSet = true;
218 m_kernelId = std::forward<KernelIdT>(value);
219 }
220 template <typename KernelIdT = Aws::String>
222 SetKernelId(std::forward<KernelIdT>(value));
223 return *this;
224 }
226
228
231 inline const Aws::String& GetKeyName() const { return m_keyName; }
232 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
233 template <typename KeyNameT = Aws::String>
234 void SetKeyName(KeyNameT&& value) {
235 m_keyNameHasBeenSet = true;
236 m_keyName = std::forward<KeyNameT>(value);
237 }
238 template <typename KeyNameT = Aws::String>
240 SetKeyName(std::forward<KeyNameT>(value));
241 return *this;
242 }
244
246
250 inline const RunInstancesMonitoringEnabled& GetMonitoring() const { return m_monitoring; }
251 inline bool MonitoringHasBeenSet() const { return m_monitoringHasBeenSet; }
252 template <typename MonitoringT = RunInstancesMonitoringEnabled>
253 void SetMonitoring(MonitoringT&& value) {
254 m_monitoringHasBeenSet = true;
255 m_monitoring = std::forward<MonitoringT>(value);
256 }
257 template <typename MonitoringT = RunInstancesMonitoringEnabled>
259 SetMonitoring(std::forward<MonitoringT>(value));
260 return *this;
261 }
263
265
269 inline const Aws::Vector<InstanceNetworkInterfaceSpecification>& GetNetworkInterfaces() const { return m_networkInterfaces; }
270 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
271 template <typename NetworkInterfacesT = Aws::Vector<InstanceNetworkInterfaceSpecification>>
272 void SetNetworkInterfaces(NetworkInterfacesT&& value) {
273 m_networkInterfacesHasBeenSet = true;
274 m_networkInterfaces = std::forward<NetworkInterfacesT>(value);
275 }
276 template <typename NetworkInterfacesT = Aws::Vector<InstanceNetworkInterfaceSpecification>>
278 SetNetworkInterfaces(std::forward<NetworkInterfacesT>(value));
279 return *this;
280 }
281 template <typename NetworkInterfacesT = InstanceNetworkInterfaceSpecification>
283 m_networkInterfacesHasBeenSet = true;
284 m_networkInterfaces.emplace_back(std::forward<NetworkInterfacesT>(value));
285 return *this;
286 }
288
290
293 inline const SpotPlacement& GetPlacement() const { return m_placement; }
294 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
295 template <typename PlacementT = SpotPlacement>
296 void SetPlacement(PlacementT&& value) {
297 m_placementHasBeenSet = true;
298 m_placement = std::forward<PlacementT>(value);
299 }
300 template <typename PlacementT = SpotPlacement>
302 SetPlacement(std::forward<PlacementT>(value));
303 return *this;
304 }
306
308
311 inline const Aws::String& GetRamdiskId() const { return m_ramdiskId; }
312 inline bool RamdiskIdHasBeenSet() const { return m_ramdiskIdHasBeenSet; }
313 template <typename RamdiskIdT = Aws::String>
314 void SetRamdiskId(RamdiskIdT&& value) {
315 m_ramdiskIdHasBeenSet = true;
316 m_ramdiskId = std::forward<RamdiskIdT>(value);
317 }
318 template <typename RamdiskIdT = Aws::String>
320 SetRamdiskId(std::forward<RamdiskIdT>(value));
321 return *this;
322 }
324
326
329 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
330 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
331 template <typename SubnetIdT = Aws::String>
332 void SetSubnetId(SubnetIdT&& value) {
333 m_subnetIdHasBeenSet = true;
334 m_subnetId = std::forward<SubnetIdT>(value);
335 }
336 template <typename SubnetIdT = Aws::String>
338 SetSubnetId(std::forward<SubnetIdT>(value));
339 return *this;
340 }
342
344
348 inline const Aws::String& GetUserData() const { return m_userData; }
349 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
350 template <typename UserDataT = Aws::String>
351 void SetUserData(UserDataT&& value) {
352 m_userDataHasBeenSet = true;
353 m_userData = std::forward<UserDataT>(value);
354 }
355 template <typename UserDataT = Aws::String>
357 SetUserData(std::forward<UserDataT>(value));
358 return *this;
359 }
361 private:
362 Aws::Vector<Aws::String> m_securityGroupIds;
363
364 Aws::Vector<Aws::String> m_securityGroups;
365
366 Aws::String m_addressingType;
367
368 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
369
370 bool m_ebsOptimized{false};
371
372 IamInstanceProfileSpecification m_iamInstanceProfile;
373
374 Aws::String m_imageId;
375
376 InstanceType m_instanceType{InstanceType::NOT_SET};
377
378 Aws::String m_kernelId;
379
380 Aws::String m_keyName;
381
382 RunInstancesMonitoringEnabled m_monitoring;
383
385
386 SpotPlacement m_placement;
387
388 Aws::String m_ramdiskId;
389
390 Aws::String m_subnetId;
391
392 Aws::String m_userData;
393 bool m_securityGroupIdsHasBeenSet = false;
394 bool m_securityGroupsHasBeenSet = false;
395 bool m_addressingTypeHasBeenSet = false;
396 bool m_blockDeviceMappingsHasBeenSet = false;
397 bool m_ebsOptimizedHasBeenSet = false;
398 bool m_iamInstanceProfileHasBeenSet = false;
399 bool m_imageIdHasBeenSet = false;
400 bool m_instanceTypeHasBeenSet = false;
401 bool m_kernelIdHasBeenSet = false;
402 bool m_keyNameHasBeenSet = false;
403 bool m_monitoringHasBeenSet = false;
404 bool m_networkInterfacesHasBeenSet = false;
405 bool m_placementHasBeenSet = false;
406 bool m_ramdiskIdHasBeenSet = false;
407 bool m_subnetIdHasBeenSet = false;
408 bool m_userDataHasBeenSet = false;
409};
410
411} // namespace Model
412} // namespace EC2
413} // namespace Aws
RequestSpotLaunchSpecification & WithMonitoring(MonitoringT &&value)
RequestSpotLaunchSpecification & WithEbsOptimized(bool value)
RequestSpotLaunchSpecification & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
RequestSpotLaunchSpecification & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
RequestSpotLaunchSpecification & WithRamdiskId(RamdiskIdT &&value)
const IamInstanceProfileSpecification & GetIamInstanceProfile() const
RequestSpotLaunchSpecification & WithSecurityGroups(SecurityGroupsT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
RequestSpotLaunchSpecification & AddSecurityGroups(SecurityGroupsT &&value)
RequestSpotLaunchSpecification & WithSubnetId(SubnetIdT &&value)
RequestSpotLaunchSpecification & AddNetworkInterfaces(NetworkInterfacesT &&value)
RequestSpotLaunchSpecification & WithAddressingType(AddressingTypeT &&value)
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
RequestSpotLaunchSpecification & WithUserData(UserDataT &&value)
const Aws::Vector< Aws::String > & GetSecurityGroups() const
RequestSpotLaunchSpecification & AddSecurityGroupIds(SecurityGroupIdsT &&value)
RequestSpotLaunchSpecification & WithPlacement(PlacementT &&value)
AWS_EC2_API RequestSpotLaunchSpecification & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
RequestSpotLaunchSpecification & WithSecurityGroupIds(SecurityGroupIdsT &&value)
const Aws::Vector< InstanceNetworkInterfaceSpecification > & GetNetworkInterfaces() const
RequestSpotLaunchSpecification & WithInstanceType(InstanceType value)
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
RequestSpotLaunchSpecification & WithIamInstanceProfile(IamInstanceProfileT &&value)
RequestSpotLaunchSpecification & WithKeyName(KeyNameT &&value)
AWS_EC2_API RequestSpotLaunchSpecification(const Aws::Utils::Xml::XmlNode &xmlNode)
RequestSpotLaunchSpecification & WithKernelId(KernelIdT &&value)
RequestSpotLaunchSpecification & WithImageId(ImageIdT &&value)
const RunInstancesMonitoringEnabled & GetMonitoring() const
RequestSpotLaunchSpecification & WithNetworkInterfaces(NetworkInterfacesT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream