AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
RequestSpotLaunchSpecification.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/IamInstanceProfileSpecification.h>
12#include <aws/ec2/model/InstanceType.h>
13#include <aws/ec2/model/RunInstancesMonitoringEnabled.h>
14#include <aws/ec2/model/SpotPlacement.h>
15#include <aws/ec2/model/BlockDeviceMapping.h>
16#include <aws/ec2/model/InstanceNetworkInterfaceSpecification.h>
17#include <utility>
18
19namespace Aws
20{
21namespace Utils
22{
23namespace Xml
24{
25 class XmlNode;
26} // namespace Xml
27} // namespace Utils
28namespace EC2
29{
30namespace Model
31{
32
40 {
41 public:
45
46 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
48
49
51
54 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const{ return m_securityGroupIds; }
55 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
56 inline void SetSecurityGroupIds(const Aws::Vector<Aws::String>& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = value; }
57 inline void SetSecurityGroupIds(Aws::Vector<Aws::String>&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = std::move(value); }
60 inline RequestSpotLaunchSpecification& AddSecurityGroupIds(const Aws::String& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; }
61 inline RequestSpotLaunchSpecification& AddSecurityGroupIds(Aws::String&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(std::move(value)); return *this; }
62 inline RequestSpotLaunchSpecification& AddSecurityGroupIds(const char* value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; }
64
66
69 inline const Aws::Vector<Aws::String>& GetSecurityGroups() const{ return m_securityGroups; }
70 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
71 inline void SetSecurityGroups(const Aws::Vector<Aws::String>& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = value; }
72 inline void SetSecurityGroups(Aws::Vector<Aws::String>&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = std::move(value); }
75 inline RequestSpotLaunchSpecification& AddSecurityGroups(const Aws::String& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; }
76 inline RequestSpotLaunchSpecification& AddSecurityGroups(Aws::String&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(std::move(value)); return *this; }
77 inline RequestSpotLaunchSpecification& AddSecurityGroups(const char* value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; }
79
81
84 inline const Aws::String& GetAddressingType() const{ return m_addressingType; }
85 inline bool AddressingTypeHasBeenSet() const { return m_addressingTypeHasBeenSet; }
86 inline void SetAddressingType(const Aws::String& value) { m_addressingTypeHasBeenSet = true; m_addressingType = value; }
87 inline void SetAddressingType(Aws::String&& value) { m_addressingTypeHasBeenSet = true; m_addressingType = std::move(value); }
88 inline void SetAddressingType(const char* value) { m_addressingTypeHasBeenSet = true; m_addressingType.assign(value); }
90 inline RequestSpotLaunchSpecification& WithAddressingType(Aws::String&& value) { SetAddressingType(std::move(value)); return *this;}
91 inline RequestSpotLaunchSpecification& WithAddressingType(const char* value) { SetAddressingType(value); return *this;}
93
95
101 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; }
102 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
103 inline void SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; }
104 inline void SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); }
107 inline RequestSpotLaunchSpecification& AddBlockDeviceMappings(const BlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; }
108 inline RequestSpotLaunchSpecification& AddBlockDeviceMappings(BlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; }
110
112
119 inline bool GetEbsOptimized() const{ return m_ebsOptimized; }
120 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
121 inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; }
122 inline RequestSpotLaunchSpecification& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;}
124
126
129 inline const IamInstanceProfileSpecification& GetIamInstanceProfile() const{ return m_iamInstanceProfile; }
130 inline bool IamInstanceProfileHasBeenSet() const { return m_iamInstanceProfileHasBeenSet; }
131 inline void SetIamInstanceProfile(const IamInstanceProfileSpecification& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = value; }
132 inline void SetIamInstanceProfile(IamInstanceProfileSpecification&& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = std::move(value); }
136
138
141 inline const Aws::String& GetImageId() const{ return m_imageId; }
142 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
143 inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; }
144 inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); }
145 inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); }
146 inline RequestSpotLaunchSpecification& WithImageId(const Aws::String& value) { SetImageId(value); return *this;}
147 inline RequestSpotLaunchSpecification& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;}
148 inline RequestSpotLaunchSpecification& WithImageId(const char* value) { SetImageId(value); return *this;}
150
152
155 inline const InstanceType& GetInstanceType() const{ return m_instanceType; }
156 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
157 inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
158 inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
160 inline RequestSpotLaunchSpecification& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;}
162
164
167 inline const Aws::String& GetKernelId() const{ return m_kernelId; }
168 inline bool KernelIdHasBeenSet() const { return m_kernelIdHasBeenSet; }
169 inline void SetKernelId(const Aws::String& value) { m_kernelIdHasBeenSet = true; m_kernelId = value; }
170 inline void SetKernelId(Aws::String&& value) { m_kernelIdHasBeenSet = true; m_kernelId = std::move(value); }
171 inline void SetKernelId(const char* value) { m_kernelIdHasBeenSet = true; m_kernelId.assign(value); }
172 inline RequestSpotLaunchSpecification& WithKernelId(const Aws::String& value) { SetKernelId(value); return *this;}
173 inline RequestSpotLaunchSpecification& WithKernelId(Aws::String&& value) { SetKernelId(std::move(value)); return *this;}
174 inline RequestSpotLaunchSpecification& WithKernelId(const char* value) { SetKernelId(value); return *this;}
176
178
181 inline const Aws::String& GetKeyName() const{ return m_keyName; }
182 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
183 inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; }
184 inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); }
185 inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); }
186 inline RequestSpotLaunchSpecification& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;}
187 inline RequestSpotLaunchSpecification& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;}
188 inline RequestSpotLaunchSpecification& WithKeyName(const char* value) { SetKeyName(value); return *this;}
190
192
196 inline const RunInstancesMonitoringEnabled& GetMonitoring() const{ return m_monitoring; }
197 inline bool MonitoringHasBeenSet() const { return m_monitoringHasBeenSet; }
198 inline void SetMonitoring(const RunInstancesMonitoringEnabled& value) { m_monitoringHasBeenSet = true; m_monitoring = value; }
199 inline void SetMonitoring(RunInstancesMonitoringEnabled&& value) { m_monitoringHasBeenSet = true; m_monitoring = std::move(value); }
203
205
209 inline const Aws::Vector<InstanceNetworkInterfaceSpecification>& GetNetworkInterfaces() const{ return m_networkInterfaces; }
210 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
211 inline void SetNetworkInterfaces(const Aws::Vector<InstanceNetworkInterfaceSpecification>& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = value; }
212 inline void SetNetworkInterfaces(Aws::Vector<InstanceNetworkInterfaceSpecification>&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = std::move(value); }
215 inline RequestSpotLaunchSpecification& AddNetworkInterfaces(const InstanceNetworkInterfaceSpecification& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(value); return *this; }
216 inline RequestSpotLaunchSpecification& AddNetworkInterfaces(InstanceNetworkInterfaceSpecification&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(std::move(value)); return *this; }
218
220
223 inline const SpotPlacement& GetPlacement() const{ return m_placement; }
224 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
225 inline void SetPlacement(const SpotPlacement& value) { m_placementHasBeenSet = true; m_placement = value; }
226 inline void SetPlacement(SpotPlacement&& value) { m_placementHasBeenSet = true; m_placement = std::move(value); }
227 inline RequestSpotLaunchSpecification& WithPlacement(const SpotPlacement& value) { SetPlacement(value); return *this;}
228 inline RequestSpotLaunchSpecification& WithPlacement(SpotPlacement&& value) { SetPlacement(std::move(value)); return *this;}
230
232
235 inline const Aws::String& GetRamdiskId() const{ return m_ramdiskId; }
236 inline bool RamdiskIdHasBeenSet() const { return m_ramdiskIdHasBeenSet; }
237 inline void SetRamdiskId(const Aws::String& value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId = value; }
238 inline void SetRamdiskId(Aws::String&& value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId = std::move(value); }
239 inline void SetRamdiskId(const char* value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId.assign(value); }
240 inline RequestSpotLaunchSpecification& WithRamdiskId(const Aws::String& value) { SetRamdiskId(value); return *this;}
241 inline RequestSpotLaunchSpecification& WithRamdiskId(Aws::String&& value) { SetRamdiskId(std::move(value)); return *this;}
242 inline RequestSpotLaunchSpecification& WithRamdiskId(const char* value) { SetRamdiskId(value); return *this;}
244
246
249 inline const Aws::String& GetSubnetId() const{ return m_subnetId; }
250 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
251 inline void SetSubnetId(const Aws::String& value) { m_subnetIdHasBeenSet = true; m_subnetId = value; }
252 inline void SetSubnetId(Aws::String&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::move(value); }
253 inline void SetSubnetId(const char* value) { m_subnetIdHasBeenSet = true; m_subnetId.assign(value); }
254 inline RequestSpotLaunchSpecification& WithSubnetId(const Aws::String& value) { SetSubnetId(value); return *this;}
255 inline RequestSpotLaunchSpecification& WithSubnetId(Aws::String&& value) { SetSubnetId(std::move(value)); return *this;}
256 inline RequestSpotLaunchSpecification& WithSubnetId(const char* value) { SetSubnetId(value); return *this;}
258
260
264 inline const Aws::String& GetUserData() const{ return m_userData; }
265 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
266 inline void SetUserData(const Aws::String& value) { m_userDataHasBeenSet = true; m_userData = value; }
267 inline void SetUserData(Aws::String&& value) { m_userDataHasBeenSet = true; m_userData = std::move(value); }
268 inline void SetUserData(const char* value) { m_userDataHasBeenSet = true; m_userData.assign(value); }
269 inline RequestSpotLaunchSpecification& WithUserData(const Aws::String& value) { SetUserData(value); return *this;}
270 inline RequestSpotLaunchSpecification& WithUserData(Aws::String&& value) { SetUserData(std::move(value)); return *this;}
271 inline RequestSpotLaunchSpecification& WithUserData(const char* value) { SetUserData(value); return *this;}
273 private:
274
275 Aws::Vector<Aws::String> m_securityGroupIds;
276 bool m_securityGroupIdsHasBeenSet = false;
277
278 Aws::Vector<Aws::String> m_securityGroups;
279 bool m_securityGroupsHasBeenSet = false;
280
281 Aws::String m_addressingType;
282 bool m_addressingTypeHasBeenSet = false;
283
284 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
285 bool m_blockDeviceMappingsHasBeenSet = false;
286
287 bool m_ebsOptimized;
288 bool m_ebsOptimizedHasBeenSet = false;
289
290 IamInstanceProfileSpecification m_iamInstanceProfile;
291 bool m_iamInstanceProfileHasBeenSet = false;
292
293 Aws::String m_imageId;
294 bool m_imageIdHasBeenSet = false;
295
296 InstanceType m_instanceType;
297 bool m_instanceTypeHasBeenSet = false;
298
299 Aws::String m_kernelId;
300 bool m_kernelIdHasBeenSet = false;
301
302 Aws::String m_keyName;
303 bool m_keyNameHasBeenSet = false;
304
306 bool m_monitoringHasBeenSet = false;
307
309 bool m_networkInterfacesHasBeenSet = false;
310
311 SpotPlacement m_placement;
312 bool m_placementHasBeenSet = false;
313
314 Aws::String m_ramdiskId;
315 bool m_ramdiskIdHasBeenSet = false;
316
317 Aws::String m_subnetId;
318 bool m_subnetIdHasBeenSet = false;
319
320 Aws::String m_userData;
321 bool m_userDataHasBeenSet = false;
322 };
323
324} // namespace Model
325} // namespace EC2
326} // namespace Aws
RequestSpotLaunchSpecification & AddNetworkInterfaces(const InstanceNetworkInterfaceSpecification &value)
RequestSpotLaunchSpecification & WithEbsOptimized(bool value)
void SetMonitoring(const RunInstancesMonitoringEnabled &value)
void SetNetworkInterfaces(const Aws::Vector< InstanceNetworkInterfaceSpecification > &value)
RequestSpotLaunchSpecification & AddSecurityGroupIds(Aws::String &&value)
RequestSpotLaunchSpecification & WithPlacement(SpotPlacement &&value)
RequestSpotLaunchSpecification & WithMonitoring(const RunInstancesMonitoringEnabled &value)
void SetNetworkInterfaces(Aws::Vector< InstanceNetworkInterfaceSpecification > &&value)
const IamInstanceProfileSpecification & GetIamInstanceProfile() const
void SetMonitoring(RunInstancesMonitoringEnabled &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetSecurityGroups(const Aws::Vector< Aws::String > &value)
RequestSpotLaunchSpecification & WithUserData(Aws::String &&value)
RequestSpotLaunchSpecification & WithMonitoring(RunInstancesMonitoringEnabled &&value)
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
void SetIamInstanceProfile(IamInstanceProfileSpecification &&value)
void SetSecurityGroups(Aws::Vector< Aws::String > &&value)
RequestSpotLaunchSpecification & AddBlockDeviceMappings(const BlockDeviceMapping &value)
RequestSpotLaunchSpecification & WithSubnetId(const Aws::String &value)
RequestSpotLaunchSpecification & WithImageId(const Aws::String &value)
RequestSpotLaunchSpecification & WithSubnetId(Aws::String &&value)
void SetBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
RequestSpotLaunchSpecification & WithImageId(Aws::String &&value)
RequestSpotLaunchSpecification & WithKeyName(const Aws::String &value)
const Aws::Vector< Aws::String > & GetSecurityGroups() const
RequestSpotLaunchSpecification & WithRamdiskId(const char *value)
RequestSpotLaunchSpecification & WithPlacement(const SpotPlacement &value)
RequestSpotLaunchSpecification & AddSecurityGroups(Aws::String &&value)
RequestSpotLaunchSpecification & WithAddressingType(const Aws::String &value)
void SetSecurityGroupIds(Aws::Vector< Aws::String > &&value)
RequestSpotLaunchSpecification & AddSecurityGroupIds(const char *value)
RequestSpotLaunchSpecification & AddBlockDeviceMappings(BlockDeviceMapping &&value)
AWS_EC2_API RequestSpotLaunchSpecification & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
RequestSpotLaunchSpecification & WithIamInstanceProfile(IamInstanceProfileSpecification &&value)
RequestSpotLaunchSpecification & WithInstanceType(InstanceType &&value)
RequestSpotLaunchSpecification & WithAddressingType(Aws::String &&value)
RequestSpotLaunchSpecification & WithSecurityGroups(Aws::Vector< Aws::String > &&value)
RequestSpotLaunchSpecification & WithInstanceType(const InstanceType &value)
const Aws::Vector< InstanceNetworkInterfaceSpecification > & GetNetworkInterfaces() const
RequestSpotLaunchSpecification & WithKernelId(const char *value)
RequestSpotLaunchSpecification & AddSecurityGroups(const Aws::String &value)
RequestSpotLaunchSpecification & AddSecurityGroups(const char *value)
RequestSpotLaunchSpecification & WithKeyName(Aws::String &&value)
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
RequestSpotLaunchSpecification & AddSecurityGroupIds(const Aws::String &value)
RequestSpotLaunchSpecification & WithIamInstanceProfile(const IamInstanceProfileSpecification &value)
RequestSpotLaunchSpecification & WithNetworkInterfaces(Aws::Vector< InstanceNetworkInterfaceSpecification > &&value)
RequestSpotLaunchSpecification & WithKernelId(const Aws::String &value)
RequestSpotLaunchSpecification & AddNetworkInterfaces(InstanceNetworkInterfaceSpecification &&value)
RequestSpotLaunchSpecification & WithBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
AWS_EC2_API RequestSpotLaunchSpecification(const Aws::Utils::Xml::XmlNode &xmlNode)
RequestSpotLaunchSpecification & WithBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
void SetBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
RequestSpotLaunchSpecification & WithNetworkInterfaces(const Aws::Vector< InstanceNetworkInterfaceSpecification > &value)
RequestSpotLaunchSpecification & WithImageId(const char *value)
RequestSpotLaunchSpecification & WithSecurityGroupIds(const Aws::Vector< Aws::String > &value)
RequestSpotLaunchSpecification & WithUserData(const Aws::String &value)
RequestSpotLaunchSpecification & WithAddressingType(const char *value)
RequestSpotLaunchSpecification & WithSecurityGroupIds(Aws::Vector< Aws::String > &&value)
RequestSpotLaunchSpecification & WithSecurityGroups(const Aws::Vector< Aws::String > &value)
RequestSpotLaunchSpecification & WithRamdiskId(const Aws::String &value)
RequestSpotLaunchSpecification & WithRamdiskId(Aws::String &&value)
void SetIamInstanceProfile(const IamInstanceProfileSpecification &value)
const RunInstancesMonitoringEnabled & GetMonitoring() const
RequestSpotLaunchSpecification & WithKernelId(Aws::String &&value)
void SetSecurityGroupIds(const Aws::Vector< Aws::String > &value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
RequestSpotLaunchSpecification & WithKeyName(const char *value)
RequestSpotLaunchSpecification & WithUserData(const char *value)
RequestSpotLaunchSpecification & WithSubnetId(const char *value)
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