AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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
41 inline const Aws::String& GetName() const { return m_name; }
42 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
43 template <typename NameT = Aws::String>
44 void SetName(NameT&& value) {
45 m_nameHasBeenSet = true;
46 m_name = std::forward<NameT>(value);
47 }
48 template <typename NameT = Aws::String>
50 SetName(std::forward<NameT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetDescription() const { return m_description; }
60 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
61 template <typename DescriptionT = Aws::String>
62 void SetDescription(DescriptionT&& value) {
63 m_descriptionHasBeenSet = true;
64 m_description = std::forward<DescriptionT>(value);
65 }
66 template <typename DescriptionT = Aws::String>
68 SetDescription(std::forward<DescriptionT>(value));
69 return *this;
70 }
72
74
79 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
80 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
81 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
82 void SetInstanceTypes(InstanceTypesT&& value) {
83 m_instanceTypesHasBeenSet = true;
84 m_instanceTypes = std::forward<InstanceTypesT>(value);
85 }
86 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
88 SetInstanceTypes(std::forward<InstanceTypesT>(value));
89 return *this;
90 }
91 template <typename InstanceTypesT = Aws::String>
93 m_instanceTypesHasBeenSet = true;
94 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
95 return *this;
96 }
98
100
104 inline const Aws::String& GetInstanceProfileName() const { return m_instanceProfileName; }
105 inline bool InstanceProfileNameHasBeenSet() const { return m_instanceProfileNameHasBeenSet; }
106 template <typename InstanceProfileNameT = Aws::String>
107 void SetInstanceProfileName(InstanceProfileNameT&& value) {
108 m_instanceProfileNameHasBeenSet = true;
109 m_instanceProfileName = std::forward<InstanceProfileNameT>(value);
110 }
111 template <typename InstanceProfileNameT = Aws::String>
113 SetInstanceProfileName(std::forward<InstanceProfileNameT>(value));
114 return *this;
115 }
117
119
123 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
124 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
125 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
126 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
127 m_securityGroupIdsHasBeenSet = true;
128 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
129 }
130 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
132 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
133 return *this;
134 }
135 template <typename SecurityGroupIdsT = Aws::String>
137 m_securityGroupIdsHasBeenSet = true;
138 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
139 return *this;
140 }
142
144
148 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
149 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
150 template <typename SubnetIdT = Aws::String>
151 void SetSubnetId(SubnetIdT&& value) {
152 m_subnetIdHasBeenSet = true;
153 m_subnetId = std::forward<SubnetIdT>(value);
154 }
155 template <typename SubnetIdT = Aws::String>
157 SetSubnetId(std::forward<SubnetIdT>(value));
158 return *this;
159 }
161
163
166 inline const Logging& GetLogging() const { return m_logging; }
167 inline bool LoggingHasBeenSet() const { return m_loggingHasBeenSet; }
168 template <typename LoggingT = Logging>
169 void SetLogging(LoggingT&& value) {
170 m_loggingHasBeenSet = true;
171 m_logging = std::forward<LoggingT>(value);
172 }
173 template <typename LoggingT = Logging>
175 SetLogging(std::forward<LoggingT>(value));
176 return *this;
177 }
179
181
185 inline const Aws::String& GetKeyPair() const { return m_keyPair; }
186 inline bool KeyPairHasBeenSet() const { return m_keyPairHasBeenSet; }
187 template <typename KeyPairT = Aws::String>
188 void SetKeyPair(KeyPairT&& value) {
189 m_keyPairHasBeenSet = true;
190 m_keyPair = std::forward<KeyPairT>(value);
191 }
192 template <typename KeyPairT = Aws::String>
194 SetKeyPair(std::forward<KeyPairT>(value));
195 return *this;
196 }
198
200
206 inline bool GetTerminateInstanceOnFailure() const { return m_terminateInstanceOnFailure; }
207 inline bool TerminateInstanceOnFailureHasBeenSet() const { return m_terminateInstanceOnFailureHasBeenSet; }
208 inline void SetTerminateInstanceOnFailure(bool value) {
209 m_terminateInstanceOnFailureHasBeenSet = true;
210 m_terminateInstanceOnFailure = value;
211 }
214 return *this;
215 }
217
219
226 inline const Aws::String& GetSnsTopicArn() const { return m_snsTopicArn; }
227 inline bool SnsTopicArnHasBeenSet() const { return m_snsTopicArnHasBeenSet; }
228 template <typename SnsTopicArnT = Aws::String>
229 void SetSnsTopicArn(SnsTopicArnT&& value) {
230 m_snsTopicArnHasBeenSet = true;
231 m_snsTopicArn = std::forward<SnsTopicArnT>(value);
232 }
233 template <typename SnsTopicArnT = Aws::String>
235 SetSnsTopicArn(std::forward<SnsTopicArnT>(value));
236 return *this;
237 }
239
241
245 inline const Aws::Map<Aws::String, Aws::String>& GetResourceTags() const { return m_resourceTags; }
246 inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; }
247 template <typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
248 void SetResourceTags(ResourceTagsT&& value) {
249 m_resourceTagsHasBeenSet = true;
250 m_resourceTags = std::forward<ResourceTagsT>(value);
251 }
252 template <typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
254 SetResourceTags(std::forward<ResourceTagsT>(value));
255 return *this;
256 }
257 template <typename ResourceTagsKeyT = Aws::String, typename ResourceTagsValueT = Aws::String>
258 CreateInfrastructureConfigurationRequest& AddResourceTags(ResourceTagsKeyT&& key, ResourceTagsValueT&& value) {
259 m_resourceTagsHasBeenSet = true;
260 m_resourceTags.emplace(std::forward<ResourceTagsKeyT>(key), std::forward<ResourceTagsValueT>(value));
261 return *this;
262 }
264
266
270 inline const InstanceMetadataOptions& GetInstanceMetadataOptions() const { return m_instanceMetadataOptions; }
271 inline bool InstanceMetadataOptionsHasBeenSet() const { return m_instanceMetadataOptionsHasBeenSet; }
272 template <typename InstanceMetadataOptionsT = InstanceMetadataOptions>
273 void SetInstanceMetadataOptions(InstanceMetadataOptionsT&& value) {
274 m_instanceMetadataOptionsHasBeenSet = true;
275 m_instanceMetadataOptions = std::forward<InstanceMetadataOptionsT>(value);
276 }
277 template <typename InstanceMetadataOptionsT = InstanceMetadataOptions>
279 SetInstanceMetadataOptions(std::forward<InstanceMetadataOptionsT>(value));
280 return *this;
281 }
283
285
289 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
290 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
291 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
292 void SetTags(TagsT&& value) {
293 m_tagsHasBeenSet = true;
294 m_tags = std::forward<TagsT>(value);
295 }
296 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
298 SetTags(std::forward<TagsT>(value));
299 return *this;
300 }
301 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
302 CreateInfrastructureConfigurationRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
303 m_tagsHasBeenSet = true;
304 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
305 return *this;
306 }
308
310
314 inline const Placement& GetPlacement() const { return m_placement; }
315 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
316 template <typename PlacementT = Placement>
317 void SetPlacement(PlacementT&& value) {
318 m_placementHasBeenSet = true;
319 m_placement = std::forward<PlacementT>(value);
320 }
321 template <typename PlacementT = Placement>
323 SetPlacement(std::forward<PlacementT>(value));
324 return *this;
325 }
327
329
335 inline const Aws::String& GetClientToken() const { return m_clientToken; }
336 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
337 template <typename ClientTokenT = Aws::String>
338 void SetClientToken(ClientTokenT&& value) {
339 m_clientTokenHasBeenSet = true;
340 m_clientToken = std::forward<ClientTokenT>(value);
341 }
342 template <typename ClientTokenT = Aws::String>
344 SetClientToken(std::forward<ClientTokenT>(value));
345 return *this;
346 }
348 private:
349 Aws::String m_name;
350
351 Aws::String m_description;
352
353 Aws::Vector<Aws::String> m_instanceTypes;
354
355 Aws::String m_instanceProfileName;
356
357 Aws::Vector<Aws::String> m_securityGroupIds;
358
359 Aws::String m_subnetId;
360
361 Logging m_logging;
362
363 Aws::String m_keyPair;
364
365 bool m_terminateInstanceOnFailure{false};
366
367 Aws::String m_snsTopicArn;
368
370
371 InstanceMetadataOptions m_instanceMetadataOptions;
372
374
375 Placement m_placement;
376
378 bool m_nameHasBeenSet = false;
379 bool m_descriptionHasBeenSet = false;
380 bool m_instanceTypesHasBeenSet = false;
381 bool m_instanceProfileNameHasBeenSet = false;
382 bool m_securityGroupIdsHasBeenSet = false;
383 bool m_subnetIdHasBeenSet = false;
384 bool m_loggingHasBeenSet = false;
385 bool m_keyPairHasBeenSet = false;
386 bool m_terminateInstanceOnFailureHasBeenSet = false;
387 bool m_snsTopicArnHasBeenSet = false;
388 bool m_resourceTagsHasBeenSet = false;
389 bool m_instanceMetadataOptionsHasBeenSet = false;
390 bool m_tagsHasBeenSet = false;
391 bool m_placementHasBeenSet = false;
392 bool m_clientTokenHasBeenSet = true;
393};
394
395} // namespace Model
396} // namespace imagebuilder
397} // 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