AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
LaunchConfiguration.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/model/BlockDeviceMapping.h>
9#include <aws/autoscaling/model/InstanceMetadataOptions.h>
10#include <aws/autoscaling/model/InstanceMonitoring.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Xml {
21class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace AutoScaling {
25namespace Model {
26
33 public:
34 AWS_AUTOSCALING_API LaunchConfiguration() = default;
35 AWS_AUTOSCALING_API LaunchConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode);
36 AWS_AUTOSCALING_API LaunchConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
45 inline const Aws::String& GetLaunchConfigurationName() const { return m_launchConfigurationName; }
46 inline bool LaunchConfigurationNameHasBeenSet() const { return m_launchConfigurationNameHasBeenSet; }
47 template <typename LaunchConfigurationNameT = Aws::String>
48 void SetLaunchConfigurationName(LaunchConfigurationNameT&& value) {
49 m_launchConfigurationNameHasBeenSet = true;
50 m_launchConfigurationName = std::forward<LaunchConfigurationNameT>(value);
51 }
52 template <typename LaunchConfigurationNameT = Aws::String>
53 LaunchConfiguration& WithLaunchConfigurationName(LaunchConfigurationNameT&& value) {
54 SetLaunchConfigurationName(std::forward<LaunchConfigurationNameT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetLaunchConfigurationARN() const { return m_launchConfigurationARN; }
64 inline bool LaunchConfigurationARNHasBeenSet() const { return m_launchConfigurationARNHasBeenSet; }
65 template <typename LaunchConfigurationARNT = Aws::String>
66 void SetLaunchConfigurationARN(LaunchConfigurationARNT&& value) {
67 m_launchConfigurationARNHasBeenSet = true;
68 m_launchConfigurationARN = std::forward<LaunchConfigurationARNT>(value);
69 }
70 template <typename LaunchConfigurationARNT = Aws::String>
71 LaunchConfiguration& WithLaunchConfigurationARN(LaunchConfigurationARNT&& value) {
72 SetLaunchConfigurationARN(std::forward<LaunchConfigurationARNT>(value));
73 return *this;
74 }
76
78
84 inline const Aws::String& GetImageId() const { return m_imageId; }
85 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
86 template <typename ImageIdT = Aws::String>
87 void SetImageId(ImageIdT&& value) {
88 m_imageIdHasBeenSet = true;
89 m_imageId = std::forward<ImageIdT>(value);
90 }
91 template <typename ImageIdT = Aws::String>
92 LaunchConfiguration& WithImageId(ImageIdT&& value) {
93 SetImageId(std::forward<ImageIdT>(value));
94 return *this;
95 }
97
99
105 inline const Aws::String& GetKeyName() const { return m_keyName; }
106 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
107 template <typename KeyNameT = Aws::String>
108 void SetKeyName(KeyNameT&& value) {
109 m_keyNameHasBeenSet = true;
110 m_keyName = std::forward<KeyNameT>(value);
111 }
112 template <typename KeyNameT = Aws::String>
113 LaunchConfiguration& WithKeyName(KeyNameT&& value) {
114 SetKeyName(std::forward<KeyNameT>(value));
115 return *this;
116 }
118
120
127 inline const Aws::Vector<Aws::String>& GetSecurityGroups() const { return m_securityGroups; }
128 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
129 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
130 void SetSecurityGroups(SecurityGroupsT&& value) {
131 m_securityGroupsHasBeenSet = true;
132 m_securityGroups = std::forward<SecurityGroupsT>(value);
133 }
134 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
135 LaunchConfiguration& WithSecurityGroups(SecurityGroupsT&& value) {
136 SetSecurityGroups(std::forward<SecurityGroupsT>(value));
137 return *this;
138 }
139 template <typename SecurityGroupsT = Aws::String>
140 LaunchConfiguration& AddSecurityGroups(SecurityGroupsT&& value) {
141 m_securityGroupsHasBeenSet = true;
142 m_securityGroups.emplace_back(std::forward<SecurityGroupsT>(value));
143 return *this;
144 }
146
148
151 inline const Aws::String& GetClassicLinkVPCId() const { return m_classicLinkVPCId; }
152 inline bool ClassicLinkVPCIdHasBeenSet() const { return m_classicLinkVPCIdHasBeenSet; }
153 template <typename ClassicLinkVPCIdT = Aws::String>
154 void SetClassicLinkVPCId(ClassicLinkVPCIdT&& value) {
155 m_classicLinkVPCIdHasBeenSet = true;
156 m_classicLinkVPCId = std::forward<ClassicLinkVPCIdT>(value);
157 }
158 template <typename ClassicLinkVPCIdT = Aws::String>
159 LaunchConfiguration& WithClassicLinkVPCId(ClassicLinkVPCIdT&& value) {
160 SetClassicLinkVPCId(std::forward<ClassicLinkVPCIdT>(value));
161 return *this;
162 }
164
166
169 inline const Aws::Vector<Aws::String>& GetClassicLinkVPCSecurityGroups() const { return m_classicLinkVPCSecurityGroups; }
170 inline bool ClassicLinkVPCSecurityGroupsHasBeenSet() const { return m_classicLinkVPCSecurityGroupsHasBeenSet; }
171 template <typename ClassicLinkVPCSecurityGroupsT = Aws::Vector<Aws::String>>
172 void SetClassicLinkVPCSecurityGroups(ClassicLinkVPCSecurityGroupsT&& value) {
173 m_classicLinkVPCSecurityGroupsHasBeenSet = true;
174 m_classicLinkVPCSecurityGroups = std::forward<ClassicLinkVPCSecurityGroupsT>(value);
175 }
176 template <typename ClassicLinkVPCSecurityGroupsT = Aws::Vector<Aws::String>>
177 LaunchConfiguration& WithClassicLinkVPCSecurityGroups(ClassicLinkVPCSecurityGroupsT&& value) {
178 SetClassicLinkVPCSecurityGroups(std::forward<ClassicLinkVPCSecurityGroupsT>(value));
179 return *this;
180 }
181 template <typename ClassicLinkVPCSecurityGroupsT = Aws::String>
182 LaunchConfiguration& AddClassicLinkVPCSecurityGroups(ClassicLinkVPCSecurityGroupsT&& value) {
183 m_classicLinkVPCSecurityGroupsHasBeenSet = true;
184 m_classicLinkVPCSecurityGroups.emplace_back(std::forward<ClassicLinkVPCSecurityGroupsT>(value));
185 return *this;
186 }
188
190
199 inline const Aws::String& GetUserData() const { return m_userData; }
200 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
201 template <typename UserDataT = Aws::String>
202 void SetUserData(UserDataT&& value) {
203 m_userDataHasBeenSet = true;
204 m_userData = std::forward<UserDataT>(value);
205 }
206 template <typename UserDataT = Aws::String>
207 LaunchConfiguration& WithUserData(UserDataT&& value) {
208 SetUserData(std::forward<UserDataT>(value));
209 return *this;
210 }
212
214
220 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
221 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
222 template <typename InstanceTypeT = Aws::String>
223 void SetInstanceType(InstanceTypeT&& value) {
224 m_instanceTypeHasBeenSet = true;
225 m_instanceType = std::forward<InstanceTypeT>(value);
226 }
227 template <typename InstanceTypeT = Aws::String>
228 LaunchConfiguration& WithInstanceType(InstanceTypeT&& value) {
229 SetInstanceType(std::forward<InstanceTypeT>(value));
230 return *this;
231 }
233
235
238 inline const Aws::String& GetKernelId() const { return m_kernelId; }
239 inline bool KernelIdHasBeenSet() const { return m_kernelIdHasBeenSet; }
240 template <typename KernelIdT = Aws::String>
241 void SetKernelId(KernelIdT&& value) {
242 m_kernelIdHasBeenSet = true;
243 m_kernelId = std::forward<KernelIdT>(value);
244 }
245 template <typename KernelIdT = Aws::String>
246 LaunchConfiguration& WithKernelId(KernelIdT&& value) {
247 SetKernelId(std::forward<KernelIdT>(value));
248 return *this;
249 }
251
253
256 inline const Aws::String& GetRamdiskId() const { return m_ramdiskId; }
257 inline bool RamdiskIdHasBeenSet() const { return m_ramdiskIdHasBeenSet; }
258 template <typename RamdiskIdT = Aws::String>
259 void SetRamdiskId(RamdiskIdT&& value) {
260 m_ramdiskIdHasBeenSet = true;
261 m_ramdiskId = std::forward<RamdiskIdT>(value);
262 }
263 template <typename RamdiskIdT = Aws::String>
264 LaunchConfiguration& WithRamdiskId(RamdiskIdT&& value) {
265 SetRamdiskId(std::forward<RamdiskIdT>(value));
266 return *this;
267 }
269
271
278 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
279 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
280 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
281 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
282 m_blockDeviceMappingsHasBeenSet = true;
283 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
284 }
285 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
286 LaunchConfiguration& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) {
287 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
288 return *this;
289 }
290 template <typename BlockDeviceMappingsT = BlockDeviceMapping>
291 LaunchConfiguration& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) {
292 m_blockDeviceMappingsHasBeenSet = true;
293 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
294 return *this;
295 }
297
299
307 inline const InstanceMonitoring& GetInstanceMonitoring() const { return m_instanceMonitoring; }
308 inline bool InstanceMonitoringHasBeenSet() const { return m_instanceMonitoringHasBeenSet; }
309 template <typename InstanceMonitoringT = InstanceMonitoring>
310 void SetInstanceMonitoring(InstanceMonitoringT&& value) {
311 m_instanceMonitoringHasBeenSet = true;
312 m_instanceMonitoring = std::forward<InstanceMonitoringT>(value);
313 }
314 template <typename InstanceMonitoringT = InstanceMonitoring>
315 LaunchConfiguration& WithInstanceMonitoring(InstanceMonitoringT&& value) {
316 SetInstanceMonitoring(std::forward<InstanceMonitoringT>(value));
317 return *this;
318 }
320
322
330 inline const Aws::String& GetSpotPrice() const { return m_spotPrice; }
331 inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; }
332 template <typename SpotPriceT = Aws::String>
333 void SetSpotPrice(SpotPriceT&& value) {
334 m_spotPriceHasBeenSet = true;
335 m_spotPrice = std::forward<SpotPriceT>(value);
336 }
337 template <typename SpotPriceT = Aws::String>
338 LaunchConfiguration& WithSpotPrice(SpotPriceT&& value) {
339 SetSpotPrice(std::forward<SpotPriceT>(value));
340 return *this;
341 }
343
345
353 inline const Aws::String& GetIamInstanceProfile() const { return m_iamInstanceProfile; }
354 inline bool IamInstanceProfileHasBeenSet() const { return m_iamInstanceProfileHasBeenSet; }
355 template <typename IamInstanceProfileT = Aws::String>
356 void SetIamInstanceProfile(IamInstanceProfileT&& value) {
357 m_iamInstanceProfileHasBeenSet = true;
358 m_iamInstanceProfile = std::forward<IamInstanceProfileT>(value);
359 }
360 template <typename IamInstanceProfileT = Aws::String>
361 LaunchConfiguration& WithIamInstanceProfile(IamInstanceProfileT&& value) {
362 SetIamInstanceProfile(std::forward<IamInstanceProfileT>(value));
363 return *this;
364 }
366
368
371 inline const Aws::Utils::DateTime& GetCreatedTime() const { return m_createdTime; }
372 inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; }
373 template <typename CreatedTimeT = Aws::Utils::DateTime>
374 void SetCreatedTime(CreatedTimeT&& value) {
375 m_createdTimeHasBeenSet = true;
376 m_createdTime = std::forward<CreatedTimeT>(value);
377 }
378 template <typename CreatedTimeT = Aws::Utils::DateTime>
379 LaunchConfiguration& WithCreatedTime(CreatedTimeT&& value) {
380 SetCreatedTime(std::forward<CreatedTimeT>(value));
381 return *this;
382 }
384
386
392 inline bool GetEbsOptimized() const { return m_ebsOptimized; }
393 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
394 inline void SetEbsOptimized(bool value) {
395 m_ebsOptimizedHasBeenSet = true;
396 m_ebsOptimized = value;
397 }
399 SetEbsOptimized(value);
400 return *this;
401 }
403
405
416 inline bool GetAssociatePublicIpAddress() const { return m_associatePublicIpAddress; }
417 inline bool AssociatePublicIpAddressHasBeenSet() const { return m_associatePublicIpAddressHasBeenSet; }
418 inline void SetAssociatePublicIpAddress(bool value) {
419 m_associatePublicIpAddressHasBeenSet = true;
420 m_associatePublicIpAddress = value;
421 }
424 return *this;
425 }
427
429
434 inline const Aws::String& GetPlacementTenancy() const { return m_placementTenancy; }
435 inline bool PlacementTenancyHasBeenSet() const { return m_placementTenancyHasBeenSet; }
436 template <typename PlacementTenancyT = Aws::String>
437 void SetPlacementTenancy(PlacementTenancyT&& value) {
438 m_placementTenancyHasBeenSet = true;
439 m_placementTenancy = std::forward<PlacementTenancyT>(value);
440 }
441 template <typename PlacementTenancyT = Aws::String>
442 LaunchConfiguration& WithPlacementTenancy(PlacementTenancyT&& value) {
443 SetPlacementTenancy(std::forward<PlacementTenancyT>(value));
444 return *this;
445 }
447
449
455 inline const InstanceMetadataOptions& GetMetadataOptions() const { return m_metadataOptions; }
456 inline bool MetadataOptionsHasBeenSet() const { return m_metadataOptionsHasBeenSet; }
457 template <typename MetadataOptionsT = InstanceMetadataOptions>
458 void SetMetadataOptions(MetadataOptionsT&& value) {
459 m_metadataOptionsHasBeenSet = true;
460 m_metadataOptions = std::forward<MetadataOptionsT>(value);
461 }
462 template <typename MetadataOptionsT = InstanceMetadataOptions>
463 LaunchConfiguration& WithMetadataOptions(MetadataOptionsT&& value) {
464 SetMetadataOptions(std::forward<MetadataOptionsT>(value));
465 return *this;
466 }
468 private:
469 Aws::String m_launchConfigurationName;
470
471 Aws::String m_launchConfigurationARN;
472
473 Aws::String m_imageId;
474
475 Aws::String m_keyName;
476
477 Aws::Vector<Aws::String> m_securityGroups;
478
479 Aws::String m_classicLinkVPCId;
480
481 Aws::Vector<Aws::String> m_classicLinkVPCSecurityGroups;
482
483 Aws::String m_userData;
484
485 Aws::String m_instanceType;
486
487 Aws::String m_kernelId;
488
489 Aws::String m_ramdiskId;
490
491 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
492
493 InstanceMonitoring m_instanceMonitoring;
494
495 Aws::String m_spotPrice;
496
497 Aws::String m_iamInstanceProfile;
498
499 Aws::Utils::DateTime m_createdTime{};
500
501 bool m_ebsOptimized{false};
502
503 bool m_associatePublicIpAddress{false};
504
505 Aws::String m_placementTenancy;
506
507 InstanceMetadataOptions m_metadataOptions;
508 bool m_launchConfigurationNameHasBeenSet = false;
509 bool m_launchConfigurationARNHasBeenSet = false;
510 bool m_imageIdHasBeenSet = false;
511 bool m_keyNameHasBeenSet = false;
512 bool m_securityGroupsHasBeenSet = false;
513 bool m_classicLinkVPCIdHasBeenSet = false;
514 bool m_classicLinkVPCSecurityGroupsHasBeenSet = false;
515 bool m_userDataHasBeenSet = false;
516 bool m_instanceTypeHasBeenSet = false;
517 bool m_kernelIdHasBeenSet = false;
518 bool m_ramdiskIdHasBeenSet = false;
519 bool m_blockDeviceMappingsHasBeenSet = false;
520 bool m_instanceMonitoringHasBeenSet = false;
521 bool m_spotPriceHasBeenSet = false;
522 bool m_iamInstanceProfileHasBeenSet = false;
523 bool m_createdTimeHasBeenSet = false;
524 bool m_ebsOptimizedHasBeenSet = false;
525 bool m_associatePublicIpAddressHasBeenSet = false;
526 bool m_placementTenancyHasBeenSet = false;
527 bool m_metadataOptionsHasBeenSet = false;
528};
529
530} // namespace Model
531} // namespace AutoScaling
532} // namespace Aws
const Aws::Utils::DateTime & GetCreatedTime() const
LaunchConfiguration & WithMetadataOptions(MetadataOptionsT &&value)
LaunchConfiguration & AddClassicLinkVPCSecurityGroups(ClassicLinkVPCSecurityGroupsT &&value)
void SetClassicLinkVPCSecurityGroups(ClassicLinkVPCSecurityGroupsT &&value)
LaunchConfiguration & WithInstanceMonitoring(InstanceMonitoringT &&value)
LaunchConfiguration & WithKernelId(KernelIdT &&value)
LaunchConfiguration & WithKeyName(KeyNameT &&value)
void SetMetadataOptions(MetadataOptionsT &&value)
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
LaunchConfiguration & WithInstanceType(InstanceTypeT &&value)
const InstanceMonitoring & GetInstanceMonitoring() const
const Aws::String & GetLaunchConfigurationARN() const
void SetLaunchConfigurationName(LaunchConfigurationNameT &&value)
LaunchConfiguration & WithIamInstanceProfile(IamInstanceProfileT &&value)
LaunchConfiguration & WithLaunchConfigurationName(LaunchConfigurationNameT &&value)
LaunchConfiguration & WithImageId(ImageIdT &&value)
LaunchConfiguration & WithUserData(UserDataT &&value)
void SetLaunchConfigurationARN(LaunchConfigurationARNT &&value)
void SetBlockDeviceMappings(BlockDeviceMappingsT &&value)
void SetIamInstanceProfile(IamInstanceProfileT &&value)
LaunchConfiguration & AddSecurityGroups(SecurityGroupsT &&value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetPlacementTenancy(PlacementTenancyT &&value)
LaunchConfiguration & WithSecurityGroups(SecurityGroupsT &&value)
void SetClassicLinkVPCId(ClassicLinkVPCIdT &&value)
void SetInstanceMonitoring(InstanceMonitoringT &&value)
AWS_AUTOSCALING_API LaunchConfiguration & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetLaunchConfigurationName() const
LaunchConfiguration & WithAssociatePublicIpAddress(bool value)
LaunchConfiguration & WithLaunchConfigurationARN(LaunchConfigurationARNT &&value)
LaunchConfiguration & WithSpotPrice(SpotPriceT &&value)
const InstanceMetadataOptions & GetMetadataOptions() const
LaunchConfiguration & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
const Aws::Vector< Aws::String > & GetSecurityGroups() const
AWS_AUTOSCALING_API LaunchConfiguration()=default
LaunchConfiguration & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
const Aws::Vector< Aws::String > & GetClassicLinkVPCSecurityGroups() const
LaunchConfiguration & WithCreatedTime(CreatedTimeT &&value)
LaunchConfiguration & WithEbsOptimized(bool value)
LaunchConfiguration & WithPlacementTenancy(PlacementTenancyT &&value)
LaunchConfiguration & WithClassicLinkVPCSecurityGroups(ClassicLinkVPCSecurityGroupsT &&value)
LaunchConfiguration & WithClassicLinkVPCId(ClassicLinkVPCIdT &&value)
AWS_AUTOSCALING_API LaunchConfiguration(const Aws::Utils::Xml::XmlNode &xmlNode)
LaunchConfiguration & WithRamdiskId(RamdiskIdT &&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