aws_sdk_imagebuilder/operation/update_image_pipeline/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_image_pipeline::_update_image_pipeline_output::UpdateImagePipelineOutputBuilder;
3
4pub use crate::operation::update_image_pipeline::_update_image_pipeline_input::UpdateImagePipelineInputBuilder;
5
6impl crate::operation::update_image_pipeline::builders::UpdateImagePipelineInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_image_pipeline::UpdateImagePipelineOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_image_pipeline::UpdateImagePipelineError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_image_pipeline();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateImagePipeline`.
24///
25/// <p>Updates an image pipeline. Image pipelines enable you to automate the creation and distribution of images. You must specify exactly one recipe for your image, using either a <code>containerRecipeArn</code> or an <code>imageRecipeArn</code>.</p><note>
26/// <p>UpdateImagePipeline does not support selective updates for the pipeline. You must specify all of the required properties in the update request, not just the properties that have changed.</p>
27/// </note>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct UpdateImagePipelineFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::update_image_pipeline::builders::UpdateImagePipelineInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::update_image_pipeline::UpdateImagePipelineOutput,
37        crate::operation::update_image_pipeline::UpdateImagePipelineError,
38    > for UpdateImagePipelineFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::update_image_pipeline::UpdateImagePipelineOutput,
46            crate::operation::update_image_pipeline::UpdateImagePipelineError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl UpdateImagePipelineFluentBuilder {
53    /// Creates a new `UpdateImagePipelineFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the UpdateImagePipeline as a reference.
62    pub fn as_input(&self) -> &crate::operation::update_image_pipeline::builders::UpdateImagePipelineInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::update_image_pipeline::UpdateImagePipelineOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::update_image_pipeline::UpdateImagePipelineError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins = crate::operation::update_image_pipeline::UpdateImagePipeline::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::update_image_pipeline::UpdateImagePipeline::orchestrate(&runtime_plugins, input).await
92    }
93
94    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95    pub fn customize(
96        self,
97    ) -> crate::client::customize::CustomizableOperation<
98        crate::operation::update_image_pipeline::UpdateImagePipelineOutput,
99        crate::operation::update_image_pipeline::UpdateImagePipelineError,
100        Self,
101    > {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// <p>The Amazon Resource Name (ARN) of the image pipeline that you want to update.</p>
114    pub fn image_pipeline_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.inner = self.inner.image_pipeline_arn(input.into());
116        self
117    }
118    /// <p>The Amazon Resource Name (ARN) of the image pipeline that you want to update.</p>
119    pub fn set_image_pipeline_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.inner = self.inner.set_image_pipeline_arn(input);
121        self
122    }
123    /// <p>The Amazon Resource Name (ARN) of the image pipeline that you want to update.</p>
124    pub fn get_image_pipeline_arn(&self) -> &::std::option::Option<::std::string::String> {
125        self.inner.get_image_pipeline_arn()
126    }
127    /// <p>The description of the image pipeline.</p>
128    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.description(input.into());
130        self
131    }
132    /// <p>The description of the image pipeline.</p>
133    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_description(input);
135        self
136    }
137    /// <p>The description of the image pipeline.</p>
138    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_description()
140    }
141    /// <p>The Amazon Resource Name (ARN) of the image recipe that will be used to configure images updated by this image pipeline.</p>
142    pub fn image_recipe_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.image_recipe_arn(input.into());
144        self
145    }
146    /// <p>The Amazon Resource Name (ARN) of the image recipe that will be used to configure images updated by this image pipeline.</p>
147    pub fn set_image_recipe_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.inner = self.inner.set_image_recipe_arn(input);
149        self
150    }
151    /// <p>The Amazon Resource Name (ARN) of the image recipe that will be used to configure images updated by this image pipeline.</p>
152    pub fn get_image_recipe_arn(&self) -> &::std::option::Option<::std::string::String> {
153        self.inner.get_image_recipe_arn()
154    }
155    /// <p>The Amazon Resource Name (ARN) of the container pipeline to update.</p>
156    pub fn container_recipe_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.inner = self.inner.container_recipe_arn(input.into());
158        self
159    }
160    /// <p>The Amazon Resource Name (ARN) of the container pipeline to update.</p>
161    pub fn set_container_recipe_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.inner = self.inner.set_container_recipe_arn(input);
163        self
164    }
165    /// <p>The Amazon Resource Name (ARN) of the container pipeline to update.</p>
166    pub fn get_container_recipe_arn(&self) -> &::std::option::Option<::std::string::String> {
167        self.inner.get_container_recipe_arn()
168    }
169    /// <p>The Amazon Resource Name (ARN) of the infrastructure configuration that Image Builder uses to build images that this image pipeline has updated.</p>
170    pub fn infrastructure_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.inner = self.inner.infrastructure_configuration_arn(input.into());
172        self
173    }
174    /// <p>The Amazon Resource Name (ARN) of the infrastructure configuration that Image Builder uses to build images that this image pipeline has updated.</p>
175    pub fn set_infrastructure_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.inner = self.inner.set_infrastructure_configuration_arn(input);
177        self
178    }
179    /// <p>The Amazon Resource Name (ARN) of the infrastructure configuration that Image Builder uses to build images that this image pipeline has updated.</p>
180    pub fn get_infrastructure_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
181        self.inner.get_infrastructure_configuration_arn()
182    }
183    /// <p>The Amazon Resource Name (ARN) of the distribution configuration that Image Builder uses to configure and distribute images that this image pipeline has updated.</p>
184    pub fn distribution_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.inner = self.inner.distribution_configuration_arn(input.into());
186        self
187    }
188    /// <p>The Amazon Resource Name (ARN) of the distribution configuration that Image Builder uses to configure and distribute images that this image pipeline has updated.</p>
189    pub fn set_distribution_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.inner = self.inner.set_distribution_configuration_arn(input);
191        self
192    }
193    /// <p>The Amazon Resource Name (ARN) of the distribution configuration that Image Builder uses to configure and distribute images that this image pipeline has updated.</p>
194    pub fn get_distribution_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
195        self.inner.get_distribution_configuration_arn()
196    }
197    /// <p>The image test configuration of the image pipeline.</p>
198    pub fn image_tests_configuration(mut self, input: crate::types::ImageTestsConfiguration) -> Self {
199        self.inner = self.inner.image_tests_configuration(input);
200        self
201    }
202    /// <p>The image test configuration of the image pipeline.</p>
203    pub fn set_image_tests_configuration(mut self, input: ::std::option::Option<crate::types::ImageTestsConfiguration>) -> Self {
204        self.inner = self.inner.set_image_tests_configuration(input);
205        self
206    }
207    /// <p>The image test configuration of the image pipeline.</p>
208    pub fn get_image_tests_configuration(&self) -> &::std::option::Option<crate::types::ImageTestsConfiguration> {
209        self.inner.get_image_tests_configuration()
210    }
211    /// <p>Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.</p>
212    pub fn enhanced_image_metadata_enabled(mut self, input: bool) -> Self {
213        self.inner = self.inner.enhanced_image_metadata_enabled(input);
214        self
215    }
216    /// <p>Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.</p>
217    pub fn set_enhanced_image_metadata_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
218        self.inner = self.inner.set_enhanced_image_metadata_enabled(input);
219        self
220    }
221    /// <p>Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.</p>
222    pub fn get_enhanced_image_metadata_enabled(&self) -> &::std::option::Option<bool> {
223        self.inner.get_enhanced_image_metadata_enabled()
224    }
225    /// <p>The schedule of the image pipeline.</p>
226    pub fn schedule(mut self, input: crate::types::Schedule) -> Self {
227        self.inner = self.inner.schedule(input);
228        self
229    }
230    /// <p>The schedule of the image pipeline.</p>
231    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::Schedule>) -> Self {
232        self.inner = self.inner.set_schedule(input);
233        self
234    }
235    /// <p>The schedule of the image pipeline.</p>
236    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::Schedule> {
237        self.inner.get_schedule()
238    }
239    /// <p>The status of the image pipeline.</p>
240    pub fn status(mut self, input: crate::types::PipelineStatus) -> Self {
241        self.inner = self.inner.status(input);
242        self
243    }
244    /// <p>The status of the image pipeline.</p>
245    pub fn set_status(mut self, input: ::std::option::Option<crate::types::PipelineStatus>) -> Self {
246        self.inner = self.inner.set_status(input);
247        self
248    }
249    /// <p>The status of the image pipeline.</p>
250    pub fn get_status(&self) -> &::std::option::Option<crate::types::PipelineStatus> {
251        self.inner.get_status()
252    }
253    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
254    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255        self.inner = self.inner.client_token(input.into());
256        self
257    }
258    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
259    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260        self.inner = self.inner.set_client_token(input);
261        self
262    }
263    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
264    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
265        self.inner.get_client_token()
266    }
267    /// <p>Contains settings for vulnerability scans.</p>
268    pub fn image_scanning_configuration(mut self, input: crate::types::ImageScanningConfiguration) -> Self {
269        self.inner = self.inner.image_scanning_configuration(input);
270        self
271    }
272    /// <p>Contains settings for vulnerability scans.</p>
273    pub fn set_image_scanning_configuration(mut self, input: ::std::option::Option<crate::types::ImageScanningConfiguration>) -> Self {
274        self.inner = self.inner.set_image_scanning_configuration(input);
275        self
276    }
277    /// <p>Contains settings for vulnerability scans.</p>
278    pub fn get_image_scanning_configuration(&self) -> &::std::option::Option<crate::types::ImageScanningConfiguration> {
279        self.inner.get_image_scanning_configuration()
280    }
281    ///
282    /// Appends an item to `workflows`.
283    ///
284    /// To override the contents of this collection use [`set_workflows`](Self::set_workflows).
285    ///
286    /// <p>Contains the workflows to run for the pipeline.</p>
287    pub fn workflows(mut self, input: crate::types::WorkflowConfiguration) -> Self {
288        self.inner = self.inner.workflows(input);
289        self
290    }
291    /// <p>Contains the workflows to run for the pipeline.</p>
292    pub fn set_workflows(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::WorkflowConfiguration>>) -> Self {
293        self.inner = self.inner.set_workflows(input);
294        self
295    }
296    /// <p>Contains the workflows to run for the pipeline.</p>
297    pub fn get_workflows(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::WorkflowConfiguration>> {
298        self.inner.get_workflows()
299    }
300    /// <p>The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.</p>
301    pub fn execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
302        self.inner = self.inner.execution_role(input.into());
303        self
304    }
305    /// <p>The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.</p>
306    pub fn set_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
307        self.inner = self.inner.set_execution_role(input);
308        self
309    }
310    /// <p>The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.</p>
311    pub fn get_execution_role(&self) -> &::std::option::Option<::std::string::String> {
312        self.inner.get_execution_role()
313    }
314}