AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
CreateInfrastructureConfigurationRequest.h
1
6#pragma once
7#include <aws/imagebuilder/Imagebuilder_EXPORTS.h>
8#include <aws/imagebuilder/ImagebuilderRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/imagebuilder/model/Logging.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/imagebuilder/model/InstanceMetadataOptions.h>
14#include <aws/imagebuilder/model/Placement.h>
15#include <utility>
16#include <aws/core/utils/UUID.h>
17
18namespace Aws
19{
20namespace imagebuilder
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_IMAGEBUILDER_API CreateInfrastructureConfigurationRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateInfrastructureConfiguration"; }
37
38 AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override;
39
40
42
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) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
49 template<typename NameT = Aws::String>
50 CreateInfrastructureConfigurationRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
52
54
57 inline const Aws::String& GetDescription() const { return m_description; }
58 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
59 template<typename DescriptionT = Aws::String>
60 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
61 template<typename DescriptionT = Aws::String>
62 CreateInfrastructureConfigurationRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
64
66
71 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
72 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
73 template<typename InstanceTypesT = Aws::Vector<Aws::String>>
74 void SetInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = std::forward<InstanceTypesT>(value); }
75 template<typename InstanceTypesT = Aws::Vector<Aws::String>>
76 CreateInfrastructureConfigurationRequest& WithInstanceTypes(InstanceTypesT&& value) { SetInstanceTypes(std::forward<InstanceTypesT>(value)); return *this;}
77 template<typename InstanceTypesT = Aws::String>
78 CreateInfrastructureConfigurationRequest& AddInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value)); return *this; }
80
82
86 inline const Aws::String& GetInstanceProfileName() const { return m_instanceProfileName; }
87 inline bool InstanceProfileNameHasBeenSet() const { return m_instanceProfileNameHasBeenSet; }
88 template<typename InstanceProfileNameT = Aws::String>
89 void SetInstanceProfileName(InstanceProfileNameT&& value) { m_instanceProfileNameHasBeenSet = true; m_instanceProfileName = std::forward<InstanceProfileNameT>(value); }
90 template<typename InstanceProfileNameT = Aws::String>
91 CreateInfrastructureConfigurationRequest& WithInstanceProfileName(InstanceProfileNameT&& value) { SetInstanceProfileName(std::forward<InstanceProfileNameT>(value)); return *this;}
93
95
99 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
100 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
101 template<typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
102 void SetSecurityGroupIds(SecurityGroupIdsT&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = std::forward<SecurityGroupIdsT>(value); }
103 template<typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
104 CreateInfrastructureConfigurationRequest& WithSecurityGroupIds(SecurityGroupIdsT&& value) { SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value)); return *this;}
105 template<typename SecurityGroupIdsT = Aws::String>
106 CreateInfrastructureConfigurationRequest& AddSecurityGroupIds(SecurityGroupIdsT&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value)); return *this; }
108
110
114 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
115 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
116 template<typename SubnetIdT = Aws::String>
117 void SetSubnetId(SubnetIdT&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::forward<SubnetIdT>(value); }
118 template<typename SubnetIdT = Aws::String>
119 CreateInfrastructureConfigurationRequest& WithSubnetId(SubnetIdT&& value) { SetSubnetId(std::forward<SubnetIdT>(value)); return *this;}
121
123
126 inline const Logging& GetLogging() const { return m_logging; }
127 inline bool LoggingHasBeenSet() const { return m_loggingHasBeenSet; }
128 template<typename LoggingT = Logging>
129 void SetLogging(LoggingT&& value) { m_loggingHasBeenSet = true; m_logging = std::forward<LoggingT>(value); }
130 template<typename LoggingT = Logging>
131 CreateInfrastructureConfigurationRequest& WithLogging(LoggingT&& value) { SetLogging(std::forward<LoggingT>(value)); return *this;}
133
135
139 inline const Aws::String& GetKeyPair() const { return m_keyPair; }
140 inline bool KeyPairHasBeenSet() const { return m_keyPairHasBeenSet; }
141 template<typename KeyPairT = Aws::String>
142 void SetKeyPair(KeyPairT&& value) { m_keyPairHasBeenSet = true; m_keyPair = std::forward<KeyPairT>(value); }
143 template<typename KeyPairT = Aws::String>
144 CreateInfrastructureConfigurationRequest& WithKeyPair(KeyPairT&& value) { SetKeyPair(std::forward<KeyPairT>(value)); return *this;}
146
148
154 inline bool GetTerminateInstanceOnFailure() const { return m_terminateInstanceOnFailure; }
155 inline bool TerminateInstanceOnFailureHasBeenSet() const { return m_terminateInstanceOnFailureHasBeenSet; }
156 inline void SetTerminateInstanceOnFailure(bool value) { m_terminateInstanceOnFailureHasBeenSet = true; m_terminateInstanceOnFailure = value; }
159
161
168 inline const Aws::String& GetSnsTopicArn() const { return m_snsTopicArn; }
169 inline bool SnsTopicArnHasBeenSet() const { return m_snsTopicArnHasBeenSet; }
170 template<typename SnsTopicArnT = Aws::String>
171 void SetSnsTopicArn(SnsTopicArnT&& value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn = std::forward<SnsTopicArnT>(value); }
172 template<typename SnsTopicArnT = Aws::String>
173 CreateInfrastructureConfigurationRequest& WithSnsTopicArn(SnsTopicArnT&& value) { SetSnsTopicArn(std::forward<SnsTopicArnT>(value)); return *this;}
175
177
181 inline const Aws::Map<Aws::String, Aws::String>& GetResourceTags() const { return m_resourceTags; }
182 inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; }
183 template<typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
184 void SetResourceTags(ResourceTagsT&& value) { m_resourceTagsHasBeenSet = true; m_resourceTags = std::forward<ResourceTagsT>(value); }
185 template<typename ResourceTagsT = Aws::Map<Aws::String, Aws::String>>
186 CreateInfrastructureConfigurationRequest& WithResourceTags(ResourceTagsT&& value) { SetResourceTags(std::forward<ResourceTagsT>(value)); return *this;}
187 template<typename ResourceTagsKeyT = Aws::String, typename ResourceTagsValueT = Aws::String>
188 CreateInfrastructureConfigurationRequest& AddResourceTags(ResourceTagsKeyT&& key, ResourceTagsValueT&& value) {
189 m_resourceTagsHasBeenSet = true; m_resourceTags.emplace(std::forward<ResourceTagsKeyT>(key), std::forward<ResourceTagsValueT>(value)); return *this;
190 }
192
194
198 inline const InstanceMetadataOptions& GetInstanceMetadataOptions() const { return m_instanceMetadataOptions; }
199 inline bool InstanceMetadataOptionsHasBeenSet() const { return m_instanceMetadataOptionsHasBeenSet; }
200 template<typename InstanceMetadataOptionsT = InstanceMetadataOptions>
201 void SetInstanceMetadataOptions(InstanceMetadataOptionsT&& value) { m_instanceMetadataOptionsHasBeenSet = true; m_instanceMetadataOptions = std::forward<InstanceMetadataOptionsT>(value); }
202 template<typename InstanceMetadataOptionsT = InstanceMetadataOptions>
203 CreateInfrastructureConfigurationRequest& WithInstanceMetadataOptions(InstanceMetadataOptionsT&& value) { SetInstanceMetadataOptions(std::forward<InstanceMetadataOptionsT>(value)); return *this;}
205
207
211 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
212 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
213 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
214 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
215 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
216 CreateInfrastructureConfigurationRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
217 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
218 CreateInfrastructureConfigurationRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
219 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
220 }
222
224
228 inline const Placement& GetPlacement() const { return m_placement; }
229 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
230 template<typename PlacementT = Placement>
231 void SetPlacement(PlacementT&& value) { m_placementHasBeenSet = true; m_placement = std::forward<PlacementT>(value); }
232 template<typename PlacementT = Placement>
233 CreateInfrastructureConfigurationRequest& WithPlacement(PlacementT&& value) { SetPlacement(std::forward<PlacementT>(value)); return *this;}
235
237
243 inline const Aws::String& GetClientToken() const { return m_clientToken; }
244 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
245 template<typename ClientTokenT = Aws::String>
246 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
247 template<typename ClientTokenT = Aws::String>
248 CreateInfrastructureConfigurationRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
250 private:
251
252 Aws::String m_name;
253 bool m_nameHasBeenSet = false;
254
255 Aws::String m_description;
256 bool m_descriptionHasBeenSet = false;
257
258 Aws::Vector<Aws::String> m_instanceTypes;
259 bool m_instanceTypesHasBeenSet = false;
260
261 Aws::String m_instanceProfileName;
262 bool m_instanceProfileNameHasBeenSet = false;
263
264 Aws::Vector<Aws::String> m_securityGroupIds;
265 bool m_securityGroupIdsHasBeenSet = false;
266
267 Aws::String m_subnetId;
268 bool m_subnetIdHasBeenSet = false;
269
270 Logging m_logging;
271 bool m_loggingHasBeenSet = false;
272
273 Aws::String m_keyPair;
274 bool m_keyPairHasBeenSet = false;
275
276 bool m_terminateInstanceOnFailure{false};
277 bool m_terminateInstanceOnFailureHasBeenSet = false;
278
279 Aws::String m_snsTopicArn;
280 bool m_snsTopicArnHasBeenSet = false;
281
283 bool m_resourceTagsHasBeenSet = false;
284
285 InstanceMetadataOptions m_instanceMetadataOptions;
286 bool m_instanceMetadataOptionsHasBeenSet = false;
287
289 bool m_tagsHasBeenSet = false;
290
291 Placement m_placement;
292 bool m_placementHasBeenSet = false;
293
295 bool m_clientTokenHasBeenSet = true;
296 };
297
298} // namespace Model
299} // namespace imagebuilder
300} // 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