AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
Instance.h
1
6#pragma once
7#include <aws/core/utils/DateTime.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/EC2_EXPORTS.h>
12#include <aws/ec2/model/ArchitectureValues.h>
13#include <aws/ec2/model/BootModeValues.h>
14#include <aws/ec2/model/CapacityReservationSpecificationResponse.h>
15#include <aws/ec2/model/CpuOptions.h>
16#include <aws/ec2/model/DeviceType.h>
17#include <aws/ec2/model/ElasticGpuAssociation.h>
18#include <aws/ec2/model/ElasticInferenceAcceleratorAssociation.h>
19#include <aws/ec2/model/EnclaveOptions.h>
20#include <aws/ec2/model/GroupIdentifier.h>
21#include <aws/ec2/model/HibernationOptions.h>
22#include <aws/ec2/model/HypervisorType.h>
23#include <aws/ec2/model/IamInstanceProfile.h>
24#include <aws/ec2/model/InstanceBlockDeviceMapping.h>
25#include <aws/ec2/model/InstanceBootModeValues.h>
26#include <aws/ec2/model/InstanceLifecycleType.h>
27#include <aws/ec2/model/InstanceMaintenanceOptions.h>
28#include <aws/ec2/model/InstanceMetadataOptionsResponse.h>
29#include <aws/ec2/model/InstanceNetworkInterface.h>
30#include <aws/ec2/model/InstanceNetworkPerformanceOptions.h>
31#include <aws/ec2/model/InstanceState.h>
32#include <aws/ec2/model/InstanceType.h>
33#include <aws/ec2/model/LicenseConfiguration.h>
34#include <aws/ec2/model/Monitoring.h>
35#include <aws/ec2/model/OperatorResponse.h>
36#include <aws/ec2/model/Placement.h>
37#include <aws/ec2/model/PlatformValues.h>
38#include <aws/ec2/model/PrivateDnsNameOptionsResponse.h>
39#include <aws/ec2/model/ProductCode.h>
40#include <aws/ec2/model/StateReason.h>
41#include <aws/ec2/model/Tag.h>
42#include <aws/ec2/model/VirtualizationType.h>
43
44#include <utility>
45
46namespace Aws {
47namespace Utils {
48namespace Xml {
49class XmlNode;
50} // namespace Xml
51} // namespace Utils
52namespace EC2 {
53namespace Model {
54
60class Instance {
61 public:
62 AWS_EC2_API Instance() = default;
63 AWS_EC2_API Instance(const Aws::Utils::Xml::XmlNode& xmlNode);
64 AWS_EC2_API Instance& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
65
66 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
67 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
68
70
73 inline ArchitectureValues GetArchitecture() const { return m_architecture; }
74 inline bool ArchitectureHasBeenSet() const { return m_architectureHasBeenSet; }
76 m_architectureHasBeenSet = true;
77 m_architecture = value;
78 }
80 SetArchitecture(value);
81 return *this;
82 }
84
86
89 inline const Aws::Vector<InstanceBlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
90 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
91 template <typename BlockDeviceMappingsT = Aws::Vector<InstanceBlockDeviceMapping>>
92 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
93 m_blockDeviceMappingsHasBeenSet = true;
94 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
95 }
96 template <typename BlockDeviceMappingsT = Aws::Vector<InstanceBlockDeviceMapping>>
97 Instance& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) {
98 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
99 return *this;
100 }
101 template <typename BlockDeviceMappingsT = InstanceBlockDeviceMapping>
102 Instance& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) {
103 m_blockDeviceMappingsHasBeenSet = true;
104 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
105 return *this;
106 }
108
110
114 inline const Aws::String& GetClientToken() const { return m_clientToken; }
115 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
116 template <typename ClientTokenT = Aws::String>
117 void SetClientToken(ClientTokenT&& value) {
118 m_clientTokenHasBeenSet = true;
119 m_clientToken = std::forward<ClientTokenT>(value);
120 }
121 template <typename ClientTokenT = Aws::String>
122 Instance& WithClientToken(ClientTokenT&& value) {
123 SetClientToken(std::forward<ClientTokenT>(value));
124 return *this;
125 }
127
129
136 inline bool GetEbsOptimized() const { return m_ebsOptimized; }
137 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
138 inline void SetEbsOptimized(bool value) {
139 m_ebsOptimizedHasBeenSet = true;
140 m_ebsOptimized = value;
141 }
142 inline Instance& WithEbsOptimized(bool value) {
143 SetEbsOptimized(value);
144 return *this;
145 }
147
149
152 inline bool GetEnaSupport() const { return m_enaSupport; }
153 inline bool EnaSupportHasBeenSet() const { return m_enaSupportHasBeenSet; }
154 inline void SetEnaSupport(bool value) {
155 m_enaSupportHasBeenSet = true;
156 m_enaSupport = value;
157 }
158 inline Instance& WithEnaSupport(bool value) {
159 SetEnaSupport(value);
160 return *this;
161 }
163
165
169 inline HypervisorType GetHypervisor() const { return m_hypervisor; }
170 inline bool HypervisorHasBeenSet() const { return m_hypervisorHasBeenSet; }
171 inline void SetHypervisor(HypervisorType value) {
172 m_hypervisorHasBeenSet = true;
173 m_hypervisor = value;
174 }
176 SetHypervisor(value);
177 return *this;
178 }
180
182
185 inline const IamInstanceProfile& GetIamInstanceProfile() const { return m_iamInstanceProfile; }
186 inline bool IamInstanceProfileHasBeenSet() const { return m_iamInstanceProfileHasBeenSet; }
187 template <typename IamInstanceProfileT = IamInstanceProfile>
188 void SetIamInstanceProfile(IamInstanceProfileT&& value) {
189 m_iamInstanceProfileHasBeenSet = true;
190 m_iamInstanceProfile = std::forward<IamInstanceProfileT>(value);
191 }
192 template <typename IamInstanceProfileT = IamInstanceProfile>
193 Instance& WithIamInstanceProfile(IamInstanceProfileT&& value) {
194 SetIamInstanceProfile(std::forward<IamInstanceProfileT>(value));
195 return *this;
196 }
198
200
203 inline InstanceLifecycleType GetInstanceLifecycle() const { return m_instanceLifecycle; }
204 inline bool InstanceLifecycleHasBeenSet() const { return m_instanceLifecycleHasBeenSet; }
206 m_instanceLifecycleHasBeenSet = true;
207 m_instanceLifecycle = value;
208 }
211 return *this;
212 }
214
216
220 inline const Aws::Vector<ElasticGpuAssociation>& GetElasticGpuAssociations() const { return m_elasticGpuAssociations; }
221 inline bool ElasticGpuAssociationsHasBeenSet() const { return m_elasticGpuAssociationsHasBeenSet; }
222 template <typename ElasticGpuAssociationsT = Aws::Vector<ElasticGpuAssociation>>
223 void SetElasticGpuAssociations(ElasticGpuAssociationsT&& value) {
224 m_elasticGpuAssociationsHasBeenSet = true;
225 m_elasticGpuAssociations = std::forward<ElasticGpuAssociationsT>(value);
226 }
227 template <typename ElasticGpuAssociationsT = Aws::Vector<ElasticGpuAssociation>>
228 Instance& WithElasticGpuAssociations(ElasticGpuAssociationsT&& value) {
229 SetElasticGpuAssociations(std::forward<ElasticGpuAssociationsT>(value));
230 return *this;
231 }
232 template <typename ElasticGpuAssociationsT = ElasticGpuAssociation>
233 Instance& AddElasticGpuAssociations(ElasticGpuAssociationsT&& value) {
234 m_elasticGpuAssociationsHasBeenSet = true;
235 m_elasticGpuAssociations.emplace_back(std::forward<ElasticGpuAssociationsT>(value));
236 return *this;
237 }
239
241
246 return m_elasticInferenceAcceleratorAssociations;
247 }
248 inline bool ElasticInferenceAcceleratorAssociationsHasBeenSet() const { return m_elasticInferenceAcceleratorAssociationsHasBeenSet; }
249 template <typename ElasticInferenceAcceleratorAssociationsT = Aws::Vector<ElasticInferenceAcceleratorAssociation>>
250 void SetElasticInferenceAcceleratorAssociations(ElasticInferenceAcceleratorAssociationsT&& value) {
251 m_elasticInferenceAcceleratorAssociationsHasBeenSet = true;
252 m_elasticInferenceAcceleratorAssociations = std::forward<ElasticInferenceAcceleratorAssociationsT>(value);
253 }
254 template <typename ElasticInferenceAcceleratorAssociationsT = Aws::Vector<ElasticInferenceAcceleratorAssociation>>
255 Instance& WithElasticInferenceAcceleratorAssociations(ElasticInferenceAcceleratorAssociationsT&& value) {
256 SetElasticInferenceAcceleratorAssociations(std::forward<ElasticInferenceAcceleratorAssociationsT>(value));
257 return *this;
258 }
259 template <typename ElasticInferenceAcceleratorAssociationsT = ElasticInferenceAcceleratorAssociation>
260 Instance& AddElasticInferenceAcceleratorAssociations(ElasticInferenceAcceleratorAssociationsT&& value) {
261 m_elasticInferenceAcceleratorAssociationsHasBeenSet = true;
262 m_elasticInferenceAcceleratorAssociations.emplace_back(std::forward<ElasticInferenceAcceleratorAssociationsT>(value));
263 return *this;
264 }
266
268
271 inline const Aws::Vector<InstanceNetworkInterface>& GetNetworkInterfaces() const { return m_networkInterfaces; }
272 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
273 template <typename NetworkInterfacesT = Aws::Vector<InstanceNetworkInterface>>
274 void SetNetworkInterfaces(NetworkInterfacesT&& value) {
275 m_networkInterfacesHasBeenSet = true;
276 m_networkInterfaces = std::forward<NetworkInterfacesT>(value);
277 }
278 template <typename NetworkInterfacesT = Aws::Vector<InstanceNetworkInterface>>
279 Instance& WithNetworkInterfaces(NetworkInterfacesT&& value) {
280 SetNetworkInterfaces(std::forward<NetworkInterfacesT>(value));
281 return *this;
282 }
283 template <typename NetworkInterfacesT = InstanceNetworkInterface>
284 Instance& AddNetworkInterfaces(NetworkInterfacesT&& value) {
285 m_networkInterfacesHasBeenSet = true;
286 m_networkInterfaces.emplace_back(std::forward<NetworkInterfacesT>(value));
287 return *this;
288 }
290
292
295 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
296 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
297 template <typename OutpostArnT = Aws::String>
298 void SetOutpostArn(OutpostArnT&& value) {
299 m_outpostArnHasBeenSet = true;
300 m_outpostArn = std::forward<OutpostArnT>(value);
301 }
302 template <typename OutpostArnT = Aws::String>
303 Instance& WithOutpostArn(OutpostArnT&& value) {
304 SetOutpostArn(std::forward<OutpostArnT>(value));
305 return *this;
306 }
308
310
314 inline const Aws::String& GetRootDeviceName() const { return m_rootDeviceName; }
315 inline bool RootDeviceNameHasBeenSet() const { return m_rootDeviceNameHasBeenSet; }
316 template <typename RootDeviceNameT = Aws::String>
317 void SetRootDeviceName(RootDeviceNameT&& value) {
318 m_rootDeviceNameHasBeenSet = true;
319 m_rootDeviceName = std::forward<RootDeviceNameT>(value);
320 }
321 template <typename RootDeviceNameT = Aws::String>
322 Instance& WithRootDeviceName(RootDeviceNameT&& value) {
323 SetRootDeviceName(std::forward<RootDeviceNameT>(value));
324 return *this;
325 }
327
329
333 inline DeviceType GetRootDeviceType() const { return m_rootDeviceType; }
334 inline bool RootDeviceTypeHasBeenSet() const { return m_rootDeviceTypeHasBeenSet; }
335 inline void SetRootDeviceType(DeviceType value) {
336 m_rootDeviceTypeHasBeenSet = true;
337 m_rootDeviceType = value;
338 }
340 SetRootDeviceType(value);
341 return *this;
342 }
344
346
349 inline const Aws::Vector<GroupIdentifier>& GetSecurityGroups() const { return m_securityGroups; }
350 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
351 template <typename SecurityGroupsT = Aws::Vector<GroupIdentifier>>
352 void SetSecurityGroups(SecurityGroupsT&& value) {
353 m_securityGroupsHasBeenSet = true;
354 m_securityGroups = std::forward<SecurityGroupsT>(value);
355 }
356 template <typename SecurityGroupsT = Aws::Vector<GroupIdentifier>>
357 Instance& WithSecurityGroups(SecurityGroupsT&& value) {
358 SetSecurityGroups(std::forward<SecurityGroupsT>(value));
359 return *this;
360 }
361 template <typename SecurityGroupsT = GroupIdentifier>
362 Instance& AddSecurityGroups(SecurityGroupsT&& value) {
363 m_securityGroupsHasBeenSet = true;
364 m_securityGroups.emplace_back(std::forward<SecurityGroupsT>(value));
365 return *this;
366 }
368
370
373 inline bool GetSourceDestCheck() const { return m_sourceDestCheck; }
374 inline bool SourceDestCheckHasBeenSet() const { return m_sourceDestCheckHasBeenSet; }
375 inline void SetSourceDestCheck(bool value) {
376 m_sourceDestCheckHasBeenSet = true;
377 m_sourceDestCheck = value;
378 }
379 inline Instance& WithSourceDestCheck(bool value) {
380 SetSourceDestCheck(value);
381 return *this;
382 }
384
386
389 inline const Aws::String& GetSpotInstanceRequestId() const { return m_spotInstanceRequestId; }
390 inline bool SpotInstanceRequestIdHasBeenSet() const { return m_spotInstanceRequestIdHasBeenSet; }
391 template <typename SpotInstanceRequestIdT = Aws::String>
392 void SetSpotInstanceRequestId(SpotInstanceRequestIdT&& value) {
393 m_spotInstanceRequestIdHasBeenSet = true;
394 m_spotInstanceRequestId = std::forward<SpotInstanceRequestIdT>(value);
395 }
396 template <typename SpotInstanceRequestIdT = Aws::String>
397 Instance& WithSpotInstanceRequestId(SpotInstanceRequestIdT&& value) {
398 SetSpotInstanceRequestId(std::forward<SpotInstanceRequestIdT>(value));
399 return *this;
400 }
402
404
408 inline const Aws::String& GetSriovNetSupport() const { return m_sriovNetSupport; }
409 inline bool SriovNetSupportHasBeenSet() const { return m_sriovNetSupportHasBeenSet; }
410 template <typename SriovNetSupportT = Aws::String>
411 void SetSriovNetSupport(SriovNetSupportT&& value) {
412 m_sriovNetSupportHasBeenSet = true;
413 m_sriovNetSupport = std::forward<SriovNetSupportT>(value);
414 }
415 template <typename SriovNetSupportT = Aws::String>
416 Instance& WithSriovNetSupport(SriovNetSupportT&& value) {
417 SetSriovNetSupport(std::forward<SriovNetSupportT>(value));
418 return *this;
419 }
421
423
426 inline const StateReason& GetStateReason() const { return m_stateReason; }
427 inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; }
428 template <typename StateReasonT = StateReason>
429 void SetStateReason(StateReasonT&& value) {
430 m_stateReasonHasBeenSet = true;
431 m_stateReason = std::forward<StateReasonT>(value);
432 }
433 template <typename StateReasonT = StateReason>
434 Instance& WithStateReason(StateReasonT&& value) {
435 SetStateReason(std::forward<StateReasonT>(value));
436 return *this;
437 }
439
441
444 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
445 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
446 template <typename TagsT = Aws::Vector<Tag>>
447 void SetTags(TagsT&& value) {
448 m_tagsHasBeenSet = true;
449 m_tags = std::forward<TagsT>(value);
450 }
451 template <typename TagsT = Aws::Vector<Tag>>
452 Instance& WithTags(TagsT&& value) {
453 SetTags(std::forward<TagsT>(value));
454 return *this;
455 }
456 template <typename TagsT = Tag>
457 Instance& AddTags(TagsT&& value) {
458 m_tagsHasBeenSet = true;
459 m_tags.emplace_back(std::forward<TagsT>(value));
460 return *this;
461 }
463
465
468 inline VirtualizationType GetVirtualizationType() const { return m_virtualizationType; }
469 inline bool VirtualizationTypeHasBeenSet() const { return m_virtualizationTypeHasBeenSet; }
471 m_virtualizationTypeHasBeenSet = true;
472 m_virtualizationType = value;
473 }
476 return *this;
477 }
479
481
484 inline const CpuOptions& GetCpuOptions() const { return m_cpuOptions; }
485 inline bool CpuOptionsHasBeenSet() const { return m_cpuOptionsHasBeenSet; }
486 template <typename CpuOptionsT = CpuOptions>
487 void SetCpuOptions(CpuOptionsT&& value) {
488 m_cpuOptionsHasBeenSet = true;
489 m_cpuOptions = std::forward<CpuOptionsT>(value);
490 }
491 template <typename CpuOptionsT = CpuOptions>
492 Instance& WithCpuOptions(CpuOptionsT&& value) {
493 SetCpuOptions(std::forward<CpuOptionsT>(value));
494 return *this;
495 }
497
499
504 inline const Aws::String& GetCapacityBlockId() const { return m_capacityBlockId; }
505 inline bool CapacityBlockIdHasBeenSet() const { return m_capacityBlockIdHasBeenSet; }
506 template <typename CapacityBlockIdT = Aws::String>
507 void SetCapacityBlockId(CapacityBlockIdT&& value) {
508 m_capacityBlockIdHasBeenSet = true;
509 m_capacityBlockId = std::forward<CapacityBlockIdT>(value);
510 }
511 template <typename CapacityBlockIdT = Aws::String>
512 Instance& WithCapacityBlockId(CapacityBlockIdT&& value) {
513 SetCapacityBlockId(std::forward<CapacityBlockIdT>(value));
514 return *this;
515 }
517
519
522 inline const Aws::String& GetCapacityReservationId() const { return m_capacityReservationId; }
523 inline bool CapacityReservationIdHasBeenSet() const { return m_capacityReservationIdHasBeenSet; }
524 template <typename CapacityReservationIdT = Aws::String>
525 void SetCapacityReservationId(CapacityReservationIdT&& value) {
526 m_capacityReservationIdHasBeenSet = true;
527 m_capacityReservationId = std::forward<CapacityReservationIdT>(value);
528 }
529 template <typename CapacityReservationIdT = Aws::String>
530 Instance& WithCapacityReservationId(CapacityReservationIdT&& value) {
531 SetCapacityReservationId(std::forward<CapacityReservationIdT>(value));
532 return *this;
533 }
535
537
541 return m_capacityReservationSpecification;
542 }
543 inline bool CapacityReservationSpecificationHasBeenSet() const { return m_capacityReservationSpecificationHasBeenSet; }
544 template <typename CapacityReservationSpecificationT = CapacityReservationSpecificationResponse>
545 void SetCapacityReservationSpecification(CapacityReservationSpecificationT&& value) {
546 m_capacityReservationSpecificationHasBeenSet = true;
547 m_capacityReservationSpecification = std::forward<CapacityReservationSpecificationT>(value);
548 }
549 template <typename CapacityReservationSpecificationT = CapacityReservationSpecificationResponse>
550 Instance& WithCapacityReservationSpecification(CapacityReservationSpecificationT&& value) {
551 SetCapacityReservationSpecification(std::forward<CapacityReservationSpecificationT>(value));
552 return *this;
553 }
555
557
560 inline const HibernationOptions& GetHibernationOptions() const { return m_hibernationOptions; }
561 inline bool HibernationOptionsHasBeenSet() const { return m_hibernationOptionsHasBeenSet; }
562 template <typename HibernationOptionsT = HibernationOptions>
563 void SetHibernationOptions(HibernationOptionsT&& value) {
564 m_hibernationOptionsHasBeenSet = true;
565 m_hibernationOptions = std::forward<HibernationOptionsT>(value);
566 }
567 template <typename HibernationOptionsT = HibernationOptions>
568 Instance& WithHibernationOptions(HibernationOptionsT&& value) {
569 SetHibernationOptions(std::forward<HibernationOptionsT>(value));
570 return *this;
571 }
573
575
578 inline const Aws::Vector<LicenseConfiguration>& GetLicenses() const { return m_licenses; }
579 inline bool LicensesHasBeenSet() const { return m_licensesHasBeenSet; }
580 template <typename LicensesT = Aws::Vector<LicenseConfiguration>>
581 void SetLicenses(LicensesT&& value) {
582 m_licensesHasBeenSet = true;
583 m_licenses = std::forward<LicensesT>(value);
584 }
585 template <typename LicensesT = Aws::Vector<LicenseConfiguration>>
586 Instance& WithLicenses(LicensesT&& value) {
587 SetLicenses(std::forward<LicensesT>(value));
588 return *this;
589 }
590 template <typename LicensesT = LicenseConfiguration>
591 Instance& AddLicenses(LicensesT&& value) {
592 m_licensesHasBeenSet = true;
593 m_licenses.emplace_back(std::forward<LicensesT>(value));
594 return *this;
595 }
597
599
602 inline const InstanceMetadataOptionsResponse& GetMetadataOptions() const { return m_metadataOptions; }
603 inline bool MetadataOptionsHasBeenSet() const { return m_metadataOptionsHasBeenSet; }
604 template <typename MetadataOptionsT = InstanceMetadataOptionsResponse>
605 void SetMetadataOptions(MetadataOptionsT&& value) {
606 m_metadataOptionsHasBeenSet = true;
607 m_metadataOptions = std::forward<MetadataOptionsT>(value);
608 }
609 template <typename MetadataOptionsT = InstanceMetadataOptionsResponse>
610 Instance& WithMetadataOptions(MetadataOptionsT&& value) {
611 SetMetadataOptions(std::forward<MetadataOptionsT>(value));
612 return *this;
613 }
615
617
621 inline const EnclaveOptions& GetEnclaveOptions() const { return m_enclaveOptions; }
622 inline bool EnclaveOptionsHasBeenSet() const { return m_enclaveOptionsHasBeenSet; }
623 template <typename EnclaveOptionsT = EnclaveOptions>
624 void SetEnclaveOptions(EnclaveOptionsT&& value) {
625 m_enclaveOptionsHasBeenSet = true;
626 m_enclaveOptions = std::forward<EnclaveOptionsT>(value);
627 }
628 template <typename EnclaveOptionsT = EnclaveOptions>
629 Instance& WithEnclaveOptions(EnclaveOptionsT&& value) {
630 SetEnclaveOptions(std::forward<EnclaveOptionsT>(value));
631 return *this;
632 }
634
636
646 inline BootModeValues GetBootMode() const { return m_bootMode; }
647 inline bool BootModeHasBeenSet() const { return m_bootModeHasBeenSet; }
648 inline void SetBootMode(BootModeValues value) {
649 m_bootModeHasBeenSet = true;
650 m_bootMode = value;
651 }
653 SetBootMode(value);
654 return *this;
655 }
657
659
664 inline const Aws::String& GetPlatformDetails() const { return m_platformDetails; }
665 inline bool PlatformDetailsHasBeenSet() const { return m_platformDetailsHasBeenSet; }
666 template <typename PlatformDetailsT = Aws::String>
667 void SetPlatformDetails(PlatformDetailsT&& value) {
668 m_platformDetailsHasBeenSet = true;
669 m_platformDetails = std::forward<PlatformDetailsT>(value);
670 }
671 template <typename PlatformDetailsT = Aws::String>
672 Instance& WithPlatformDetails(PlatformDetailsT&& value) {
673 SetPlatformDetails(std::forward<PlatformDetailsT>(value));
674 return *this;
675 }
677
679
684 inline const Aws::String& GetUsageOperation() const { return m_usageOperation; }
685 inline bool UsageOperationHasBeenSet() const { return m_usageOperationHasBeenSet; }
686 template <typename UsageOperationT = Aws::String>
687 void SetUsageOperation(UsageOperationT&& value) {
688 m_usageOperationHasBeenSet = true;
689 m_usageOperation = std::forward<UsageOperationT>(value);
690 }
691 template <typename UsageOperationT = Aws::String>
692 Instance& WithUsageOperation(UsageOperationT&& value) {
693 SetUsageOperation(std::forward<UsageOperationT>(value));
694 return *this;
695 }
697
699
702 inline const Aws::Utils::DateTime& GetUsageOperationUpdateTime() const { return m_usageOperationUpdateTime; }
703 inline bool UsageOperationUpdateTimeHasBeenSet() const { return m_usageOperationUpdateTimeHasBeenSet; }
704 template <typename UsageOperationUpdateTimeT = Aws::Utils::DateTime>
705 void SetUsageOperationUpdateTime(UsageOperationUpdateTimeT&& value) {
706 m_usageOperationUpdateTimeHasBeenSet = true;
707 m_usageOperationUpdateTime = std::forward<UsageOperationUpdateTimeT>(value);
708 }
709 template <typename UsageOperationUpdateTimeT = Aws::Utils::DateTime>
710 Instance& WithUsageOperationUpdateTime(UsageOperationUpdateTimeT&& value) {
711 SetUsageOperationUpdateTime(std::forward<UsageOperationUpdateTimeT>(value));
712 return *this;
713 }
715
717
720 inline const PrivateDnsNameOptionsResponse& GetPrivateDnsNameOptions() const { return m_privateDnsNameOptions; }
721 inline bool PrivateDnsNameOptionsHasBeenSet() const { return m_privateDnsNameOptionsHasBeenSet; }
722 template <typename PrivateDnsNameOptionsT = PrivateDnsNameOptionsResponse>
723 void SetPrivateDnsNameOptions(PrivateDnsNameOptionsT&& value) {
724 m_privateDnsNameOptionsHasBeenSet = true;
725 m_privateDnsNameOptions = std::forward<PrivateDnsNameOptionsT>(value);
726 }
727 template <typename PrivateDnsNameOptionsT = PrivateDnsNameOptionsResponse>
728 Instance& WithPrivateDnsNameOptions(PrivateDnsNameOptionsT&& value) {
729 SetPrivateDnsNameOptions(std::forward<PrivateDnsNameOptionsT>(value));
730 return *this;
731 }
733
735
738 inline const Aws::String& GetIpv6Address() const { return m_ipv6Address; }
739 inline bool Ipv6AddressHasBeenSet() const { return m_ipv6AddressHasBeenSet; }
740 template <typename Ipv6AddressT = Aws::String>
741 void SetIpv6Address(Ipv6AddressT&& value) {
742 m_ipv6AddressHasBeenSet = true;
743 m_ipv6Address = std::forward<Ipv6AddressT>(value);
744 }
745 template <typename Ipv6AddressT = Aws::String>
746 Instance& WithIpv6Address(Ipv6AddressT&& value) {
747 SetIpv6Address(std::forward<Ipv6AddressT>(value));
748 return *this;
749 }
751
753
759 inline const Aws::String& GetTpmSupport() const { return m_tpmSupport; }
760 inline bool TpmSupportHasBeenSet() const { return m_tpmSupportHasBeenSet; }
761 template <typename TpmSupportT = Aws::String>
762 void SetTpmSupport(TpmSupportT&& value) {
763 m_tpmSupportHasBeenSet = true;
764 m_tpmSupport = std::forward<TpmSupportT>(value);
765 }
766 template <typename TpmSupportT = Aws::String>
767 Instance& WithTpmSupport(TpmSupportT&& value) {
768 SetTpmSupport(std::forward<TpmSupportT>(value));
769 return *this;
770 }
772
774
778 inline const InstanceMaintenanceOptions& GetMaintenanceOptions() const { return m_maintenanceOptions; }
779 inline bool MaintenanceOptionsHasBeenSet() const { return m_maintenanceOptionsHasBeenSet; }
780 template <typename MaintenanceOptionsT = InstanceMaintenanceOptions>
781 void SetMaintenanceOptions(MaintenanceOptionsT&& value) {
782 m_maintenanceOptionsHasBeenSet = true;
783 m_maintenanceOptions = std::forward<MaintenanceOptionsT>(value);
784 }
785 template <typename MaintenanceOptionsT = InstanceMaintenanceOptions>
786 Instance& WithMaintenanceOptions(MaintenanceOptionsT&& value) {
787 SetMaintenanceOptions(std::forward<MaintenanceOptionsT>(value));
788 return *this;
789 }
791
793
799 inline InstanceBootModeValues GetCurrentInstanceBootMode() const { return m_currentInstanceBootMode; }
800 inline bool CurrentInstanceBootModeHasBeenSet() const { return m_currentInstanceBootModeHasBeenSet; }
802 m_currentInstanceBootModeHasBeenSet = true;
803 m_currentInstanceBootMode = value;
804 }
807 return *this;
808 }
810
812
815 inline const InstanceNetworkPerformanceOptions& GetNetworkPerformanceOptions() const { return m_networkPerformanceOptions; }
816 inline bool NetworkPerformanceOptionsHasBeenSet() const { return m_networkPerformanceOptionsHasBeenSet; }
817 template <typename NetworkPerformanceOptionsT = InstanceNetworkPerformanceOptions>
818 void SetNetworkPerformanceOptions(NetworkPerformanceOptionsT&& value) {
819 m_networkPerformanceOptionsHasBeenSet = true;
820 m_networkPerformanceOptions = std::forward<NetworkPerformanceOptionsT>(value);
821 }
822 template <typename NetworkPerformanceOptionsT = InstanceNetworkPerformanceOptions>
823 Instance& WithNetworkPerformanceOptions(NetworkPerformanceOptionsT&& value) {
824 SetNetworkPerformanceOptions(std::forward<NetworkPerformanceOptionsT>(value));
825 return *this;
826 }
828
830
833 inline const OperatorResponse& GetOperator() const { return m_operator; }
834 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
835 template <typename OperatorT = OperatorResponse>
836 void SetOperator(OperatorT&& value) {
837 m_operatorHasBeenSet = true;
838 m_operator = std::forward<OperatorT>(value);
839 }
840 template <typename OperatorT = OperatorResponse>
841 Instance& WithOperator(OperatorT&& value) {
842 SetOperator(std::forward<OperatorT>(value));
843 return *this;
844 }
846
848
851 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
852 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
853 template <typename InstanceIdT = Aws::String>
854 void SetInstanceId(InstanceIdT&& value) {
855 m_instanceIdHasBeenSet = true;
856 m_instanceId = std::forward<InstanceIdT>(value);
857 }
858 template <typename InstanceIdT = Aws::String>
859 Instance& WithInstanceId(InstanceIdT&& value) {
860 SetInstanceId(std::forward<InstanceIdT>(value));
861 return *this;
862 }
864
866
869 inline const Aws::String& GetImageId() const { return m_imageId; }
870 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
871 template <typename ImageIdT = Aws::String>
872 void SetImageId(ImageIdT&& value) {
873 m_imageIdHasBeenSet = true;
874 m_imageId = std::forward<ImageIdT>(value);
875 }
876 template <typename ImageIdT = Aws::String>
877 Instance& WithImageId(ImageIdT&& value) {
878 SetImageId(std::forward<ImageIdT>(value));
879 return *this;
880 }
882
884
887 inline const InstanceState& GetState() const { return m_state; }
888 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
889 template <typename StateT = InstanceState>
890 void SetState(StateT&& value) {
891 m_stateHasBeenSet = true;
892 m_state = std::forward<StateT>(value);
893 }
894 template <typename StateT = InstanceState>
895 Instance& WithState(StateT&& value) {
896 SetState(std::forward<StateT>(value));
897 return *this;
898 }
900
902
911 inline const Aws::String& GetPrivateDnsName() const { return m_privateDnsName; }
912 inline bool PrivateDnsNameHasBeenSet() const { return m_privateDnsNameHasBeenSet; }
913 template <typename PrivateDnsNameT = Aws::String>
914 void SetPrivateDnsName(PrivateDnsNameT&& value) {
915 m_privateDnsNameHasBeenSet = true;
916 m_privateDnsName = std::forward<PrivateDnsNameT>(value);
917 }
918 template <typename PrivateDnsNameT = Aws::String>
919 Instance& WithPrivateDnsName(PrivateDnsNameT&& value) {
920 SetPrivateDnsName(std::forward<PrivateDnsNameT>(value));
921 return *this;
922 }
924
926
934 inline const Aws::String& GetPublicDnsName() const { return m_publicDnsName; }
935 inline bool PublicDnsNameHasBeenSet() const { return m_publicDnsNameHasBeenSet; }
936 template <typename PublicDnsNameT = Aws::String>
937 void SetPublicDnsName(PublicDnsNameT&& value) {
938 m_publicDnsNameHasBeenSet = true;
939 m_publicDnsName = std::forward<PublicDnsNameT>(value);
940 }
941 template <typename PublicDnsNameT = Aws::String>
942 Instance& WithPublicDnsName(PublicDnsNameT&& value) {
943 SetPublicDnsName(std::forward<PublicDnsNameT>(value));
944 return *this;
945 }
947
949
953 inline const Aws::String& GetStateTransitionReason() const { return m_stateTransitionReason; }
954 inline bool StateTransitionReasonHasBeenSet() const { return m_stateTransitionReasonHasBeenSet; }
955 template <typename StateTransitionReasonT = Aws::String>
956 void SetStateTransitionReason(StateTransitionReasonT&& value) {
957 m_stateTransitionReasonHasBeenSet = true;
958 m_stateTransitionReason = std::forward<StateTransitionReasonT>(value);
959 }
960 template <typename StateTransitionReasonT = Aws::String>
961 Instance& WithStateTransitionReason(StateTransitionReasonT&& value) {
962 SetStateTransitionReason(std::forward<StateTransitionReasonT>(value));
963 return *this;
964 }
966
968
972 inline const Aws::String& GetKeyName() const { return m_keyName; }
973 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
974 template <typename KeyNameT = Aws::String>
975 void SetKeyName(KeyNameT&& value) {
976 m_keyNameHasBeenSet = true;
977 m_keyName = std::forward<KeyNameT>(value);
978 }
979 template <typename KeyNameT = Aws::String>
980 Instance& WithKeyName(KeyNameT&& value) {
981 SetKeyName(std::forward<KeyNameT>(value));
982 return *this;
983 }
985
987
991 inline int GetAmiLaunchIndex() const { return m_amiLaunchIndex; }
992 inline bool AmiLaunchIndexHasBeenSet() const { return m_amiLaunchIndexHasBeenSet; }
993 inline void SetAmiLaunchIndex(int value) {
994 m_amiLaunchIndexHasBeenSet = true;
995 m_amiLaunchIndex = value;
996 }
997 inline Instance& WithAmiLaunchIndex(int value) {
998 SetAmiLaunchIndex(value);
999 return *this;
1000 }
1002
1004
1007 inline const Aws::Vector<ProductCode>& GetProductCodes() const { return m_productCodes; }
1008 inline bool ProductCodesHasBeenSet() const { return m_productCodesHasBeenSet; }
1009 template <typename ProductCodesT = Aws::Vector<ProductCode>>
1010 void SetProductCodes(ProductCodesT&& value) {
1011 m_productCodesHasBeenSet = true;
1012 m_productCodes = std::forward<ProductCodesT>(value);
1013 }
1014 template <typename ProductCodesT = Aws::Vector<ProductCode>>
1015 Instance& WithProductCodes(ProductCodesT&& value) {
1016 SetProductCodes(std::forward<ProductCodesT>(value));
1017 return *this;
1018 }
1019 template <typename ProductCodesT = ProductCode>
1020 Instance& AddProductCodes(ProductCodesT&& value) {
1021 m_productCodesHasBeenSet = true;
1022 m_productCodes.emplace_back(std::forward<ProductCodesT>(value));
1023 return *this;
1024 }
1026
1028
1031 inline InstanceType GetInstanceType() const { return m_instanceType; }
1032 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
1033 inline void SetInstanceType(InstanceType value) {
1034 m_instanceTypeHasBeenSet = true;
1035 m_instanceType = value;
1036 }
1038 SetInstanceType(value);
1039 return *this;
1040 }
1042
1044
1049 inline const Aws::Utils::DateTime& GetLaunchTime() const { return m_launchTime; }
1050 inline bool LaunchTimeHasBeenSet() const { return m_launchTimeHasBeenSet; }
1051 template <typename LaunchTimeT = Aws::Utils::DateTime>
1052 void SetLaunchTime(LaunchTimeT&& value) {
1053 m_launchTimeHasBeenSet = true;
1054 m_launchTime = std::forward<LaunchTimeT>(value);
1055 }
1056 template <typename LaunchTimeT = Aws::Utils::DateTime>
1057 Instance& WithLaunchTime(LaunchTimeT&& value) {
1058 SetLaunchTime(std::forward<LaunchTimeT>(value));
1059 return *this;
1060 }
1062
1064
1067 inline const Placement& GetPlacement() const { return m_placement; }
1068 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
1069 template <typename PlacementT = Placement>
1070 void SetPlacement(PlacementT&& value) {
1071 m_placementHasBeenSet = true;
1072 m_placement = std::forward<PlacementT>(value);
1073 }
1074 template <typename PlacementT = Placement>
1075 Instance& WithPlacement(PlacementT&& value) {
1076 SetPlacement(std::forward<PlacementT>(value));
1077 return *this;
1078 }
1080
1082
1085 inline const Aws::String& GetKernelId() const { return m_kernelId; }
1086 inline bool KernelIdHasBeenSet() const { return m_kernelIdHasBeenSet; }
1087 template <typename KernelIdT = Aws::String>
1088 void SetKernelId(KernelIdT&& value) {
1089 m_kernelIdHasBeenSet = true;
1090 m_kernelId = std::forward<KernelIdT>(value);
1091 }
1092 template <typename KernelIdT = Aws::String>
1093 Instance& WithKernelId(KernelIdT&& value) {
1094 SetKernelId(std::forward<KernelIdT>(value));
1095 return *this;
1096 }
1098
1100
1103 inline const Aws::String& GetRamdiskId() const { return m_ramdiskId; }
1104 inline bool RamdiskIdHasBeenSet() const { return m_ramdiskIdHasBeenSet; }
1105 template <typename RamdiskIdT = Aws::String>
1106 void SetRamdiskId(RamdiskIdT&& value) {
1107 m_ramdiskIdHasBeenSet = true;
1108 m_ramdiskId = std::forward<RamdiskIdT>(value);
1109 }
1110 template <typename RamdiskIdT = Aws::String>
1111 Instance& WithRamdiskId(RamdiskIdT&& value) {
1112 SetRamdiskId(std::forward<RamdiskIdT>(value));
1113 return *this;
1114 }
1116
1118
1122 inline PlatformValues GetPlatform() const { return m_platform; }
1123 inline bool PlatformHasBeenSet() const { return m_platformHasBeenSet; }
1124 inline void SetPlatform(PlatformValues value) {
1125 m_platformHasBeenSet = true;
1126 m_platform = value;
1127 }
1129 SetPlatform(value);
1130 return *this;
1131 }
1133
1135
1138 inline const Monitoring& GetMonitoring() const { return m_monitoring; }
1139 inline bool MonitoringHasBeenSet() const { return m_monitoringHasBeenSet; }
1140 template <typename MonitoringT = Monitoring>
1141 void SetMonitoring(MonitoringT&& value) {
1142 m_monitoringHasBeenSet = true;
1143 m_monitoring = std::forward<MonitoringT>(value);
1144 }
1145 template <typename MonitoringT = Monitoring>
1146 Instance& WithMonitoring(MonitoringT&& value) {
1147 SetMonitoring(std::forward<MonitoringT>(value));
1148 return *this;
1149 }
1151
1153
1156 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
1157 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
1158 template <typename SubnetIdT = Aws::String>
1159 void SetSubnetId(SubnetIdT&& value) {
1160 m_subnetIdHasBeenSet = true;
1161 m_subnetId = std::forward<SubnetIdT>(value);
1162 }
1163 template <typename SubnetIdT = Aws::String>
1164 Instance& WithSubnetId(SubnetIdT&& value) {
1165 SetSubnetId(std::forward<SubnetIdT>(value));
1166 return *this;
1167 }
1169
1171
1174 inline const Aws::String& GetVpcId() const { return m_vpcId; }
1175 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
1176 template <typename VpcIdT = Aws::String>
1177 void SetVpcId(VpcIdT&& value) {
1178 m_vpcIdHasBeenSet = true;
1179 m_vpcId = std::forward<VpcIdT>(value);
1180 }
1181 template <typename VpcIdT = Aws::String>
1182 Instance& WithVpcId(VpcIdT&& value) {
1183 SetVpcId(std::forward<VpcIdT>(value));
1184 return *this;
1185 }
1187
1189
1192 inline const Aws::String& GetPrivateIpAddress() const { return m_privateIpAddress; }
1193 inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; }
1194 template <typename PrivateIpAddressT = Aws::String>
1195 void SetPrivateIpAddress(PrivateIpAddressT&& value) {
1196 m_privateIpAddressHasBeenSet = true;
1197 m_privateIpAddress = std::forward<PrivateIpAddressT>(value);
1198 }
1199 template <typename PrivateIpAddressT = Aws::String>
1200 Instance& WithPrivateIpAddress(PrivateIpAddressT&& value) {
1201 SetPrivateIpAddress(std::forward<PrivateIpAddressT>(value));
1202 return *this;
1203 }
1205
1207
1212 inline const Aws::String& GetPublicIpAddress() const { return m_publicIpAddress; }
1213 inline bool PublicIpAddressHasBeenSet() const { return m_publicIpAddressHasBeenSet; }
1214 template <typename PublicIpAddressT = Aws::String>
1215 void SetPublicIpAddress(PublicIpAddressT&& value) {
1216 m_publicIpAddressHasBeenSet = true;
1217 m_publicIpAddress = std::forward<PublicIpAddressT>(value);
1218 }
1219 template <typename PublicIpAddressT = Aws::String>
1220 Instance& WithPublicIpAddress(PublicIpAddressT&& value) {
1221 SetPublicIpAddress(std::forward<PublicIpAddressT>(value));
1222 return *this;
1223 }
1225 private:
1227
1228 Aws::Vector<InstanceBlockDeviceMapping> m_blockDeviceMappings;
1229
1230 Aws::String m_clientToken;
1231
1232 bool m_ebsOptimized{false};
1233
1234 bool m_enaSupport{false};
1235
1237
1238 IamInstanceProfile m_iamInstanceProfile;
1239
1241
1242 Aws::Vector<ElasticGpuAssociation> m_elasticGpuAssociations;
1243
1244 Aws::Vector<ElasticInferenceAcceleratorAssociation> m_elasticInferenceAcceleratorAssociations;
1245
1246 Aws::Vector<InstanceNetworkInterface> m_networkInterfaces;
1247
1248 Aws::String m_outpostArn;
1249
1250 Aws::String m_rootDeviceName;
1251
1252 DeviceType m_rootDeviceType{DeviceType::NOT_SET};
1253
1254 Aws::Vector<GroupIdentifier> m_securityGroups;
1255
1256 bool m_sourceDestCheck{false};
1257
1258 Aws::String m_spotInstanceRequestId;
1259
1260 Aws::String m_sriovNetSupport;
1261
1262 StateReason m_stateReason;
1263
1264 Aws::Vector<Tag> m_tags;
1265
1266 VirtualizationType m_virtualizationType{VirtualizationType::NOT_SET};
1267
1268 CpuOptions m_cpuOptions;
1269
1270 Aws::String m_capacityBlockId;
1271
1272 Aws::String m_capacityReservationId;
1273
1274 CapacityReservationSpecificationResponse m_capacityReservationSpecification;
1275
1276 HibernationOptions m_hibernationOptions;
1277
1279
1280 InstanceMetadataOptionsResponse m_metadataOptions;
1281
1282 EnclaveOptions m_enclaveOptions;
1283
1285
1286 Aws::String m_platformDetails;
1287
1288 Aws::String m_usageOperation;
1289
1290 Aws::Utils::DateTime m_usageOperationUpdateTime{};
1291
1292 PrivateDnsNameOptionsResponse m_privateDnsNameOptions;
1293
1294 Aws::String m_ipv6Address;
1295
1296 Aws::String m_tpmSupport;
1297
1298 InstanceMaintenanceOptions m_maintenanceOptions;
1299
1301
1302 InstanceNetworkPerformanceOptions m_networkPerformanceOptions;
1303
1304 OperatorResponse m_operator;
1305
1306 Aws::String m_instanceId;
1307
1308 Aws::String m_imageId;
1309
1310 InstanceState m_state;
1311
1312 Aws::String m_privateDnsName;
1313
1314 Aws::String m_publicDnsName;
1315
1316 Aws::String m_stateTransitionReason;
1317
1318 Aws::String m_keyName;
1319
1320 int m_amiLaunchIndex{0};
1321
1322 Aws::Vector<ProductCode> m_productCodes;
1323
1324 InstanceType m_instanceType{InstanceType::NOT_SET};
1325
1326 Aws::Utils::DateTime m_launchTime{};
1327
1328 Placement m_placement;
1329
1330 Aws::String m_kernelId;
1331
1332 Aws::String m_ramdiskId;
1333
1335
1336 Monitoring m_monitoring;
1337
1338 Aws::String m_subnetId;
1339
1340 Aws::String m_vpcId;
1341
1342 Aws::String m_privateIpAddress;
1343
1344 Aws::String m_publicIpAddress;
1345 bool m_architectureHasBeenSet = false;
1346 bool m_blockDeviceMappingsHasBeenSet = false;
1347 bool m_clientTokenHasBeenSet = false;
1348 bool m_ebsOptimizedHasBeenSet = false;
1349 bool m_enaSupportHasBeenSet = false;
1350 bool m_hypervisorHasBeenSet = false;
1351 bool m_iamInstanceProfileHasBeenSet = false;
1352 bool m_instanceLifecycleHasBeenSet = false;
1353 bool m_elasticGpuAssociationsHasBeenSet = false;
1354 bool m_elasticInferenceAcceleratorAssociationsHasBeenSet = false;
1355 bool m_networkInterfacesHasBeenSet = false;
1356 bool m_outpostArnHasBeenSet = false;
1357 bool m_rootDeviceNameHasBeenSet = false;
1358 bool m_rootDeviceTypeHasBeenSet = false;
1359 bool m_securityGroupsHasBeenSet = false;
1360 bool m_sourceDestCheckHasBeenSet = false;
1361 bool m_spotInstanceRequestIdHasBeenSet = false;
1362 bool m_sriovNetSupportHasBeenSet = false;
1363 bool m_stateReasonHasBeenSet = false;
1364 bool m_tagsHasBeenSet = false;
1365 bool m_virtualizationTypeHasBeenSet = false;
1366 bool m_cpuOptionsHasBeenSet = false;
1367 bool m_capacityBlockIdHasBeenSet = false;
1368 bool m_capacityReservationIdHasBeenSet = false;
1369 bool m_capacityReservationSpecificationHasBeenSet = false;
1370 bool m_hibernationOptionsHasBeenSet = false;
1371 bool m_licensesHasBeenSet = false;
1372 bool m_metadataOptionsHasBeenSet = false;
1373 bool m_enclaveOptionsHasBeenSet = false;
1374 bool m_bootModeHasBeenSet = false;
1375 bool m_platformDetailsHasBeenSet = false;
1376 bool m_usageOperationHasBeenSet = false;
1377 bool m_usageOperationUpdateTimeHasBeenSet = false;
1378 bool m_privateDnsNameOptionsHasBeenSet = false;
1379 bool m_ipv6AddressHasBeenSet = false;
1380 bool m_tpmSupportHasBeenSet = false;
1381 bool m_maintenanceOptionsHasBeenSet = false;
1382 bool m_currentInstanceBootModeHasBeenSet = false;
1383 bool m_networkPerformanceOptionsHasBeenSet = false;
1384 bool m_operatorHasBeenSet = false;
1385 bool m_instanceIdHasBeenSet = false;
1386 bool m_imageIdHasBeenSet = false;
1387 bool m_stateHasBeenSet = false;
1388 bool m_privateDnsNameHasBeenSet = false;
1389 bool m_publicDnsNameHasBeenSet = false;
1390 bool m_stateTransitionReasonHasBeenSet = false;
1391 bool m_keyNameHasBeenSet = false;
1392 bool m_amiLaunchIndexHasBeenSet = false;
1393 bool m_productCodesHasBeenSet = false;
1394 bool m_instanceTypeHasBeenSet = false;
1395 bool m_launchTimeHasBeenSet = false;
1396 bool m_placementHasBeenSet = false;
1397 bool m_kernelIdHasBeenSet = false;
1398 bool m_ramdiskIdHasBeenSet = false;
1399 bool m_platformHasBeenSet = false;
1400 bool m_monitoringHasBeenSet = false;
1401 bool m_subnetIdHasBeenSet = false;
1402 bool m_vpcIdHasBeenSet = false;
1403 bool m_privateIpAddressHasBeenSet = false;
1404 bool m_publicIpAddressHasBeenSet = false;
1405};
1406
1407} // namespace Model
1408} // namespace EC2
1409} // namespace Aws
void SetStateTransitionReason(StateTransitionReasonT &&value)
Definition Instance.h:956
const Aws::Vector< InstanceBlockDeviceMapping > & GetBlockDeviceMappings() const
Definition Instance.h:89
Instance & WithVirtualizationType(VirtualizationType value)
Definition Instance.h:474
bool StateTransitionReasonHasBeenSet() const
Definition Instance.h:954
void SetProductCodes(ProductCodesT &&value)
Definition Instance.h:1010
const Aws::String & GetCapacityBlockId() const
Definition Instance.h:504
ArchitectureValues GetArchitecture() const
Definition Instance.h:73
Instance & WithTags(TagsT &&value)
Definition Instance.h:452
Instance & WithPrivateDnsName(PrivateDnsNameT &&value)
Definition Instance.h:919
bool RootDeviceNameHasBeenSet() const
Definition Instance.h:315
Instance & WithClientToken(ClientTokenT &&value)
Definition Instance.h:122
bool PrivateDnsNameOptionsHasBeenSet() const
Definition Instance.h:721
const InstanceState & GetState() const
Definition Instance.h:887
void SetLicenses(LicensesT &&value)
Definition Instance.h:581
void SetState(StateT &&value)
Definition Instance.h:890
void SetPlatformDetails(PlatformDetailsT &&value)
Definition Instance.h:667
Instance & WithProductCodes(ProductCodesT &&value)
Definition Instance.h:1015
Instance & WithLaunchTime(LaunchTimeT &&value)
Definition Instance.h:1057
Instance & WithCapacityBlockId(CapacityBlockIdT &&value)
Definition Instance.h:512
bool ElasticInferenceAcceleratorAssociationsHasBeenSet() const
Definition Instance.h:248
Instance & WithMetadataOptions(MetadataOptionsT &&value)
Definition Instance.h:610
Instance & AddTags(TagsT &&value)
Definition Instance.h:457
bool BlockDeviceMappingsHasBeenSet() const
Definition Instance.h:90
Instance & WithVpcId(VpcIdT &&value)
Definition Instance.h:1182
void SetClientToken(ClientTokenT &&value)
Definition Instance.h:117
bool GetEnaSupport() const
Definition Instance.h:152
const Aws::String & GetKeyName() const
Definition Instance.h:972
void SetOperator(OperatorT &&value)
Definition Instance.h:836
const Aws::String & GetIpv6Address() const
Definition Instance.h:738
void SetBootMode(BootModeValues value)
Definition Instance.h:648
bool LicensesHasBeenSet() const
Definition Instance.h:579
Instance & WithLicenses(LicensesT &&value)
Definition Instance.h:586
Instance & WithCpuOptions(CpuOptionsT &&value)
Definition Instance.h:492
HypervisorType GetHypervisor() const
Definition Instance.h:169
bool CapacityBlockIdHasBeenSet() const
Definition Instance.h:505
bool Ipv6AddressHasBeenSet() const
Definition Instance.h:739
bool HibernationOptionsHasBeenSet() const
Definition Instance.h:561
VirtualizationType GetVirtualizationType() const
Definition Instance.h:468
AWS_EC2_API Instance()=default
Instance & AddElasticGpuAssociations(ElasticGpuAssociationsT &&value)
Definition Instance.h:233
bool KeyNameHasBeenSet() const
Definition Instance.h:973
bool PlatformDetailsHasBeenSet() const
Definition Instance.h:665
const Aws::Vector< LicenseConfiguration > & GetLicenses() const
Definition Instance.h:578
void SetEnaSupport(bool value)
Definition Instance.h:154
Instance & AddProductCodes(ProductCodesT &&value)
Definition Instance.h:1020
const Aws::Vector< ProductCode > & GetProductCodes() const
Definition Instance.h:1007
const Aws::String & GetVpcId() const
Definition Instance.h:1174
PlatformValues GetPlatform() const
Definition Instance.h:1122
Instance & WithSourceDestCheck(bool value)
Definition Instance.h:379
bool CurrentInstanceBootModeHasBeenSet() const
Definition Instance.h:800
const Aws::Vector< ElasticGpuAssociation > & GetElasticGpuAssociations() const
Definition Instance.h:220
void SetInstanceType(InstanceType value)
Definition Instance.h:1033
Instance & WithRamdiskId(RamdiskIdT &&value)
Definition Instance.h:1111
void SetElasticInferenceAcceleratorAssociations(ElasticInferenceAcceleratorAssociationsT &&value)
Definition Instance.h:250
const OperatorResponse & GetOperator() const
Definition Instance.h:833
Instance & WithArchitecture(ArchitectureValues value)
Definition Instance.h:79
Instance & WithImageId(ImageIdT &&value)
Definition Instance.h:877
Instance & WithPrivateDnsNameOptions(PrivateDnsNameOptionsT &&value)
Definition Instance.h:728
bool EnaSupportHasBeenSet() const
Definition Instance.h:153
void SetUsageOperationUpdateTime(UsageOperationUpdateTimeT &&value)
Definition Instance.h:705
Instance & WithHibernationOptions(HibernationOptionsT &&value)
Definition Instance.h:568
const Aws::String & GetCapacityReservationId() const
Definition Instance.h:522
Instance & WithStateTransitionReason(StateTransitionReasonT &&value)
Definition Instance.h:961
const StateReason & GetStateReason() const
Definition Instance.h:426
const Aws::String & GetPrivateDnsName() const
Definition Instance.h:911
bool MonitoringHasBeenSet() const
Definition Instance.h:1139
Instance & WithSubnetId(SubnetIdT &&value)
Definition Instance.h:1164
bool AmiLaunchIndexHasBeenSet() const
Definition Instance.h:992
void SetKeyName(KeyNameT &&value)
Definition Instance.h:975
Instance & WithPublicDnsName(PublicDnsNameT &&value)
Definition Instance.h:942
Instance & WithCapacityReservationId(CapacityReservationIdT &&value)
Definition Instance.h:530
bool InstanceLifecycleHasBeenSet() const
Definition Instance.h:204
void SetRamdiskId(RamdiskIdT &&value)
Definition Instance.h:1106
bool PublicIpAddressHasBeenSet() const
Definition Instance.h:1213
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::String & GetPublicDnsName() const
Definition Instance.h:934
void SetMetadataOptions(MetadataOptionsT &&value)
Definition Instance.h:605
const Aws::Utils::DateTime & GetUsageOperationUpdateTime() const
Definition Instance.h:702
bool NetworkPerformanceOptionsHasBeenSet() const
Definition Instance.h:816
Instance & WithCurrentInstanceBootMode(InstanceBootModeValues value)
Definition Instance.h:805
const Aws::String & GetOutpostArn() const
Definition Instance.h:295
void SetPrivateDnsName(PrivateDnsNameT &&value)
Definition Instance.h:914
void SetOutpostArn(OutpostArnT &&value)
Definition Instance.h:298
Instance & WithMonitoring(MonitoringT &&value)
Definition Instance.h:1146
const Aws::String & GetPublicIpAddress() const
Definition Instance.h:1212
const Placement & GetPlacement() const
Definition Instance.h:1067
void SetPrivateDnsNameOptions(PrivateDnsNameOptionsT &&value)
Definition Instance.h:723
void SetImageId(ImageIdT &&value)
Definition Instance.h:872
Instance & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
Definition Instance.h:97
Instance & WithHypervisor(HypervisorType value)
Definition Instance.h:175
Instance & AddSecurityGroups(SecurityGroupsT &&value)
Definition Instance.h:362
bool SubnetIdHasBeenSet() const
Definition Instance.h:1157
const Aws::String & GetKernelId() const
Definition Instance.h:1085
Instance & AddElasticInferenceAcceleratorAssociations(ElasticInferenceAcceleratorAssociationsT &&value)
Definition Instance.h:260
Instance & WithBootMode(BootModeValues value)
Definition Instance.h:652
InstanceType GetInstanceType() const
Definition Instance.h:1031
void SetIamInstanceProfile(IamInstanceProfileT &&value)
Definition Instance.h:188
Instance & WithRootDeviceName(RootDeviceNameT &&value)
Definition Instance.h:322
void SetEnclaveOptions(EnclaveOptionsT &&value)
Definition Instance.h:624
bool LaunchTimeHasBeenSet() const
Definition Instance.h:1050
bool CapacityReservationSpecificationHasBeenSet() const
Definition Instance.h:543
void SetRootDeviceName(RootDeviceNameT &&value)
Definition Instance.h:317
Instance & WithElasticGpuAssociations(ElasticGpuAssociationsT &&value)
Definition Instance.h:228
bool PublicDnsNameHasBeenSet() const
Definition Instance.h:935
bool TagsHasBeenSet() const
Definition Instance.h:445
const Aws::Utils::DateTime & GetLaunchTime() const
Definition Instance.h:1049
bool SriovNetSupportHasBeenSet() const
Definition Instance.h:409
bool RootDeviceTypeHasBeenSet() const
Definition Instance.h:334
const Aws::String & GetSriovNetSupport() const
Definition Instance.h:408
const Aws::String & GetRootDeviceName() const
Definition Instance.h:314
Instance & WithStateReason(StateReasonT &&value)
Definition Instance.h:434
void SetSecurityGroups(SecurityGroupsT &&value)
Definition Instance.h:352
const Aws::String & GetImageId() const
Definition Instance.h:869
bool PrivateIpAddressHasBeenSet() const
Definition Instance.h:1193
Instance & WithKernelId(KernelIdT &&value)
Definition Instance.h:1093
void SetInstanceLifecycle(InstanceLifecycleType value)
Definition Instance.h:205
Instance & WithOutpostArn(OutpostArnT &&value)
Definition Instance.h:303
Instance & WithEnaSupport(bool value)
Definition Instance.h:158
Instance & WithSecurityGroups(SecurityGroupsT &&value)
Definition Instance.h:357
int GetAmiLaunchIndex() const
Definition Instance.h:991
const InstanceMaintenanceOptions & GetMaintenanceOptions() const
Definition Instance.h:778
Instance & WithOperator(OperatorT &&value)
Definition Instance.h:841
void SetTpmSupport(TpmSupportT &&value)
Definition Instance.h:762
bool InstanceIdHasBeenSet() const
Definition Instance.h:852
void SetInstanceId(InstanceIdT &&value)
Definition Instance.h:854
const Aws::Vector< Tag > & GetTags() const
Definition Instance.h:444
bool EbsOptimizedHasBeenSet() const
Definition Instance.h:137
bool GetEbsOptimized() const
Definition Instance.h:136
void SetRootDeviceType(DeviceType value)
Definition Instance.h:335
bool SpotInstanceRequestIdHasBeenSet() const
Definition Instance.h:390
Instance & WithInstanceId(InstanceIdT &&value)
Definition Instance.h:859
Instance & WithUsageOperation(UsageOperationT &&value)
Definition Instance.h:692
bool TpmSupportHasBeenSet() const
Definition Instance.h:760
bool CpuOptionsHasBeenSet() const
Definition Instance.h:485
bool SourceDestCheckHasBeenSet() const
Definition Instance.h:374
bool ClientTokenHasBeenSet() const
Definition Instance.h:115
Instance & WithInstanceLifecycle(InstanceLifecycleType value)
Definition Instance.h:209
const Aws::String & GetRamdiskId() const
Definition Instance.h:1103
bool VpcIdHasBeenSet() const
Definition Instance.h:1175
Instance & WithNetworkPerformanceOptions(NetworkPerformanceOptionsT &&value)
Definition Instance.h:823
void SetCapacityReservationId(CapacityReservationIdT &&value)
Definition Instance.h:525
void SetPlatform(PlatformValues value)
Definition Instance.h:1124
void SetVpcId(VpcIdT &&value)
Definition Instance.h:1177
void SetPublicIpAddress(PublicIpAddressT &&value)
Definition Instance.h:1215
const Aws::String & GetPrivateIpAddress() const
Definition Instance.h:1192
bool OperatorHasBeenSet() const
Definition Instance.h:834
bool PrivateDnsNameHasBeenSet() const
Definition Instance.h:912
bool StateReasonHasBeenSet() const
Definition Instance.h:427
void SetLaunchTime(LaunchTimeT &&value)
Definition Instance.h:1052
Instance & WithInstanceType(InstanceType value)
Definition Instance.h:1037
void SetVirtualizationType(VirtualizationType value)
Definition Instance.h:470
const EnclaveOptions & GetEnclaveOptions() const
Definition Instance.h:621
void SetNetworkPerformanceOptions(NetworkPerformanceOptionsT &&value)
Definition Instance.h:818
bool EnclaveOptionsHasBeenSet() const
Definition Instance.h:622
AWS_EC2_API Instance & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const HibernationOptions & GetHibernationOptions() const
Definition Instance.h:560
const Aws::String & GetSubnetId() const
Definition Instance.h:1156
Instance & AddNetworkInterfaces(NetworkInterfacesT &&value)
Definition Instance.h:284
const IamInstanceProfile & GetIamInstanceProfile() const
Definition Instance.h:185
void SetSriovNetSupport(SriovNetSupportT &&value)
Definition Instance.h:411
bool ImageIdHasBeenSet() const
Definition Instance.h:870
void SetSpotInstanceRequestId(SpotInstanceRequestIdT &&value)
Definition Instance.h:392
const PrivateDnsNameOptionsResponse & GetPrivateDnsNameOptions() const
Definition Instance.h:720
void SetPlacement(PlacementT &&value)
Definition Instance.h:1070
void SetTags(TagsT &&value)
Definition Instance.h:447
bool MaintenanceOptionsHasBeenSet() const
Definition Instance.h:779
void SetHibernationOptions(HibernationOptionsT &&value)
Definition Instance.h:563
bool ArchitectureHasBeenSet() const
Definition Instance.h:74
const Aws::Vector< GroupIdentifier > & GetSecurityGroups() const
Definition Instance.h:349
void SetEbsOptimized(bool value)
Definition Instance.h:138
Instance & WithPlacement(PlacementT &&value)
Definition Instance.h:1075
Instance & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
Definition Instance.h:102
const InstanceNetworkPerformanceOptions & GetNetworkPerformanceOptions() const
Definition Instance.h:815
void SetElasticGpuAssociations(ElasticGpuAssociationsT &&value)
Definition Instance.h:223
const Aws::Vector< InstanceNetworkInterface > & GetNetworkInterfaces() const
Definition Instance.h:271
bool VirtualizationTypeHasBeenSet() const
Definition Instance.h:469
Instance & WithIpv6Address(Ipv6AddressT &&value)
Definition Instance.h:746
bool BootModeHasBeenSet() const
Definition Instance.h:647
const CpuOptions & GetCpuOptions() const
Definition Instance.h:484
const Aws::String & GetPlatformDetails() const
Definition Instance.h:664
bool ElasticGpuAssociationsHasBeenSet() const
Definition Instance.h:221
void SetCapacityReservationSpecification(CapacityReservationSpecificationT &&value)
Definition Instance.h:545
Instance & WithAmiLaunchIndex(int value)
Definition Instance.h:997
Instance & WithState(StateT &&value)
Definition Instance.h:895
Instance & WithSriovNetSupport(SriovNetSupportT &&value)
Definition Instance.h:416
Instance & WithKeyName(KeyNameT &&value)
Definition Instance.h:980
bool MetadataOptionsHasBeenSet() const
Definition Instance.h:603
const InstanceMetadataOptionsResponse & GetMetadataOptions() const
Definition Instance.h:602
void SetNetworkInterfaces(NetworkInterfacesT &&value)
Definition Instance.h:274
const Aws::String & GetUsageOperation() const
Definition Instance.h:684
Instance & WithCapacityReservationSpecification(CapacityReservationSpecificationT &&value)
Definition Instance.h:550
void SetSubnetId(SubnetIdT &&value)
Definition Instance.h:1159
void SetKernelId(KernelIdT &&value)
Definition Instance.h:1088
bool StateHasBeenSet() const
Definition Instance.h:888
Instance & WithElasticInferenceAcceleratorAssociations(ElasticInferenceAcceleratorAssociationsT &&value)
Definition Instance.h:255
bool UsageOperationUpdateTimeHasBeenSet() const
Definition Instance.h:703
bool InstanceTypeHasBeenSet() const
Definition Instance.h:1032
void SetPrivateIpAddress(PrivateIpAddressT &&value)
Definition Instance.h:1195
bool PlacementHasBeenSet() const
Definition Instance.h:1068
DeviceType GetRootDeviceType() const
Definition Instance.h:333
bool HypervisorHasBeenSet() const
Definition Instance.h:170
void SetCpuOptions(CpuOptionsT &&value)
Definition Instance.h:487
void SetSourceDestCheck(bool value)
Definition Instance.h:375
Instance & WithPlatformDetails(PlatformDetailsT &&value)
Definition Instance.h:672
bool KernelIdHasBeenSet() const
Definition Instance.h:1086
Instance & WithUsageOperationUpdateTime(UsageOperationUpdateTimeT &&value)
Definition Instance.h:710
const Aws::String & GetStateTransitionReason() const
Definition Instance.h:953
bool RamdiskIdHasBeenSet() const
Definition Instance.h:1104
void SetStateReason(StateReasonT &&value)
Definition Instance.h:429
bool SecurityGroupsHasBeenSet() const
Definition Instance.h:350
InstanceBootModeValues GetCurrentInstanceBootMode() const
Definition Instance.h:799
bool ProductCodesHasBeenSet() const
Definition Instance.h:1008
bool OutpostArnHasBeenSet() const
Definition Instance.h:296
void SetUsageOperation(UsageOperationT &&value)
Definition Instance.h:687
bool UsageOperationHasBeenSet() const
Definition Instance.h:685
const Monitoring & GetMonitoring() const
Definition Instance.h:1138
const Aws::Vector< ElasticInferenceAcceleratorAssociation > & GetElasticInferenceAcceleratorAssociations() const
Definition Instance.h:245
const Aws::String & GetSpotInstanceRequestId() const
Definition Instance.h:389
void SetAmiLaunchIndex(int value)
Definition Instance.h:993
bool PlatformHasBeenSet() const
Definition Instance.h:1123
bool GetSourceDestCheck() const
Definition Instance.h:373
InstanceLifecycleType GetInstanceLifecycle() const
Definition Instance.h:203
void SetCapacityBlockId(CapacityBlockIdT &&value)
Definition Instance.h:507
const Aws::String & GetInstanceId() const
Definition Instance.h:851
void SetIpv6Address(Ipv6AddressT &&value)
Definition Instance.h:741
Instance & WithEbsOptimized(bool value)
Definition Instance.h:142
Instance & WithMaintenanceOptions(MaintenanceOptionsT &&value)
Definition Instance.h:786
Instance & WithRootDeviceType(DeviceType value)
Definition Instance.h:339
void SetMaintenanceOptions(MaintenanceOptionsT &&value)
Definition Instance.h:781
void SetArchitecture(ArchitectureValues value)
Definition Instance.h:75
Instance & AddLicenses(LicensesT &&value)
Definition Instance.h:591
Instance & WithIamInstanceProfile(IamInstanceProfileT &&value)
Definition Instance.h:193
Instance & WithNetworkInterfaces(NetworkInterfacesT &&value)
Definition Instance.h:279
bool IamInstanceProfileHasBeenSet() const
Definition Instance.h:186
bool NetworkInterfacesHasBeenSet() const
Definition Instance.h:272
const Aws::String & GetClientToken() const
Definition Instance.h:114
BootModeValues GetBootMode() const
Definition Instance.h:646
Instance & WithPublicIpAddress(PublicIpAddressT &&value)
Definition Instance.h:1220
Instance & WithSpotInstanceRequestId(SpotInstanceRequestIdT &&value)
Definition Instance.h:397
Instance & WithPlatform(PlatformValues value)
Definition Instance.h:1128
Instance & WithPrivateIpAddress(PrivateIpAddressT &&value)
Definition Instance.h:1200
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetPublicDnsName(PublicDnsNameT &&value)
Definition Instance.h:937
bool CapacityReservationIdHasBeenSet() const
Definition Instance.h:523
void SetHypervisor(HypervisorType value)
Definition Instance.h:171
AWS_EC2_API Instance(const Aws::Utils::Xml::XmlNode &xmlNode)
Instance & WithEnclaveOptions(EnclaveOptionsT &&value)
Definition Instance.h:629
Instance & WithTpmSupport(TpmSupportT &&value)
Definition Instance.h:767
void SetBlockDeviceMappings(BlockDeviceMappingsT &&value)
Definition Instance.h:92
void SetCurrentInstanceBootMode(InstanceBootModeValues value)
Definition Instance.h:801
const CapacityReservationSpecificationResponse & GetCapacityReservationSpecification() const
Definition Instance.h:540
const Aws::String & GetTpmSupport() const
Definition Instance.h:759
void SetMonitoring(MonitoringT &&value)
Definition Instance.h:1141
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