aws_sdk_pipes/operation/update_pipe/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_pipe::_update_pipe_output::UpdatePipeOutputBuilder;
3
4pub use crate::operation::update_pipe::_update_pipe_input::UpdatePipeInputBuilder;
5
6impl crate::operation::update_pipe::builders::UpdatePipeInputBuilder {
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_pipe::UpdatePipeOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_pipe::UpdatePipeError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_pipe();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdatePipe`.
24///
25/// <p>Update an existing pipe. When you call <code>UpdatePipe</code>, EventBridge only the updates fields you have specified in the request; the rest remain unchanged. The exception to this is if you modify any Amazon Web Services-service specific fields in the <code>SourceParameters</code>, <code>EnrichmentParameters</code>, or <code>TargetParameters</code> objects. For example, <code>DynamoDBStreamParameters</code> or <code>EventBridgeEventBusParameters</code>. EventBridge updates the fields in these objects atomically as one and overrides existing values. This is by design, and means that if you don't specify an optional field in one of these <code>Parameters</code> objects, EventBridge sets that field to its system-default value during the update.</p>
26/// <p>For more information about pipes, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html"> Amazon EventBridge Pipes</a> in the Amazon EventBridge User Guide.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdatePipeFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::update_pipe::builders::UpdatePipeInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::update_pipe::UpdatePipeOutput,
36        crate::operation::update_pipe::UpdatePipeError,
37    > for UpdatePipeFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::update_pipe::UpdatePipeOutput,
45            crate::operation::update_pipe::UpdatePipeError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl UpdatePipeFluentBuilder {
52    /// Creates a new `UpdatePipeFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the UpdatePipe as a reference.
61    pub fn as_input(&self) -> &crate::operation::update_pipe::builders::UpdatePipeInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::update_pipe::UpdatePipeOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::update_pipe::UpdatePipeError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::update_pipe::UpdatePipe::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::update_pipe::UpdatePipe::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::update_pipe::UpdatePipeOutput,
98        crate::operation::update_pipe::UpdatePipeError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The name of the pipe.</p>
113    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.name(input.into());
115        self
116    }
117    /// <p>The name of the pipe.</p>
118    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_name(input);
120        self
121    }
122    /// <p>The name of the pipe.</p>
123    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_name()
125    }
126    /// <p>A description of the pipe.</p>
127    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.description(input.into());
129        self
130    }
131    /// <p>A description of the pipe.</p>
132    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_description(input);
134        self
135    }
136    /// <p>A description of the pipe.</p>
137    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_description()
139    }
140    /// <p>The state the pipe should be in.</p>
141    pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
142        self.inner = self.inner.desired_state(input);
143        self
144    }
145    /// <p>The state the pipe should be in.</p>
146    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::RequestedPipeState>) -> Self {
147        self.inner = self.inner.set_desired_state(input);
148        self
149    }
150    /// <p>The state the pipe should be in.</p>
151    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::RequestedPipeState> {
152        self.inner.get_desired_state()
153    }
154    /// <p>The parameters required to set up a source for your pipe.</p>
155    pub fn source_parameters(mut self, input: crate::types::UpdatePipeSourceParameters) -> Self {
156        self.inner = self.inner.source_parameters(input);
157        self
158    }
159    /// <p>The parameters required to set up a source for your pipe.</p>
160    pub fn set_source_parameters(mut self, input: ::std::option::Option<crate::types::UpdatePipeSourceParameters>) -> Self {
161        self.inner = self.inner.set_source_parameters(input);
162        self
163    }
164    /// <p>The parameters required to set up a source for your pipe.</p>
165    pub fn get_source_parameters(&self) -> &::std::option::Option<crate::types::UpdatePipeSourceParameters> {
166        self.inner.get_source_parameters()
167    }
168    /// <p>The ARN of the enrichment resource.</p>
169    pub fn enrichment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170        self.inner = self.inner.enrichment(input.into());
171        self
172    }
173    /// <p>The ARN of the enrichment resource.</p>
174    pub fn set_enrichment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175        self.inner = self.inner.set_enrichment(input);
176        self
177    }
178    /// <p>The ARN of the enrichment resource.</p>
179    pub fn get_enrichment(&self) -> &::std::option::Option<::std::string::String> {
180        self.inner.get_enrichment()
181    }
182    /// <p>The parameters required to set up enrichment on your pipe.</p>
183    pub fn enrichment_parameters(mut self, input: crate::types::PipeEnrichmentParameters) -> Self {
184        self.inner = self.inner.enrichment_parameters(input);
185        self
186    }
187    /// <p>The parameters required to set up enrichment on your pipe.</p>
188    pub fn set_enrichment_parameters(mut self, input: ::std::option::Option<crate::types::PipeEnrichmentParameters>) -> Self {
189        self.inner = self.inner.set_enrichment_parameters(input);
190        self
191    }
192    /// <p>The parameters required to set up enrichment on your pipe.</p>
193    pub fn get_enrichment_parameters(&self) -> &::std::option::Option<crate::types::PipeEnrichmentParameters> {
194        self.inner.get_enrichment_parameters()
195    }
196    /// <p>The ARN of the target resource.</p>
197    pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198        self.inner = self.inner.target(input.into());
199        self
200    }
201    /// <p>The ARN of the target resource.</p>
202    pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.inner = self.inner.set_target(input);
204        self
205    }
206    /// <p>The ARN of the target resource.</p>
207    pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
208        self.inner.get_target()
209    }
210    /// <p>The parameters required to set up a target for your pipe.</p>
211    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
212    pub fn target_parameters(mut self, input: crate::types::PipeTargetParameters) -> Self {
213        self.inner = self.inner.target_parameters(input);
214        self
215    }
216    /// <p>The parameters required to set up a target for your pipe.</p>
217    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
218    pub fn set_target_parameters(mut self, input: ::std::option::Option<crate::types::PipeTargetParameters>) -> Self {
219        self.inner = self.inner.set_target_parameters(input);
220        self
221    }
222    /// <p>The parameters required to set up a target for your pipe.</p>
223    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
224    pub fn get_target_parameters(&self) -> &::std::option::Option<crate::types::PipeTargetParameters> {
225        self.inner.get_target_parameters()
226    }
227    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
228    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229        self.inner = self.inner.role_arn(input.into());
230        self
231    }
232    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
233    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
234        self.inner = self.inner.set_role_arn(input);
235        self
236    }
237    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
238    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
239        self.inner.get_role_arn()
240    }
241    /// <p>The logging configuration settings for the pipe.</p>
242    pub fn log_configuration(mut self, input: crate::types::PipeLogConfigurationParameters) -> Self {
243        self.inner = self.inner.log_configuration(input);
244        self
245    }
246    /// <p>The logging configuration settings for the pipe.</p>
247    pub fn set_log_configuration(mut self, input: ::std::option::Option<crate::types::PipeLogConfigurationParameters>) -> Self {
248        self.inner = self.inner.set_log_configuration(input);
249        self
250    }
251    /// <p>The logging configuration settings for the pipe.</p>
252    pub fn get_log_configuration(&self) -> &::std::option::Option<crate::types::PipeLogConfigurationParameters> {
253        self.inner.get_log_configuration()
254    }
255    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
256    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
257    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
258    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
259    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
260        self.inner = self.inner.kms_key_identifier(input.into());
261        self
262    }
263    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
264    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
265    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
266    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
267    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.inner = self.inner.set_kms_key_identifier(input);
269        self
270    }
271    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
272    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
273    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
274    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
275    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
276        self.inner.get_kms_key_identifier()
277    }
278}