aws_sdk_pipes/operation/create_pipe/
_create_pipe_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreatePipeInput {
6    /// <p>The name of the pipe.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>A description of the pipe.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The state the pipe should be in.</p>
11    pub desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
12    /// <p>The ARN of the source resource.</p>
13    pub source: ::std::option::Option<::std::string::String>,
14    /// <p>The parameters required to set up a source for your pipe.</p>
15    pub source_parameters: ::std::option::Option<crate::types::PipeSourceParameters>,
16    /// <p>The ARN of the enrichment resource.</p>
17    pub enrichment: ::std::option::Option<::std::string::String>,
18    /// <p>The parameters required to set up enrichment on your pipe.</p>
19    pub enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
20    /// <p>The ARN of the target resource.</p>
21    pub target: ::std::option::Option<::std::string::String>,
22    /// <p>The parameters required to set up a target for your pipe.</p>
23    /// <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>
24    pub target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
25    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
26    pub role_arn: ::std::option::Option<::std::string::String>,
27    /// <p>The list of key-value pairs to associate with the pipe.</p>
28    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
29    /// <p>The logging configuration settings for the pipe.</p>
30    pub log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
31    /// <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>
32    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
33    /// <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>
34    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
35}
36impl CreatePipeInput {
37    /// <p>The name of the pipe.</p>
38    pub fn name(&self) -> ::std::option::Option<&str> {
39        self.name.as_deref()
40    }
41    /// <p>A description of the pipe.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The state the pipe should be in.</p>
46    pub fn desired_state(&self) -> ::std::option::Option<&crate::types::RequestedPipeState> {
47        self.desired_state.as_ref()
48    }
49    /// <p>The ARN of the source resource.</p>
50    pub fn source(&self) -> ::std::option::Option<&str> {
51        self.source.as_deref()
52    }
53    /// <p>The parameters required to set up a source for your pipe.</p>
54    pub fn source_parameters(&self) -> ::std::option::Option<&crate::types::PipeSourceParameters> {
55        self.source_parameters.as_ref()
56    }
57    /// <p>The ARN of the enrichment resource.</p>
58    pub fn enrichment(&self) -> ::std::option::Option<&str> {
59        self.enrichment.as_deref()
60    }
61    /// <p>The parameters required to set up enrichment on your pipe.</p>
62    pub fn enrichment_parameters(&self) -> ::std::option::Option<&crate::types::PipeEnrichmentParameters> {
63        self.enrichment_parameters.as_ref()
64    }
65    /// <p>The ARN of the target resource.</p>
66    pub fn target(&self) -> ::std::option::Option<&str> {
67        self.target.as_deref()
68    }
69    /// <p>The parameters required to set up a target for your pipe.</p>
70    /// <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>
71    pub fn target_parameters(&self) -> ::std::option::Option<&crate::types::PipeTargetParameters> {
72        self.target_parameters.as_ref()
73    }
74    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
75    pub fn role_arn(&self) -> ::std::option::Option<&str> {
76        self.role_arn.as_deref()
77    }
78    /// <p>The list of key-value pairs to associate with the pipe.</p>
79    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
80        self.tags.as_ref()
81    }
82    /// <p>The logging configuration settings for the pipe.</p>
83    pub fn log_configuration(&self) -> ::std::option::Option<&crate::types::PipeLogConfigurationParameters> {
84        self.log_configuration.as_ref()
85    }
86    /// <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>
87    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
88    /// <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>
89    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
90        self.kms_key_identifier.as_deref()
91    }
92}
93impl ::std::fmt::Debug for CreatePipeInput {
94    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
95        let mut formatter = f.debug_struct("CreatePipeInput");
96        formatter.field("name", &self.name);
97        formatter.field("description", &"*** Sensitive Data Redacted ***");
98        formatter.field("desired_state", &self.desired_state);
99        formatter.field("source", &self.source);
100        formatter.field("source_parameters", &self.source_parameters);
101        formatter.field("enrichment", &self.enrichment);
102        formatter.field("enrichment_parameters", &self.enrichment_parameters);
103        formatter.field("target", &self.target);
104        formatter.field("target_parameters", &self.target_parameters);
105        formatter.field("role_arn", &self.role_arn);
106        formatter.field("tags", &"*** Sensitive Data Redacted ***");
107        formatter.field("log_configuration", &self.log_configuration);
108        formatter.field("kms_key_identifier", &self.kms_key_identifier);
109        formatter.finish()
110    }
111}
112impl CreatePipeInput {
113    /// Creates a new builder-style object to manufacture [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
114    pub fn builder() -> crate::operation::create_pipe::builders::CreatePipeInputBuilder {
115        crate::operation::create_pipe::builders::CreatePipeInputBuilder::default()
116    }
117}
118
119/// A builder for [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
120#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
121#[non_exhaustive]
122pub struct CreatePipeInputBuilder {
123    pub(crate) name: ::std::option::Option<::std::string::String>,
124    pub(crate) description: ::std::option::Option<::std::string::String>,
125    pub(crate) desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
126    pub(crate) source: ::std::option::Option<::std::string::String>,
127    pub(crate) source_parameters: ::std::option::Option<crate::types::PipeSourceParameters>,
128    pub(crate) enrichment: ::std::option::Option<::std::string::String>,
129    pub(crate) enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
130    pub(crate) target: ::std::option::Option<::std::string::String>,
131    pub(crate) target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
132    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
133    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
134    pub(crate) log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
135    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
136}
137impl CreatePipeInputBuilder {
138    /// <p>The name of the pipe.</p>
139    /// This field is required.
140    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.name = ::std::option::Option::Some(input.into());
142        self
143    }
144    /// <p>The name of the pipe.</p>
145    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.name = input;
147        self
148    }
149    /// <p>The name of the pipe.</p>
150    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
151        &self.name
152    }
153    /// <p>A description of the pipe.</p>
154    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.description = ::std::option::Option::Some(input.into());
156        self
157    }
158    /// <p>A description of the pipe.</p>
159    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.description = input;
161        self
162    }
163    /// <p>A description of the pipe.</p>
164    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
165        &self.description
166    }
167    /// <p>The state the pipe should be in.</p>
168    pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
169        self.desired_state = ::std::option::Option::Some(input);
170        self
171    }
172    /// <p>The state the pipe should be in.</p>
173    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::RequestedPipeState>) -> Self {
174        self.desired_state = input;
175        self
176    }
177    /// <p>The state the pipe should be in.</p>
178    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::RequestedPipeState> {
179        &self.desired_state
180    }
181    /// <p>The ARN of the source resource.</p>
182    /// This field is required.
183    pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184        self.source = ::std::option::Option::Some(input.into());
185        self
186    }
187    /// <p>The ARN of the source resource.</p>
188    pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189        self.source = input;
190        self
191    }
192    /// <p>The ARN of the source resource.</p>
193    pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
194        &self.source
195    }
196    /// <p>The parameters required to set up a source for your pipe.</p>
197    pub fn source_parameters(mut self, input: crate::types::PipeSourceParameters) -> Self {
198        self.source_parameters = ::std::option::Option::Some(input);
199        self
200    }
201    /// <p>The parameters required to set up a source for your pipe.</p>
202    pub fn set_source_parameters(mut self, input: ::std::option::Option<crate::types::PipeSourceParameters>) -> Self {
203        self.source_parameters = input;
204        self
205    }
206    /// <p>The parameters required to set up a source for your pipe.</p>
207    pub fn get_source_parameters(&self) -> &::std::option::Option<crate::types::PipeSourceParameters> {
208        &self.source_parameters
209    }
210    /// <p>The ARN of the enrichment resource.</p>
211    pub fn enrichment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212        self.enrichment = ::std::option::Option::Some(input.into());
213        self
214    }
215    /// <p>The ARN of the enrichment resource.</p>
216    pub fn set_enrichment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217        self.enrichment = input;
218        self
219    }
220    /// <p>The ARN of the enrichment resource.</p>
221    pub fn get_enrichment(&self) -> &::std::option::Option<::std::string::String> {
222        &self.enrichment
223    }
224    /// <p>The parameters required to set up enrichment on your pipe.</p>
225    pub fn enrichment_parameters(mut self, input: crate::types::PipeEnrichmentParameters) -> Self {
226        self.enrichment_parameters = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>The parameters required to set up enrichment on your pipe.</p>
230    pub fn set_enrichment_parameters(mut self, input: ::std::option::Option<crate::types::PipeEnrichmentParameters>) -> Self {
231        self.enrichment_parameters = input;
232        self
233    }
234    /// <p>The parameters required to set up enrichment on your pipe.</p>
235    pub fn get_enrichment_parameters(&self) -> &::std::option::Option<crate::types::PipeEnrichmentParameters> {
236        &self.enrichment_parameters
237    }
238    /// <p>The ARN of the target resource.</p>
239    /// This field is required.
240    pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241        self.target = ::std::option::Option::Some(input.into());
242        self
243    }
244    /// <p>The ARN of the target resource.</p>
245    pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246        self.target = input;
247        self
248    }
249    /// <p>The ARN of the target resource.</p>
250    pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
251        &self.target
252    }
253    /// <p>The parameters required to set up a target for your pipe.</p>
254    /// <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>
255    pub fn target_parameters(mut self, input: crate::types::PipeTargetParameters) -> Self {
256        self.target_parameters = ::std::option::Option::Some(input);
257        self
258    }
259    /// <p>The parameters required to set up a target for your pipe.</p>
260    /// <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>
261    pub fn set_target_parameters(mut self, input: ::std::option::Option<crate::types::PipeTargetParameters>) -> Self {
262        self.target_parameters = input;
263        self
264    }
265    /// <p>The parameters required to set up a target for your pipe.</p>
266    /// <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>
267    pub fn get_target_parameters(&self) -> &::std::option::Option<crate::types::PipeTargetParameters> {
268        &self.target_parameters
269    }
270    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
271    /// This field is required.
272    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273        self.role_arn = ::std::option::Option::Some(input.into());
274        self
275    }
276    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
277    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278        self.role_arn = input;
279        self
280    }
281    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
282    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
283        &self.role_arn
284    }
285    /// Adds a key-value pair to `tags`.
286    ///
287    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
288    ///
289    /// <p>The list of key-value pairs to associate with the pipe.</p>
290    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
291        let mut hash_map = self.tags.unwrap_or_default();
292        hash_map.insert(k.into(), v.into());
293        self.tags = ::std::option::Option::Some(hash_map);
294        self
295    }
296    /// <p>The list of key-value pairs to associate with the pipe.</p>
297    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
298        self.tags = input;
299        self
300    }
301    /// <p>The list of key-value pairs to associate with the pipe.</p>
302    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
303        &self.tags
304    }
305    /// <p>The logging configuration settings for the pipe.</p>
306    pub fn log_configuration(mut self, input: crate::types::PipeLogConfigurationParameters) -> Self {
307        self.log_configuration = ::std::option::Option::Some(input);
308        self
309    }
310    /// <p>The logging configuration settings for the pipe.</p>
311    pub fn set_log_configuration(mut self, input: ::std::option::Option<crate::types::PipeLogConfigurationParameters>) -> Self {
312        self.log_configuration = input;
313        self
314    }
315    /// <p>The logging configuration settings for the pipe.</p>
316    pub fn get_log_configuration(&self) -> &::std::option::Option<crate::types::PipeLogConfigurationParameters> {
317        &self.log_configuration
318    }
319    /// <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>
320    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
321    /// <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>
322    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
323        self.kms_key_identifier = ::std::option::Option::Some(input.into());
324        self
325    }
326    /// <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>
327    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
328    /// <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>
329    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
330        self.kms_key_identifier = input;
331        self
332    }
333    /// <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>
334    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
335    /// <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>
336    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
337        &self.kms_key_identifier
338    }
339    /// Consumes the builder and constructs a [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
340    pub fn build(self) -> ::std::result::Result<crate::operation::create_pipe::CreatePipeInput, ::aws_smithy_types::error::operation::BuildError> {
341        ::std::result::Result::Ok(crate::operation::create_pipe::CreatePipeInput {
342            name: self.name,
343            description: self.description,
344            desired_state: self.desired_state,
345            source: self.source,
346            source_parameters: self.source_parameters,
347            enrichment: self.enrichment,
348            enrichment_parameters: self.enrichment_parameters,
349            target: self.target,
350            target_parameters: self.target_parameters,
351            role_arn: self.role_arn,
352            tags: self.tags,
353            log_configuration: self.log_configuration,
354            kms_key_identifier: self.kms_key_identifier,
355        })
356    }
357}
358impl ::std::fmt::Debug for CreatePipeInputBuilder {
359    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
360        let mut formatter = f.debug_struct("CreatePipeInputBuilder");
361        formatter.field("name", &self.name);
362        formatter.field("description", &"*** Sensitive Data Redacted ***");
363        formatter.field("desired_state", &self.desired_state);
364        formatter.field("source", &self.source);
365        formatter.field("source_parameters", &self.source_parameters);
366        formatter.field("enrichment", &self.enrichment);
367        formatter.field("enrichment_parameters", &self.enrichment_parameters);
368        formatter.field("target", &self.target);
369        formatter.field("target_parameters", &self.target_parameters);
370        formatter.field("role_arn", &self.role_arn);
371        formatter.field("tags", &"*** Sensitive Data Redacted ***");
372        formatter.field("log_configuration", &self.log_configuration);
373        formatter.field("kms_key_identifier", &self.kms_key_identifier);
374        formatter.finish()
375    }
376}