AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
CreateInfrastructureConfigurationRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/imagebuilder/ImagebuilderRequest.h>
12#include <aws/imagebuilder/Imagebuilder_EXPORTS.h>
13#include <aws/imagebuilder/model/InstanceMetadataOptions.h>
14#include <aws/imagebuilder/model/Logging.h>
15#include <aws/imagebuilder/model/ParentInstanceConfiguration.h>
16#include <aws/imagebuilder/model/Placement.h>
17
18#include <utility>
19
20namespace Aws {
21namespace imagebuilder {
22namespace Model {
23
27 public:
28 AWS_IMAGEBUILDER_API CreateInfrastructureConfigurationRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateInfrastructureConfiguration"; }
35
36 AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override;
37
39
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template <typename NameT = Aws::String>
49 void SetName(NameT&& value) {
50 m_nameHasBeenSet = true;
51 m_name = std::forward<NameT>(value);
52 }
53 template <typename NameT = Aws::String>
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetDescription() const { return m_description; }
65 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
66 template <typename DescriptionT = Aws::String>
67 void SetDescription(DescriptionT&& value) {
68 m_descriptionHasBeenSet = true;
69 m_description = std::forward<DescriptionT>(value);
70 }
71 template <typename DescriptionT = Aws::String>
73 SetDescription(std::forward<DescriptionT>(value));
74 return *this;
75 }
77
79
87 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
88 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
89 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
90 void SetInstanceTypes(InstanceTypesT&& value) {
91 m_instanceTypesHasBeenSet = true;
92 m_instanceTypes = std::forward<InstanceTypesT>(value);
93 }
94 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
96 SetInstanceTypes(std::forward<InstanceTypesT>(value));
97 return *this;
98 }
99 template <typename InstanceTypesT = Aws::String>
101 m_instanceTypesHasBeenSet = true;
102 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
103 return *this;
104 }
106
108
112 inline const Aws::String& GetInstanceProfileName() const { return m_instanceProfileName; }
113 inline bool InstanceProfileNameHasBeenSet() const { return m_instanceProfileNameHasBeenSet; }
114 template <typename InstanceProfileNameT = Aws::String>
115 void SetInstanceProfileName(InstanceProfileNameT&& value) {
116 m_instanceProfileNameHasBeenSet = true;
117 m_instanceProfileName = std::forward<InstanceProfileNameT>(value);
118 }
119 template <typename InstanceProfileNameT = Aws::String>
121 SetInstanceProfileName(std::forward<InstanceProfileNameT>(value));
122 return *this;
123 }
125
127
131 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
132 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
133 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
134 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
135 m_securityGroupIdsHasBeenSet = true;
136 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
137 }
138 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
140 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
141 return *this;
142 }
143 template <typename SecurityGroupIdsT = Aws::String>
145 m_securityGroupIdsHasBeenSet = true;
146 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
147 return *this;
148 }
150
152
158 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
159 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
160 template <typename SubnetIdT = Aws::String>
161 void SetSubnetId(SubnetIdT&& value) {
162 m_subnetIdHasBeenSet = true;
163 m_subnetId = std::forward<SubnetIdT>(value);
164 }
165 template <typename SubnetIdT = Aws::String>
167 SetSubnetId(std::forward<SubnetIdT>(value));
168 return *this;
169 }
171
173
178 inline const Logging& GetLogging() const { return m_logging; }
179 inline bool LoggingHasBeenSet() const { return m_loggingHasBeenSet; }
180 template <typename LoggingT = Logging>
181 void SetLogging(LoggingT&& value) {
182 m_loggingHasBeenSet = true;
183 m_logging = std::forward<LoggingT>(value);
184 }
185 template <typename LoggingT = Logging>
187 SetLogging(std::forward<LoggingT>(value));
188 return *this;
189 }
191
193
197 inline const Aws::String& GetKeyPair() const { return m_keyPair; }
198 inline bool KeyPairHasBeenSet() const { return m_keyPairHasBeenSet; }
199 template <typename KeyPairT = Aws::String>
200 void SetKeyPair(KeyPairT&& value) {
201 m_keyPairHasBeenSet = true;
202 m_keyPair = std::forward<KeyPairT>(value);
203 }
204 template <typename KeyPairT = Aws::String>
206 SetKeyPair(std::forward<KeyPairT>(value));
207 return *this;
208 }
210
212
217 inline bool GetTerminateInstanceOnFailure() const { return m_terminateInstanceOnFailure; }
218 inline bool TerminateInstanceOnFailureHasBeenSet() const { return m_terminateInstanceOnFailureHasBeenSet; }
219 inline void SetTerminateInstanceOnFailure(bool value) {
220 m_terminateInstanceOnFailureHasBeenSet = true;
221 m_terminateInstanceOnFailure = value;
222 }
228
230
235 inline bool GetTerminateInstanceOnCompletion() const { return m_terminateInstanceOnCompletion; }
236 inline bool TerminateInstanceOnCompletionHasBeenSet() const { return m_terminateInstanceOnCompletionHasBeenSet; }
237 inline void SetTerminateInstanceOnCompletion(bool value) {
238 m_terminateInstanceOnCompletionHasBeenSet = true;
239 m_terminateInstanceOnCompletion = value;
240 }
246
248
257 inline const Aws::String& GetSnsTopicArn() const { return m_snsTopicArn; }
258 inline bool SnsTopicArnHasBeenSet() const { return m_snsTopicArnHasBeenSet; }
259 template <typename SnsTopicArnT = Aws::String>
260 void SetSnsTopicArn(SnsTopicArnT&& value) {
261 m_snsTopicArnHasBeenSet = true;
262 m_snsTopicArn = std::forward<SnsTopicArnT>(value);
263 }
264 template <typename SnsTopicArnT = Aws::String>
266 SetSnsTopicArn(std::forward<SnsTopicArnT>(value));
267 return *this;
268 }
270
272
279 inline const Aws::Map<Aws::String, Aws::String>& GetResourceTags() const { return m_resourceTags; }
280 inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; }
281 template <typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
282 void SetResourceTags(ResourceTagsT&& value) {
283 m_resourceTagsHasBeenSet = true;
284 m_resourceTags = std::forward<ResourceTagsT>(value);
285 }
286 template <typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
288 SetResourceTags(std::forward<ResourceTagsT>(value));
289 return *this;
290 }
291 template <typename ResourceTagsKeyT = Aws::String, typename ResourceTagsValueT = Aws::String>
292 CreateInfrastructureConfigurationRequest& AddResourceTags(ResourceTagsKeyT&& key, ResourceTagsValueT&& value) {
293 m_resourceTagsHasBeenSet = true;
294 m_resourceTags.emplace(std::forward<ResourceTagsKeyT>(key), std::forward<ResourceTagsValueT>(value));
295 return *this;
296 }
298
300
313 inline const InstanceMetadataOptions& GetInstanceMetadataOptions() const { return m_instanceMetadataOptions; }
314 inline bool InstanceMetadataOptionsHasBeenSet() const { return m_instanceMetadataOptionsHasBeenSet; }
315 template <typename InstanceMetadataOptionsT = InstanceMetadataOptions>
316 void SetInstanceMetadataOptions(InstanceMetadataOptionsT&& value) {
317 m_instanceMetadataOptionsHasBeenSet = true;
318 m_instanceMetadataOptions = std::forward<InstanceMetadataOptionsT>(value);
319 }
320 template <typename InstanceMetadataOptionsT = InstanceMetadataOptions>
322 SetInstanceMetadataOptions(std::forward<InstanceMetadataOptionsT>(value));
323 return *this;
324 }
326
328
332 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
333 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
334 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
335 void SetTags(TagsT&& value) {
336 m_tagsHasBeenSet = true;
337 m_tags = std::forward<TagsT>(value);
338 }
339 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
341 SetTags(std::forward<TagsT>(value));
342 return *this;
343 }
344 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
345 CreateInfrastructureConfigurationRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
346 m_tagsHasBeenSet = true;
347 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
348 return *this;
349 }
351
353
358 inline const Placement& GetPlacement() const { return m_placement; }
359 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
360 template <typename PlacementT = Placement>
361 void SetPlacement(PlacementT&& value) {
362 m_placementHasBeenSet = true;
363 m_placement = std::forward<PlacementT>(value);
364 }
365 template <typename PlacementT = Placement>
367 SetPlacement(std::forward<PlacementT>(value));
368 return *this;
369 }
371
373
383 inline const ParentInstanceConfiguration& GetParentInstance() const { return m_parentInstance; }
384 inline bool ParentInstanceHasBeenSet() const { return m_parentInstanceHasBeenSet; }
385 template <typename ParentInstanceT = ParentInstanceConfiguration>
386 void SetParentInstance(ParentInstanceT&& value) {
387 m_parentInstanceHasBeenSet = true;
388 m_parentInstance = std::forward<ParentInstanceT>(value);
389 }
390 template <typename ParentInstanceT = ParentInstanceConfiguration>
392 SetParentInstance(std::forward<ParentInstanceT>(value));
393 return *this;
394 }
396
398
406 inline const Aws::String& GetClientToken() const { return m_clientToken; }
407 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
408 template <typename ClientTokenT = Aws::String>
409 void SetClientToken(ClientTokenT&& value) {
410 m_clientTokenHasBeenSet = true;
411 m_clientToken = std::forward<ClientTokenT>(value);
412 }
413 template <typename ClientTokenT = Aws::String>
415 SetClientToken(std::forward<ClientTokenT>(value));
416 return *this;
417 }
419
421
426 inline bool GetDryRun() const { return m_dryRun; }
427 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
428 inline void SetDryRun(bool value) {
429 m_dryRunHasBeenSet = true;
430 m_dryRun = value;
431 }
433 SetDryRun(value);
434 return *this;
435 }
437 private:
438 Aws::String m_name;
439
440 Aws::String m_description;
441
442 Aws::Vector<Aws::String> m_instanceTypes;
443
444 Aws::String m_instanceProfileName;
445
446 Aws::Vector<Aws::String> m_securityGroupIds;
447
448 Aws::String m_subnetId;
449
450 Logging m_logging;
451
452 Aws::String m_keyPair;
453
454 bool m_terminateInstanceOnFailure{false};
455
456 bool m_terminateInstanceOnCompletion{false};
457
458 Aws::String m_snsTopicArn;
459
461
462 InstanceMetadataOptions m_instanceMetadataOptions;
463
465
466 Placement m_placement;
467
468 ParentInstanceConfiguration m_parentInstance;
469
471
472 bool m_dryRun{false};
473 bool m_nameHasBeenSet = false;
474 bool m_descriptionHasBeenSet = false;
475 bool m_instanceTypesHasBeenSet = false;
476 bool m_instanceProfileNameHasBeenSet = false;
477 bool m_securityGroupIdsHasBeenSet = false;
478 bool m_subnetIdHasBeenSet = false;
479 bool m_loggingHasBeenSet = false;
480 bool m_keyPairHasBeenSet = false;
481 bool m_terminateInstanceOnFailureHasBeenSet = false;
482 bool m_terminateInstanceOnCompletionHasBeenSet = false;
483 bool m_snsTopicArnHasBeenSet = false;
484 bool m_resourceTagsHasBeenSet = false;
485 bool m_instanceMetadataOptionsHasBeenSet = false;
486 bool m_tagsHasBeenSet = false;
487 bool m_placementHasBeenSet = false;
488 bool m_parentInstanceHasBeenSet = false;
489 bool m_clientTokenHasBeenSet = true;
490 bool m_dryRunHasBeenSet = false;
491};
492
493} // namespace Model
494} // namespace imagebuilder
495} // namespace Aws
static Aws::Utils::UUID PseudoRandomUUID()
CreateInfrastructureConfigurationRequest & WithClientToken(ClientTokenT &&value)
CreateInfrastructureConfigurationRequest & WithTerminateInstanceOnFailure(bool value)
CreateInfrastructureConfigurationRequest & AddInstanceTypes(InstanceTypesT &&value)
CreateInfrastructureConfigurationRequest & WithSubnetId(SubnetIdT &&value)
CreateInfrastructureConfigurationRequest & AddResourceTags(ResourceTagsKeyT &&key, ResourceTagsValueT &&value)
AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override
CreateInfrastructureConfigurationRequest & WithDescription(DescriptionT &&value)
CreateInfrastructureConfigurationRequest & WithPlacement(PlacementT &&value)
CreateInfrastructureConfigurationRequest & WithParentInstance(ParentInstanceT &&value)
CreateInfrastructureConfigurationRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateInfrastructureConfigurationRequest & WithInstanceMetadataOptions(InstanceMetadataOptionsT &&value)
CreateInfrastructureConfigurationRequest & WithTerminateInstanceOnCompletion(bool value)
CreateInfrastructureConfigurationRequest & WithResourceTags(ResourceTagsT &&value)
CreateInfrastructureConfigurationRequest & WithInstanceTypes(InstanceTypesT &&value)
CreateInfrastructureConfigurationRequest & WithSecurityGroupIds(SecurityGroupIdsT &&value)
CreateInfrastructureConfigurationRequest & WithSnsTopicArn(SnsTopicArnT &&value)
CreateInfrastructureConfigurationRequest & WithInstanceProfileName(InstanceProfileNameT &&value)
CreateInfrastructureConfigurationRequest & AddSecurityGroupIds(SecurityGroupIdsT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector