AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
LaunchSpecification.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/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/IamInstanceProfileSpecification.h>
12#include <aws/ec2/model/InstanceType.h>
13#include <aws/ec2/model/SpotPlacement.h>
14#include <aws/ec2/model/RunInstancesMonitoringEnabled.h>
15#include <aws/ec2/model/BlockDeviceMapping.h>
16#include <aws/ec2/model/InstanceNetworkInterfaceSpecification.h>
17#include <aws/ec2/model/GroupIdentifier.h>
18#include <utility>
19
20namespace Aws
21{
22namespace Utils
23{
24namespace Xml
25{
26 class XmlNode;
27} // namespace Xml
28} // namespace Utils
29namespace EC2
30{
31namespace Model
32{
33
41 {
42 public:
43 AWS_EC2_API LaunchSpecification();
44 AWS_EC2_API LaunchSpecification(const Aws::Utils::Xml::XmlNode& xmlNode);
46
47 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
49
50
52
56 inline const Aws::String& GetUserData() const{ return m_userData; }
57 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
58 inline void SetUserData(const Aws::String& value) { m_userDataHasBeenSet = true; m_userData = value; }
59 inline void SetUserData(Aws::String&& value) { m_userDataHasBeenSet = true; m_userData = std::move(value); }
60 inline void SetUserData(const char* value) { m_userDataHasBeenSet = true; m_userData.assign(value); }
61 inline LaunchSpecification& WithUserData(const Aws::String& value) { SetUserData(value); return *this;}
62 inline LaunchSpecification& WithUserData(Aws::String&& value) { SetUserData(std::move(value)); return *this;}
63 inline LaunchSpecification& WithUserData(const char* value) { SetUserData(value); return *this;}
65
67
70 inline const Aws::String& GetAddressingType() const{ return m_addressingType; }
71 inline bool AddressingTypeHasBeenSet() const { return m_addressingTypeHasBeenSet; }
72 inline void SetAddressingType(const Aws::String& value) { m_addressingTypeHasBeenSet = true; m_addressingType = value; }
73 inline void SetAddressingType(Aws::String&& value) { m_addressingTypeHasBeenSet = true; m_addressingType = std::move(value); }
74 inline void SetAddressingType(const char* value) { m_addressingTypeHasBeenSet = true; m_addressingType.assign(value); }
75 inline LaunchSpecification& WithAddressingType(const Aws::String& value) { SetAddressingType(value); return *this;}
76 inline LaunchSpecification& WithAddressingType(Aws::String&& value) { SetAddressingType(std::move(value)); return *this;}
77 inline LaunchSpecification& WithAddressingType(const char* value) { SetAddressingType(value); return *this;}
79
81
84 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; }
85 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
86 inline void SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; }
87 inline void SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); }
90 inline LaunchSpecification& AddBlockDeviceMappings(const BlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; }
91 inline LaunchSpecification& AddBlockDeviceMappings(BlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; }
93
95
102 inline bool GetEbsOptimized() const{ return m_ebsOptimized; }
103 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
104 inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; }
105 inline LaunchSpecification& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;}
107
109
112 inline const IamInstanceProfileSpecification& GetIamInstanceProfile() const{ return m_iamInstanceProfile; }
113 inline bool IamInstanceProfileHasBeenSet() const { return m_iamInstanceProfileHasBeenSet; }
114 inline void SetIamInstanceProfile(const IamInstanceProfileSpecification& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = value; }
115 inline void SetIamInstanceProfile(IamInstanceProfileSpecification&& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = std::move(value); }
119
121
124 inline const Aws::String& GetImageId() const{ return m_imageId; }
125 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
126 inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; }
127 inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); }
128 inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); }
129 inline LaunchSpecification& WithImageId(const Aws::String& value) { SetImageId(value); return *this;}
130 inline LaunchSpecification& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;}
131 inline LaunchSpecification& WithImageId(const char* value) { SetImageId(value); return *this;}
133
135
138 inline const InstanceType& GetInstanceType() const{ return m_instanceType; }
139 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
140 inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
141 inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
142 inline LaunchSpecification& WithInstanceType(const InstanceType& value) { SetInstanceType(value); return *this;}
143 inline LaunchSpecification& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;}
145
147
150 inline const Aws::String& GetKernelId() const{ return m_kernelId; }
151 inline bool KernelIdHasBeenSet() const { return m_kernelIdHasBeenSet; }
152 inline void SetKernelId(const Aws::String& value) { m_kernelIdHasBeenSet = true; m_kernelId = value; }
153 inline void SetKernelId(Aws::String&& value) { m_kernelIdHasBeenSet = true; m_kernelId = std::move(value); }
154 inline void SetKernelId(const char* value) { m_kernelIdHasBeenSet = true; m_kernelId.assign(value); }
155 inline LaunchSpecification& WithKernelId(const Aws::String& value) { SetKernelId(value); return *this;}
156 inline LaunchSpecification& WithKernelId(Aws::String&& value) { SetKernelId(std::move(value)); return *this;}
157 inline LaunchSpecification& WithKernelId(const char* value) { SetKernelId(value); return *this;}
159
161
164 inline const Aws::String& GetKeyName() const{ return m_keyName; }
165 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
166 inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; }
167 inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); }
168 inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); }
169 inline LaunchSpecification& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;}
170 inline LaunchSpecification& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;}
171 inline LaunchSpecification& WithKeyName(const char* value) { SetKeyName(value); return *this;}
173
175
179 inline const Aws::Vector<InstanceNetworkInterfaceSpecification>& GetNetworkInterfaces() const{ return m_networkInterfaces; }
180 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
181 inline void SetNetworkInterfaces(const Aws::Vector<InstanceNetworkInterfaceSpecification>& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = value; }
182 inline void SetNetworkInterfaces(Aws::Vector<InstanceNetworkInterfaceSpecification>&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = std::move(value); }
185 inline LaunchSpecification& AddNetworkInterfaces(const InstanceNetworkInterfaceSpecification& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(value); return *this; }
186 inline LaunchSpecification& AddNetworkInterfaces(InstanceNetworkInterfaceSpecification&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(std::move(value)); return *this; }
188
190
193 inline const SpotPlacement& GetPlacement() const{ return m_placement; }
194 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
195 inline void SetPlacement(const SpotPlacement& value) { m_placementHasBeenSet = true; m_placement = value; }
196 inline void SetPlacement(SpotPlacement&& value) { m_placementHasBeenSet = true; m_placement = std::move(value); }
197 inline LaunchSpecification& WithPlacement(const SpotPlacement& value) { SetPlacement(value); return *this;}
198 inline LaunchSpecification& WithPlacement(SpotPlacement&& value) { SetPlacement(std::move(value)); return *this;}
200
202
205 inline const Aws::String& GetRamdiskId() const{ return m_ramdiskId; }
206 inline bool RamdiskIdHasBeenSet() const { return m_ramdiskIdHasBeenSet; }
207 inline void SetRamdiskId(const Aws::String& value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId = value; }
208 inline void SetRamdiskId(Aws::String&& value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId = std::move(value); }
209 inline void SetRamdiskId(const char* value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId.assign(value); }
210 inline LaunchSpecification& WithRamdiskId(const Aws::String& value) { SetRamdiskId(value); return *this;}
211 inline LaunchSpecification& WithRamdiskId(Aws::String&& value) { SetRamdiskId(std::move(value)); return *this;}
212 inline LaunchSpecification& WithRamdiskId(const char* value) { SetRamdiskId(value); return *this;}
214
216
219 inline const Aws::String& GetSubnetId() const{ return m_subnetId; }
220 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
221 inline void SetSubnetId(const Aws::String& value) { m_subnetIdHasBeenSet = true; m_subnetId = value; }
222 inline void SetSubnetId(Aws::String&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::move(value); }
223 inline void SetSubnetId(const char* value) { m_subnetIdHasBeenSet = true; m_subnetId.assign(value); }
224 inline LaunchSpecification& WithSubnetId(const Aws::String& value) { SetSubnetId(value); return *this;}
225 inline LaunchSpecification& WithSubnetId(Aws::String&& value) { SetSubnetId(std::move(value)); return *this;}
226 inline LaunchSpecification& WithSubnetId(const char* value) { SetSubnetId(value); return *this;}
228
230
233 inline const Aws::Vector<GroupIdentifier>& GetSecurityGroups() const{ return m_securityGroups; }
234 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
235 inline void SetSecurityGroups(const Aws::Vector<GroupIdentifier>& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = value; }
236 inline void SetSecurityGroups(Aws::Vector<GroupIdentifier>&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = std::move(value); }
239 inline LaunchSpecification& AddSecurityGroups(const GroupIdentifier& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; }
240 inline LaunchSpecification& AddSecurityGroups(GroupIdentifier&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(std::move(value)); return *this; }
242
244
245 inline const RunInstancesMonitoringEnabled& GetMonitoring() const{ return m_monitoring; }
246 inline bool MonitoringHasBeenSet() const { return m_monitoringHasBeenSet; }
247 inline void SetMonitoring(const RunInstancesMonitoringEnabled& value) { m_monitoringHasBeenSet = true; m_monitoring = value; }
248 inline void SetMonitoring(RunInstancesMonitoringEnabled&& value) { m_monitoringHasBeenSet = true; m_monitoring = std::move(value); }
250 inline LaunchSpecification& WithMonitoring(RunInstancesMonitoringEnabled&& value) { SetMonitoring(std::move(value)); return *this;}
252 private:
253
254 Aws::String m_userData;
255 bool m_userDataHasBeenSet = false;
256
257 Aws::String m_addressingType;
258 bool m_addressingTypeHasBeenSet = false;
259
260 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
261 bool m_blockDeviceMappingsHasBeenSet = false;
262
263 bool m_ebsOptimized;
264 bool m_ebsOptimizedHasBeenSet = false;
265
266 IamInstanceProfileSpecification m_iamInstanceProfile;
267 bool m_iamInstanceProfileHasBeenSet = false;
268
269 Aws::String m_imageId;
270 bool m_imageIdHasBeenSet = false;
271
272 InstanceType m_instanceType;
273 bool m_instanceTypeHasBeenSet = false;
274
275 Aws::String m_kernelId;
276 bool m_kernelIdHasBeenSet = false;
277
278 Aws::String m_keyName;
279 bool m_keyNameHasBeenSet = false;
280
282 bool m_networkInterfacesHasBeenSet = false;
283
284 SpotPlacement m_placement;
285 bool m_placementHasBeenSet = false;
286
287 Aws::String m_ramdiskId;
288 bool m_ramdiskIdHasBeenSet = false;
289
290 Aws::String m_subnetId;
291 bool m_subnetIdHasBeenSet = false;
292
293 Aws::Vector<GroupIdentifier> m_securityGroups;
294 bool m_securityGroupsHasBeenSet = false;
295
297 bool m_monitoringHasBeenSet = false;
298 };
299
300} // namespace Model
301} // namespace EC2
302} // namespace Aws
LaunchSpecification & WithBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
LaunchSpecification & WithUserData(const char *value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
LaunchSpecification & WithKernelId(const char *value)
void SetNetworkInterfaces(const Aws::Vector< InstanceNetworkInterfaceSpecification > &value)
LaunchSpecification & WithRamdiskId(Aws::String &&value)
LaunchSpecification & WithMonitoring(RunInstancesMonitoringEnabled &&value)
LaunchSpecification & WithNetworkInterfaces(const Aws::Vector< InstanceNetworkInterfaceSpecification > &value)
LaunchSpecification & WithKernelId(const Aws::String &value)
LaunchSpecification & WithSecurityGroups(Aws::Vector< GroupIdentifier > &&value)
LaunchSpecification & WithImageId(Aws::String &&value)
LaunchSpecification & WithIamInstanceProfile(const IamInstanceProfileSpecification &value)
const Aws::String & GetKeyName() const
void SetBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
const InstanceType & GetInstanceType() const
LaunchSpecification & WithKeyName(const char *value)
const RunInstancesMonitoringEnabled & GetMonitoring() const
LaunchSpecification & AddNetworkInterfaces(const InstanceNetworkInterfaceSpecification &value)
LaunchSpecification & AddSecurityGroups(GroupIdentifier &&value)
void SetSecurityGroups(Aws::Vector< GroupIdentifier > &&value)
void SetIamInstanceProfile(const IamInstanceProfileSpecification &value)
LaunchSpecification & WithNetworkInterfaces(Aws::Vector< InstanceNetworkInterfaceSpecification > &&value)
LaunchSpecification & AddBlockDeviceMappings(const BlockDeviceMapping &value)
const Aws::Vector< InstanceNetworkInterfaceSpecification > & GetNetworkInterfaces() const
void SetPlacement(SpotPlacement &&value)
LaunchSpecification & AddBlockDeviceMappings(BlockDeviceMapping &&value)
LaunchSpecification & WithKeyName(const Aws::String &value)
LaunchSpecification & WithAddressingType(Aws::String &&value)
LaunchSpecification & WithBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
void SetAddressingType(Aws::String &&value)
void SetKernelId(const Aws::String &value)
void SetImageId(const Aws::String &value)
void SetIamInstanceProfile(IamInstanceProfileSpecification &&value)
void SetSubnetId(const Aws::String &value)
LaunchSpecification & WithKernelId(Aws::String &&value)
LaunchSpecification & WithSecurityGroups(const Aws::Vector< GroupIdentifier > &value)
void SetAddressingType(const Aws::String &value)
LaunchSpecification & WithImageId(const Aws::String &value)
const Aws::Vector< GroupIdentifier > & GetSecurityGroups() const
void SetKeyName(const Aws::String &value)
AWS_EC2_API LaunchSpecification & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetInstanceType(InstanceType &&value)
void SetNetworkInterfaces(Aws::Vector< InstanceNetworkInterfaceSpecification > &&value)
const Aws::String & GetKernelId() const
void SetMonitoring(const RunInstancesMonitoringEnabled &value)
LaunchSpecification & WithRamdiskId(const Aws::String &value)
void SetBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
const Aws::String & GetUserData() const
LaunchSpecification & WithAddressingType(const Aws::String &value)
LaunchSpecification & WithSubnetId(const char *value)
LaunchSpecification & WithMonitoring(const RunInstancesMonitoringEnabled &value)
LaunchSpecification & WithPlacement(SpotPlacement &&value)
LaunchSpecification & WithIamInstanceProfile(IamInstanceProfileSpecification &&value)
LaunchSpecification & WithInstanceType(InstanceType &&value)
LaunchSpecification & WithKeyName(Aws::String &&value)
LaunchSpecification & WithSubnetId(const Aws::String &value)
AWS_EC2_API LaunchSpecification(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetMonitoring(RunInstancesMonitoringEnabled &&value)
LaunchSpecification & AddNetworkInterfaces(InstanceNetworkInterfaceSpecification &&value)
LaunchSpecification & AddSecurityGroups(const GroupIdentifier &value)
const Aws::String & GetRamdiskId() const
LaunchSpecification & WithPlacement(const SpotPlacement &value)
void SetInstanceType(const InstanceType &value)
LaunchSpecification & WithUserData(Aws::String &&value)
void SetPlacement(const SpotPlacement &value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
LaunchSpecification & WithRamdiskId(const char *value)
const IamInstanceProfileSpecification & GetIamInstanceProfile() const
void SetSecurityGroups(const Aws::Vector< GroupIdentifier > &value)
const Aws::String & GetSubnetId() const
const Aws::String & GetAddressingType() const
void SetRamdiskId(const Aws::String &value)
LaunchSpecification & WithImageId(const char *value)
const SpotPlacement & GetPlacement() const
void SetUserData(const Aws::String &value)
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
const Aws::String & GetImageId() const
LaunchSpecification & WithUserData(const Aws::String &value)
LaunchSpecification & WithAddressingType(const char *value)
LaunchSpecification & WithSubnetId(Aws::String &&value)
LaunchSpecification & WithInstanceType(const InstanceType &value)
LaunchSpecification & WithEbsOptimized(bool 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