AWS SDK for C++

AWS SDK for C++ Version 1.11.901

Loading...
Searching...
No Matches
CreateImageRequest.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/ImageLoggingConfiguration.h>
14#include <aws/imagebuilder/model/ImageScanningConfiguration.h>
15#include <aws/imagebuilder/model/ImageTestsConfiguration.h>
16#include <aws/imagebuilder/model/WorkflowConfiguration.h>
17
18#include <utility>
19
20namespace Aws {
21namespace imagebuilder {
22namespace Model {
23
27 public:
28 AWS_IMAGEBUILDER_API CreateImageRequest() = 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 "CreateImage"; }
35
36 AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override;
37
39
44 inline const Aws::String& GetImageRecipeArn() const { return m_imageRecipeArn; }
45 inline bool ImageRecipeArnHasBeenSet() const { return m_imageRecipeArnHasBeenSet; }
46 template <typename ImageRecipeArnT = Aws::String>
47 void SetImageRecipeArn(ImageRecipeArnT&& value) {
48 m_imageRecipeArnHasBeenSet = true;
49 m_imageRecipeArn = std::forward<ImageRecipeArnT>(value);
50 }
51 template <typename ImageRecipeArnT = Aws::String>
52 CreateImageRequest& WithImageRecipeArn(ImageRecipeArnT&& value) {
53 SetImageRecipeArn(std::forward<ImageRecipeArnT>(value));
54 return *this;
55 }
57
59
64 inline const Aws::String& GetContainerRecipeArn() const { return m_containerRecipeArn; }
65 inline bool ContainerRecipeArnHasBeenSet() const { return m_containerRecipeArnHasBeenSet; }
66 template <typename ContainerRecipeArnT = Aws::String>
67 void SetContainerRecipeArn(ContainerRecipeArnT&& value) {
68 m_containerRecipeArnHasBeenSet = true;
69 m_containerRecipeArn = std::forward<ContainerRecipeArnT>(value);
70 }
71 template <typename ContainerRecipeArnT = Aws::String>
72 CreateImageRequest& WithContainerRecipeArn(ContainerRecipeArnT&& value) {
73 SetContainerRecipeArn(std::forward<ContainerRecipeArnT>(value));
74 return *this;
75 }
77
79
85 inline const Aws::String& GetDistributionConfigurationArn() const { return m_distributionConfigurationArn; }
86 inline bool DistributionConfigurationArnHasBeenSet() const { return m_distributionConfigurationArnHasBeenSet; }
87 template <typename DistributionConfigurationArnT = Aws::String>
88 void SetDistributionConfigurationArn(DistributionConfigurationArnT&& value) {
89 m_distributionConfigurationArnHasBeenSet = true;
90 m_distributionConfigurationArn = std::forward<DistributionConfigurationArnT>(value);
91 }
92 template <typename DistributionConfigurationArnT = Aws::String>
93 CreateImageRequest& WithDistributionConfigurationArn(DistributionConfigurationArnT&& value) {
94 SetDistributionConfigurationArn(std::forward<DistributionConfigurationArnT>(value));
95 return *this;
96 }
98
100
104 inline const Aws::String& GetInfrastructureConfigurationArn() const { return m_infrastructureConfigurationArn; }
105 inline bool InfrastructureConfigurationArnHasBeenSet() const { return m_infrastructureConfigurationArnHasBeenSet; }
106 template <typename InfrastructureConfigurationArnT = Aws::String>
107 void SetInfrastructureConfigurationArn(InfrastructureConfigurationArnT&& value) {
108 m_infrastructureConfigurationArnHasBeenSet = true;
109 m_infrastructureConfigurationArn = std::forward<InfrastructureConfigurationArnT>(value);
110 }
111 template <typename InfrastructureConfigurationArnT = Aws::String>
112 CreateImageRequest& WithInfrastructureConfigurationArn(InfrastructureConfigurationArnT&& value) {
113 SetInfrastructureConfigurationArn(std::forward<InfrastructureConfigurationArnT>(value));
114 return *this;
115 }
117
119
123 inline const ImageTestsConfiguration& GetImageTestsConfiguration() const { return m_imageTestsConfiguration; }
124 inline bool ImageTestsConfigurationHasBeenSet() const { return m_imageTestsConfigurationHasBeenSet; }
125 template <typename ImageTestsConfigurationT = ImageTestsConfiguration>
126 void SetImageTestsConfiguration(ImageTestsConfigurationT&& value) {
127 m_imageTestsConfigurationHasBeenSet = true;
128 m_imageTestsConfiguration = std::forward<ImageTestsConfigurationT>(value);
129 }
130 template <typename ImageTestsConfigurationT = ImageTestsConfiguration>
131 CreateImageRequest& WithImageTestsConfiguration(ImageTestsConfigurationT&& value) {
132 SetImageTestsConfiguration(std::forward<ImageTestsConfigurationT>(value));
133 return *this;
134 }
136
138
143 inline bool GetEnhancedImageMetadataEnabled() const { return m_enhancedImageMetadataEnabled; }
144 inline bool EnhancedImageMetadataEnabledHasBeenSet() const { return m_enhancedImageMetadataEnabledHasBeenSet; }
145 inline void SetEnhancedImageMetadataEnabled(bool value) {
146 m_enhancedImageMetadataEnabledHasBeenSet = true;
147 m_enhancedImageMetadataEnabled = value;
148 }
151 return *this;
152 }
154
156
159 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
160 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
161 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
162 void SetTags(TagsT&& value) {
163 m_tagsHasBeenSet = true;
164 m_tags = std::forward<TagsT>(value);
165 }
166 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
167 CreateImageRequest& WithTags(TagsT&& value) {
168 SetTags(std::forward<TagsT>(value));
169 return *this;
170 }
171 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
172 CreateImageRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
173 m_tagsHasBeenSet = true;
174 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
175 return *this;
176 }
178
180
188 inline const Aws::String& GetClientToken() const { return m_clientToken; }
189 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
190 template <typename ClientTokenT = Aws::String>
191 void SetClientToken(ClientTokenT&& value) {
192 m_clientTokenHasBeenSet = true;
193 m_clientToken = std::forward<ClientTokenT>(value);
194 }
195 template <typename ClientTokenT = Aws::String>
196 CreateImageRequest& WithClientToken(ClientTokenT&& value) {
197 SetClientToken(std::forward<ClientTokenT>(value));
198 return *this;
199 }
201
203
210 inline const ImageScanningConfiguration& GetImageScanningConfiguration() const { return m_imageScanningConfiguration; }
211 inline bool ImageScanningConfigurationHasBeenSet() const { return m_imageScanningConfigurationHasBeenSet; }
212 template <typename ImageScanningConfigurationT = ImageScanningConfiguration>
213 void SetImageScanningConfiguration(ImageScanningConfigurationT&& value) {
214 m_imageScanningConfigurationHasBeenSet = true;
215 m_imageScanningConfiguration = std::forward<ImageScanningConfigurationT>(value);
216 }
217 template <typename ImageScanningConfigurationT = ImageScanningConfiguration>
218 CreateImageRequest& WithImageScanningConfiguration(ImageScanningConfigurationT&& value) {
219 SetImageScanningConfiguration(std::forward<ImageScanningConfigurationT>(value));
220 return *this;
221 }
223
225
230 inline const Aws::Vector<WorkflowConfiguration>& GetWorkflows() const { return m_workflows; }
231 inline bool WorkflowsHasBeenSet() const { return m_workflowsHasBeenSet; }
232 template <typename WorkflowsT = Aws::Vector<WorkflowConfiguration>>
233 void SetWorkflows(WorkflowsT&& value) {
234 m_workflowsHasBeenSet = true;
235 m_workflows = std::forward<WorkflowsT>(value);
236 }
237 template <typename WorkflowsT = Aws::Vector<WorkflowConfiguration>>
238 CreateImageRequest& WithWorkflows(WorkflowsT&& value) {
239 SetWorkflows(std::forward<WorkflowsT>(value));
240 return *this;
241 }
242 template <typename WorkflowsT = WorkflowConfiguration>
243 CreateImageRequest& AddWorkflows(WorkflowsT&& value) {
244 m_workflowsHasBeenSet = true;
245 m_workflows.emplace_back(std::forward<WorkflowsT>(value));
246 return *this;
247 }
249
251
258 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
259 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
260 template <typename ExecutionRoleT = Aws::String>
261 void SetExecutionRole(ExecutionRoleT&& value) {
262 m_executionRoleHasBeenSet = true;
263 m_executionRole = std::forward<ExecutionRoleT>(value);
264 }
265 template <typename ExecutionRoleT = Aws::String>
266 CreateImageRequest& WithExecutionRole(ExecutionRoleT&& value) {
267 SetExecutionRole(std::forward<ExecutionRoleT>(value));
268 return *this;
269 }
271
273
279 inline const ImageLoggingConfiguration& GetLoggingConfiguration() const { return m_loggingConfiguration; }
280 inline bool LoggingConfigurationHasBeenSet() const { return m_loggingConfigurationHasBeenSet; }
281 template <typename LoggingConfigurationT = ImageLoggingConfiguration>
282 void SetLoggingConfiguration(LoggingConfigurationT&& value) {
283 m_loggingConfigurationHasBeenSet = true;
284 m_loggingConfiguration = std::forward<LoggingConfigurationT>(value);
285 }
286 template <typename LoggingConfigurationT = ImageLoggingConfiguration>
287 CreateImageRequest& WithLoggingConfiguration(LoggingConfigurationT&& value) {
288 SetLoggingConfiguration(std::forward<LoggingConfigurationT>(value));
289 return *this;
290 }
292 private:
293 Aws::String m_imageRecipeArn;
294
295 Aws::String m_containerRecipeArn;
296
297 Aws::String m_distributionConfigurationArn;
298
299 Aws::String m_infrastructureConfigurationArn;
300
301 ImageTestsConfiguration m_imageTestsConfiguration;
302
303 bool m_enhancedImageMetadataEnabled{false};
304
306
308
309 ImageScanningConfiguration m_imageScanningConfiguration;
310
312
313 Aws::String m_executionRole;
314
315 ImageLoggingConfiguration m_loggingConfiguration;
316 bool m_imageRecipeArnHasBeenSet = false;
317 bool m_containerRecipeArnHasBeenSet = false;
318 bool m_distributionConfigurationArnHasBeenSet = false;
319 bool m_infrastructureConfigurationArnHasBeenSet = false;
320 bool m_imageTestsConfigurationHasBeenSet = false;
321 bool m_enhancedImageMetadataEnabledHasBeenSet = false;
322 bool m_tagsHasBeenSet = false;
323 bool m_clientTokenHasBeenSet = true;
324 bool m_imageScanningConfigurationHasBeenSet = false;
325 bool m_workflowsHasBeenSet = false;
326 bool m_executionRoleHasBeenSet = false;
327 bool m_loggingConfigurationHasBeenSet = false;
328};
329
330} // namespace Model
331} // namespace imagebuilder
332} // namespace Aws
static Aws::Utils::UUID PseudoRandomUUID()
CreateImageRequest & WithImageTestsConfiguration(ImageTestsConfigurationT &&value)
CreateImageRequest & WithWorkflows(WorkflowsT &&value)
CreateImageRequest & WithClientToken(ClientTokenT &&value)
AWS_IMAGEBUILDER_API CreateImageRequest()=default
const Aws::Vector< WorkflowConfiguration > & GetWorkflows() const
AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override
const Aws::String & GetInfrastructureConfigurationArn() const
void SetImageTestsConfiguration(ImageTestsConfigurationT &&value)
void SetLoggingConfiguration(LoggingConfigurationT &&value)
void SetDistributionConfigurationArn(DistributionConfigurationArnT &&value)
const ImageTestsConfiguration & GetImageTestsConfiguration() const
virtual const char * GetServiceRequestName() const override
CreateImageRequest & WithLoggingConfiguration(LoggingConfigurationT &&value)
CreateImageRequest & WithImageScanningConfiguration(ImageScanningConfigurationT &&value)
void SetContainerRecipeArn(ContainerRecipeArnT &&value)
const ImageLoggingConfiguration & GetLoggingConfiguration() const
void SetImageRecipeArn(ImageRecipeArnT &&value)
CreateImageRequest & WithContainerRecipeArn(ContainerRecipeArnT &&value)
CreateImageRequest & AddWorkflows(WorkflowsT &&value)
void SetImageScanningConfiguration(ImageScanningConfigurationT &&value)
CreateImageRequest & WithExecutionRole(ExecutionRoleT &&value)
CreateImageRequest & WithEnhancedImageMetadataEnabled(bool value)
CreateImageRequest & WithInfrastructureConfigurationArn(InfrastructureConfigurationArnT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
void SetInfrastructureConfigurationArn(InfrastructureConfigurationArnT &&value)
const Aws::String & GetContainerRecipeArn() const
const ImageScanningConfiguration & GetImageScanningConfiguration() const
CreateImageRequest & WithTags(TagsT &&value)
CreateImageRequest & WithImageRecipeArn(ImageRecipeArnT &&value)
CreateImageRequest & WithDistributionConfigurationArn(DistributionConfigurationArnT &&value)
const Aws::String & GetDistributionConfigurationArn() const
CreateImageRequest & AddTags(TagsKeyT &&key, TagsValueT &&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