AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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
43 inline const Aws::String& GetImageRecipeArn() const { return m_imageRecipeArn; }
44 inline bool ImageRecipeArnHasBeenSet() const { return m_imageRecipeArnHasBeenSet; }
45 template <typename ImageRecipeArnT = Aws::String>
46 void SetImageRecipeArn(ImageRecipeArnT&& value) {
47 m_imageRecipeArnHasBeenSet = true;
48 m_imageRecipeArn = std::forward<ImageRecipeArnT>(value);
49 }
50 template <typename ImageRecipeArnT = Aws::String>
51 CreateImageRequest& WithImageRecipeArn(ImageRecipeArnT&& value) {
52 SetImageRecipeArn(std::forward<ImageRecipeArnT>(value));
53 return *this;
54 }
56
58
62 inline const Aws::String& GetContainerRecipeArn() const { return m_containerRecipeArn; }
63 inline bool ContainerRecipeArnHasBeenSet() const { return m_containerRecipeArnHasBeenSet; }
64 template <typename ContainerRecipeArnT = Aws::String>
65 void SetContainerRecipeArn(ContainerRecipeArnT&& value) {
66 m_containerRecipeArnHasBeenSet = true;
67 m_containerRecipeArn = std::forward<ContainerRecipeArnT>(value);
68 }
69 template <typename ContainerRecipeArnT = Aws::String>
70 CreateImageRequest& WithContainerRecipeArn(ContainerRecipeArnT&& value) {
71 SetContainerRecipeArn(std::forward<ContainerRecipeArnT>(value));
72 return *this;
73 }
75
77
81 inline const Aws::String& GetDistributionConfigurationArn() const { return m_distributionConfigurationArn; }
82 inline bool DistributionConfigurationArnHasBeenSet() const { return m_distributionConfigurationArnHasBeenSet; }
83 template <typename DistributionConfigurationArnT = Aws::String>
84 void SetDistributionConfigurationArn(DistributionConfigurationArnT&& value) {
85 m_distributionConfigurationArnHasBeenSet = true;
86 m_distributionConfigurationArn = std::forward<DistributionConfigurationArnT>(value);
87 }
88 template <typename DistributionConfigurationArnT = Aws::String>
89 CreateImageRequest& WithDistributionConfigurationArn(DistributionConfigurationArnT&& value) {
90 SetDistributionConfigurationArn(std::forward<DistributionConfigurationArnT>(value));
91 return *this;
92 }
94
96
100 inline const Aws::String& GetInfrastructureConfigurationArn() const { return m_infrastructureConfigurationArn; }
101 inline bool InfrastructureConfigurationArnHasBeenSet() const { return m_infrastructureConfigurationArnHasBeenSet; }
102 template <typename InfrastructureConfigurationArnT = Aws::String>
103 void SetInfrastructureConfigurationArn(InfrastructureConfigurationArnT&& value) {
104 m_infrastructureConfigurationArnHasBeenSet = true;
105 m_infrastructureConfigurationArn = std::forward<InfrastructureConfigurationArnT>(value);
106 }
107 template <typename InfrastructureConfigurationArnT = Aws::String>
108 CreateImageRequest& WithInfrastructureConfigurationArn(InfrastructureConfigurationArnT&& value) {
109 SetInfrastructureConfigurationArn(std::forward<InfrastructureConfigurationArnT>(value));
110 return *this;
111 }
113
115
118 inline const ImageTestsConfiguration& GetImageTestsConfiguration() const { return m_imageTestsConfiguration; }
119 inline bool ImageTestsConfigurationHasBeenSet() const { return m_imageTestsConfigurationHasBeenSet; }
120 template <typename ImageTestsConfigurationT = ImageTestsConfiguration>
121 void SetImageTestsConfiguration(ImageTestsConfigurationT&& value) {
122 m_imageTestsConfigurationHasBeenSet = true;
123 m_imageTestsConfiguration = std::forward<ImageTestsConfigurationT>(value);
124 }
125 template <typename ImageTestsConfigurationT = ImageTestsConfiguration>
126 CreateImageRequest& WithImageTestsConfiguration(ImageTestsConfigurationT&& value) {
127 SetImageTestsConfiguration(std::forward<ImageTestsConfigurationT>(value));
128 return *this;
129 }
131
133
139 inline bool GetEnhancedImageMetadataEnabled() const { return m_enhancedImageMetadataEnabled; }
140 inline bool EnhancedImageMetadataEnabledHasBeenSet() const { return m_enhancedImageMetadataEnabledHasBeenSet; }
141 inline void SetEnhancedImageMetadataEnabled(bool value) {
142 m_enhancedImageMetadataEnabledHasBeenSet = true;
143 m_enhancedImageMetadataEnabled = value;
144 }
147 return *this;
148 }
150
152
155 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
156 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
157 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
158 void SetTags(TagsT&& value) {
159 m_tagsHasBeenSet = true;
160 m_tags = std::forward<TagsT>(value);
161 }
162 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
163 CreateImageRequest& WithTags(TagsT&& value) {
164 SetTags(std::forward<TagsT>(value));
165 return *this;
166 }
167 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
168 CreateImageRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
169 m_tagsHasBeenSet = true;
170 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
171 return *this;
172 }
174
176
182 inline const Aws::String& GetClientToken() const { return m_clientToken; }
183 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
184 template <typename ClientTokenT = Aws::String>
185 void SetClientToken(ClientTokenT&& value) {
186 m_clientTokenHasBeenSet = true;
187 m_clientToken = std::forward<ClientTokenT>(value);
188 }
189 template <typename ClientTokenT = Aws::String>
190 CreateImageRequest& WithClientToken(ClientTokenT&& value) {
191 SetClientToken(std::forward<ClientTokenT>(value));
192 return *this;
193 }
195
197
200 inline const ImageScanningConfiguration& GetImageScanningConfiguration() const { return m_imageScanningConfiguration; }
201 inline bool ImageScanningConfigurationHasBeenSet() const { return m_imageScanningConfigurationHasBeenSet; }
202 template <typename ImageScanningConfigurationT = ImageScanningConfiguration>
203 void SetImageScanningConfiguration(ImageScanningConfigurationT&& value) {
204 m_imageScanningConfigurationHasBeenSet = true;
205 m_imageScanningConfiguration = std::forward<ImageScanningConfigurationT>(value);
206 }
207 template <typename ImageScanningConfigurationT = ImageScanningConfiguration>
208 CreateImageRequest& WithImageScanningConfiguration(ImageScanningConfigurationT&& value) {
209 SetImageScanningConfiguration(std::forward<ImageScanningConfigurationT>(value));
210 return *this;
211 }
213
215
218 inline const Aws::Vector<WorkflowConfiguration>& GetWorkflows() const { return m_workflows; }
219 inline bool WorkflowsHasBeenSet() const { return m_workflowsHasBeenSet; }
220 template <typename WorkflowsT = Aws::Vector<WorkflowConfiguration>>
221 void SetWorkflows(WorkflowsT&& value) {
222 m_workflowsHasBeenSet = true;
223 m_workflows = std::forward<WorkflowsT>(value);
224 }
225 template <typename WorkflowsT = Aws::Vector<WorkflowConfiguration>>
226 CreateImageRequest& WithWorkflows(WorkflowsT&& value) {
227 SetWorkflows(std::forward<WorkflowsT>(value));
228 return *this;
229 }
230 template <typename WorkflowsT = WorkflowConfiguration>
231 CreateImageRequest& AddWorkflows(WorkflowsT&& value) {
232 m_workflowsHasBeenSet = true;
233 m_workflows.emplace_back(std::forward<WorkflowsT>(value));
234 return *this;
235 }
237
239
243 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
244 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
245 template <typename ExecutionRoleT = Aws::String>
246 void SetExecutionRole(ExecutionRoleT&& value) {
247 m_executionRoleHasBeenSet = true;
248 m_executionRole = std::forward<ExecutionRoleT>(value);
249 }
250 template <typename ExecutionRoleT = Aws::String>
251 CreateImageRequest& WithExecutionRole(ExecutionRoleT&& value) {
252 SetExecutionRole(std::forward<ExecutionRoleT>(value));
253 return *this;
254 }
256
258
261 inline const ImageLoggingConfiguration& GetLoggingConfiguration() const { return m_loggingConfiguration; }
262 inline bool LoggingConfigurationHasBeenSet() const { return m_loggingConfigurationHasBeenSet; }
263 template <typename LoggingConfigurationT = ImageLoggingConfiguration>
264 void SetLoggingConfiguration(LoggingConfigurationT&& value) {
265 m_loggingConfigurationHasBeenSet = true;
266 m_loggingConfiguration = std::forward<LoggingConfigurationT>(value);
267 }
268 template <typename LoggingConfigurationT = ImageLoggingConfiguration>
269 CreateImageRequest& WithLoggingConfiguration(LoggingConfigurationT&& value) {
270 SetLoggingConfiguration(std::forward<LoggingConfigurationT>(value));
271 return *this;
272 }
274 private:
275 Aws::String m_imageRecipeArn;
276
277 Aws::String m_containerRecipeArn;
278
279 Aws::String m_distributionConfigurationArn;
280
281 Aws::String m_infrastructureConfigurationArn;
282
283 ImageTestsConfiguration m_imageTestsConfiguration;
284
285 bool m_enhancedImageMetadataEnabled{false};
286
288
290
291 ImageScanningConfiguration m_imageScanningConfiguration;
292
294
295 Aws::String m_executionRole;
296
297 ImageLoggingConfiguration m_loggingConfiguration;
298 bool m_imageRecipeArnHasBeenSet = false;
299 bool m_containerRecipeArnHasBeenSet = false;
300 bool m_distributionConfigurationArnHasBeenSet = false;
301 bool m_infrastructureConfigurationArnHasBeenSet = false;
302 bool m_imageTestsConfigurationHasBeenSet = false;
303 bool m_enhancedImageMetadataEnabledHasBeenSet = false;
304 bool m_tagsHasBeenSet = false;
305 bool m_clientTokenHasBeenSet = true;
306 bool m_imageScanningConfigurationHasBeenSet = false;
307 bool m_workflowsHasBeenSet = false;
308 bool m_executionRoleHasBeenSet = false;
309 bool m_loggingConfigurationHasBeenSet = false;
310};
311
312} // namespace Model
313} // namespace imagebuilder
314} // 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