AWS SDK for C++

AWS SDK for C++ Version 1.11.901

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/Placement.h>
16
17#include <utility>
18
19namespace Aws {
20namespace imagebuilder {
21namespace Model {
22
26 public:
27 AWS_IMAGEBUILDER_API CreateInfrastructureConfigurationRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateInfrastructureConfiguration"; }
34
35 AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override;
36
38
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template <typename NameT = Aws::String>
48 void SetName(NameT&& value) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetDescription() const { return m_description; }
64 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
65 template <typename DescriptionT = Aws::String>
66 void SetDescription(DescriptionT&& value) {
67 m_descriptionHasBeenSet = true;
68 m_description = std::forward<DescriptionT>(value);
69 }
70 template <typename DescriptionT = Aws::String>
72 SetDescription(std::forward<DescriptionT>(value));
73 return *this;
74 }
76
78
86 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
87 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
88 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
89 void SetInstanceTypes(InstanceTypesT&& value) {
90 m_instanceTypesHasBeenSet = true;
91 m_instanceTypes = std::forward<InstanceTypesT>(value);
92 }
93 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
95 SetInstanceTypes(std::forward<InstanceTypesT>(value));
96 return *this;
97 }
98 template <typename InstanceTypesT = Aws::String>
100 m_instanceTypesHasBeenSet = true;
101 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
102 return *this;
103 }
105
107
111 inline const Aws::String& GetInstanceProfileName() const { return m_instanceProfileName; }
112 inline bool InstanceProfileNameHasBeenSet() const { return m_instanceProfileNameHasBeenSet; }
113 template <typename InstanceProfileNameT = Aws::String>
114 void SetInstanceProfileName(InstanceProfileNameT&& value) {
115 m_instanceProfileNameHasBeenSet = true;
116 m_instanceProfileName = std::forward<InstanceProfileNameT>(value);
117 }
118 template <typename InstanceProfileNameT = Aws::String>
120 SetInstanceProfileName(std::forward<InstanceProfileNameT>(value));
121 return *this;
122 }
124
126
130 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
131 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
132 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
133 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
134 m_securityGroupIdsHasBeenSet = true;
135 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
136 }
137 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
139 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
140 return *this;
141 }
142 template <typename SecurityGroupIdsT = Aws::String>
144 m_securityGroupIdsHasBeenSet = true;
145 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
146 return *this;
147 }
149
151
157 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
158 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
159 template <typename SubnetIdT = Aws::String>
160 void SetSubnetId(SubnetIdT&& value) {
161 m_subnetIdHasBeenSet = true;
162 m_subnetId = std::forward<SubnetIdT>(value);
163 }
164 template <typename SubnetIdT = Aws::String>
166 SetSubnetId(std::forward<SubnetIdT>(value));
167 return *this;
168 }
170
172
177 inline const Logging& GetLogging() const { return m_logging; }
178 inline bool LoggingHasBeenSet() const { return m_loggingHasBeenSet; }
179 template <typename LoggingT = Logging>
180 void SetLogging(LoggingT&& value) {
181 m_loggingHasBeenSet = true;
182 m_logging = std::forward<LoggingT>(value);
183 }
184 template <typename LoggingT = Logging>
186 SetLogging(std::forward<LoggingT>(value));
187 return *this;
188 }
190
192
196 inline const Aws::String& GetKeyPair() const { return m_keyPair; }
197 inline bool KeyPairHasBeenSet() const { return m_keyPairHasBeenSet; }
198 template <typename KeyPairT = Aws::String>
199 void SetKeyPair(KeyPairT&& value) {
200 m_keyPairHasBeenSet = true;
201 m_keyPair = std::forward<KeyPairT>(value);
202 }
203 template <typename KeyPairT = Aws::String>
205 SetKeyPair(std::forward<KeyPairT>(value));
206 return *this;
207 }
209
211
216 inline bool GetTerminateInstanceOnFailure() const { return m_terminateInstanceOnFailure; }
217 inline bool TerminateInstanceOnFailureHasBeenSet() const { return m_terminateInstanceOnFailureHasBeenSet; }
218 inline void SetTerminateInstanceOnFailure(bool value) {
219 m_terminateInstanceOnFailureHasBeenSet = true;
220 m_terminateInstanceOnFailure = value;
221 }
224 return *this;
225 }
227
229
238 inline const Aws::String& GetSnsTopicArn() const { return m_snsTopicArn; }
239 inline bool SnsTopicArnHasBeenSet() const { return m_snsTopicArnHasBeenSet; }
240 template <typename SnsTopicArnT = Aws::String>
241 void SetSnsTopicArn(SnsTopicArnT&& value) {
242 m_snsTopicArnHasBeenSet = true;
243 m_snsTopicArn = std::forward<SnsTopicArnT>(value);
244 }
245 template <typename SnsTopicArnT = Aws::String>
247 SetSnsTopicArn(std::forward<SnsTopicArnT>(value));
248 return *this;
249 }
251
253
260 inline const Aws::Map<Aws::String, Aws::String>& GetResourceTags() const { return m_resourceTags; }
261 inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; }
262 template <typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
263 void SetResourceTags(ResourceTagsT&& value) {
264 m_resourceTagsHasBeenSet = true;
265 m_resourceTags = std::forward<ResourceTagsT>(value);
266 }
267 template <typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
269 SetResourceTags(std::forward<ResourceTagsT>(value));
270 return *this;
271 }
272 template <typename ResourceTagsKeyT = Aws::String, typename ResourceTagsValueT = Aws::String>
273 CreateInfrastructureConfigurationRequest& AddResourceTags(ResourceTagsKeyT&& key, ResourceTagsValueT&& value) {
274 m_resourceTagsHasBeenSet = true;
275 m_resourceTags.emplace(std::forward<ResourceTagsKeyT>(key), std::forward<ResourceTagsValueT>(value));
276 return *this;
277 }
279
281
294 inline const InstanceMetadataOptions& GetInstanceMetadataOptions() const { return m_instanceMetadataOptions; }
295 inline bool InstanceMetadataOptionsHasBeenSet() const { return m_instanceMetadataOptionsHasBeenSet; }
296 template <typename InstanceMetadataOptionsT = InstanceMetadataOptions>
297 void SetInstanceMetadataOptions(InstanceMetadataOptionsT&& value) {
298 m_instanceMetadataOptionsHasBeenSet = true;
299 m_instanceMetadataOptions = std::forward<InstanceMetadataOptionsT>(value);
300 }
301 template <typename InstanceMetadataOptionsT = InstanceMetadataOptions>
303 SetInstanceMetadataOptions(std::forward<InstanceMetadataOptionsT>(value));
304 return *this;
305 }
307
309
313 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
314 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
315 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
316 void SetTags(TagsT&& value) {
317 m_tagsHasBeenSet = true;
318 m_tags = std::forward<TagsT>(value);
319 }
320 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
322 SetTags(std::forward<TagsT>(value));
323 return *this;
324 }
325 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
326 CreateInfrastructureConfigurationRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
327 m_tagsHasBeenSet = true;
328 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
329 return *this;
330 }
332
334
339 inline const Placement& GetPlacement() const { return m_placement; }
340 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
341 template <typename PlacementT = Placement>
342 void SetPlacement(PlacementT&& value) {
343 m_placementHasBeenSet = true;
344 m_placement = std::forward<PlacementT>(value);
345 }
346 template <typename PlacementT = Placement>
348 SetPlacement(std::forward<PlacementT>(value));
349 return *this;
350 }
352
354
362 inline const Aws::String& GetClientToken() const { return m_clientToken; }
363 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
364 template <typename ClientTokenT = Aws::String>
365 void SetClientToken(ClientTokenT&& value) {
366 m_clientTokenHasBeenSet = true;
367 m_clientToken = std::forward<ClientTokenT>(value);
368 }
369 template <typename ClientTokenT = Aws::String>
371 SetClientToken(std::forward<ClientTokenT>(value));
372 return *this;
373 }
375
377
382 inline bool GetDryRun() const { return m_dryRun; }
383 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
384 inline void SetDryRun(bool value) {
385 m_dryRunHasBeenSet = true;
386 m_dryRun = value;
387 }
389 SetDryRun(value);
390 return *this;
391 }
393 private:
394 Aws::String m_name;
395
396 Aws::String m_description;
397
398 Aws::Vector<Aws::String> m_instanceTypes;
399
400 Aws::String m_instanceProfileName;
401
402 Aws::Vector<Aws::String> m_securityGroupIds;
403
404 Aws::String m_subnetId;
405
406 Logging m_logging;
407
408 Aws::String m_keyPair;
409
410 bool m_terminateInstanceOnFailure{false};
411
412 Aws::String m_snsTopicArn;
413
415
416 InstanceMetadataOptions m_instanceMetadataOptions;
417
419
420 Placement m_placement;
421
423
424 bool m_dryRun{false};
425 bool m_nameHasBeenSet = false;
426 bool m_descriptionHasBeenSet = false;
427 bool m_instanceTypesHasBeenSet = false;
428 bool m_instanceProfileNameHasBeenSet = false;
429 bool m_securityGroupIdsHasBeenSet = false;
430 bool m_subnetIdHasBeenSet = false;
431 bool m_loggingHasBeenSet = false;
432 bool m_keyPairHasBeenSet = false;
433 bool m_terminateInstanceOnFailureHasBeenSet = false;
434 bool m_snsTopicArnHasBeenSet = false;
435 bool m_resourceTagsHasBeenSet = false;
436 bool m_instanceMetadataOptionsHasBeenSet = false;
437 bool m_tagsHasBeenSet = false;
438 bool m_placementHasBeenSet = false;
439 bool m_clientTokenHasBeenSet = true;
440 bool m_dryRunHasBeenSet = false;
441};
442
443} // namespace Model
444} // namespace imagebuilder
445} // 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 & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateInfrastructureConfigurationRequest & WithInstanceMetadataOptions(InstanceMetadataOptionsT &&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