aws-sdk-pipes 1.104.0

AWS SDK for Amazon EventBridge Pipes
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreatePipeInput {
    /// <p>The name of the pipe.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the pipe.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The state the pipe should be in.</p>
    pub desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
    /// <p>The ARN of the source resource.</p>
    pub source: ::std::option::Option<::std::string::String>,
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub source_parameters: ::std::option::Option<crate::types::PipeSourceParameters>,
    /// <p>The ARN of the enrichment resource.</p>
    pub enrichment: ::std::option::Option<::std::string::String>,
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
    /// <p>The ARN of the target resource.</p>
    pub target: ::std::option::Option<::std::string::String>,
    /// <p>The parameters required to set up a target for your pipe.</p>
    /// <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>
    pub target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The logging configuration settings for the pipe.</p>
    pub log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
    /// <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>
    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
    /// <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>
    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
}
impl CreatePipeInput {
    /// <p>The name of the pipe.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the pipe.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The state the pipe should be in.</p>
    pub fn desired_state(&self) -> ::std::option::Option<&crate::types::RequestedPipeState> {
        self.desired_state.as_ref()
    }
    /// <p>The ARN of the source resource.</p>
    pub fn source(&self) -> ::std::option::Option<&str> {
        self.source.as_deref()
    }
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub fn source_parameters(&self) -> ::std::option::Option<&crate::types::PipeSourceParameters> {
        self.source_parameters.as_ref()
    }
    /// <p>The ARN of the enrichment resource.</p>
    pub fn enrichment(&self) -> ::std::option::Option<&str> {
        self.enrichment.as_deref()
    }
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub fn enrichment_parameters(&self) -> ::std::option::Option<&crate::types::PipeEnrichmentParameters> {
        self.enrichment_parameters.as_ref()
    }
    /// <p>The ARN of the target resource.</p>
    pub fn target(&self) -> ::std::option::Option<&str> {
        self.target.as_deref()
    }
    /// <p>The parameters required to set up a target for your pipe.</p>
    /// <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>
    pub fn target_parameters(&self) -> ::std::option::Option<&crate::types::PipeTargetParameters> {
        self.target_parameters.as_ref()
    }
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The logging configuration settings for the pipe.</p>
    pub fn log_configuration(&self) -> ::std::option::Option<&crate::types::PipeLogConfigurationParameters> {
        self.log_configuration.as_ref()
    }
    /// <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>
    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
    /// <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>
    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
        self.kms_key_identifier.as_deref()
    }
}
impl ::std::fmt::Debug for CreatePipeInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreatePipeInput");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("desired_state", &self.desired_state);
        formatter.field("source", &self.source);
        formatter.field("source_parameters", &self.source_parameters);
        formatter.field("enrichment", &self.enrichment);
        formatter.field("enrichment_parameters", &self.enrichment_parameters);
        formatter.field("target", &self.target);
        formatter.field("target_parameters", &self.target_parameters);
        formatter.field("role_arn", &self.role_arn);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("log_configuration", &self.log_configuration);
        formatter.field("kms_key_identifier", &self.kms_key_identifier);
        formatter.finish()
    }
}
impl CreatePipeInput {
    /// Creates a new builder-style object to manufacture [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
    pub fn builder() -> crate::operation::create_pipe::builders::CreatePipeInputBuilder {
        crate::operation::create_pipe::builders::CreatePipeInputBuilder::default()
    }
}

/// A builder for [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreatePipeInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
    pub(crate) source: ::std::option::Option<::std::string::String>,
    pub(crate) source_parameters: ::std::option::Option<crate::types::PipeSourceParameters>,
    pub(crate) enrichment: ::std::option::Option<::std::string::String>,
    pub(crate) enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
    pub(crate) target: ::std::option::Option<::std::string::String>,
    pub(crate) target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
}
impl CreatePipeInputBuilder {
    /// <p>The name of the pipe.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the pipe.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the pipe.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description of the pipe.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the pipe.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the pipe.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The state the pipe should be in.</p>
    pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
        self.desired_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state the pipe should be in.</p>
    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::RequestedPipeState>) -> Self {
        self.desired_state = input;
        self
    }
    /// <p>The state the pipe should be in.</p>
    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::RequestedPipeState> {
        &self.desired_state
    }
    /// <p>The ARN of the source resource.</p>
    /// This field is required.
    pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the source resource.</p>
    pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source = input;
        self
    }
    /// <p>The ARN of the source resource.</p>
    pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
        &self.source
    }
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub fn source_parameters(mut self, input: crate::types::PipeSourceParameters) -> Self {
        self.source_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub fn set_source_parameters(mut self, input: ::std::option::Option<crate::types::PipeSourceParameters>) -> Self {
        self.source_parameters = input;
        self
    }
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub fn get_source_parameters(&self) -> &::std::option::Option<crate::types::PipeSourceParameters> {
        &self.source_parameters
    }
    /// <p>The ARN of the enrichment resource.</p>
    pub fn enrichment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.enrichment = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the enrichment resource.</p>
    pub fn set_enrichment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.enrichment = input;
        self
    }
    /// <p>The ARN of the enrichment resource.</p>
    pub fn get_enrichment(&self) -> &::std::option::Option<::std::string::String> {
        &self.enrichment
    }
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub fn enrichment_parameters(mut self, input: crate::types::PipeEnrichmentParameters) -> Self {
        self.enrichment_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub fn set_enrichment_parameters(mut self, input: ::std::option::Option<crate::types::PipeEnrichmentParameters>) -> Self {
        self.enrichment_parameters = input;
        self
    }
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub fn get_enrichment_parameters(&self) -> &::std::option::Option<crate::types::PipeEnrichmentParameters> {
        &self.enrichment_parameters
    }
    /// <p>The ARN of the target resource.</p>
    /// This field is required.
    pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the target resource.</p>
    pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target = input;
        self
    }
    /// <p>The ARN of the target resource.</p>
    pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
        &self.target
    }
    /// <p>The parameters required to set up a target for your pipe.</p>
    /// <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>
    pub fn target_parameters(mut self, input: crate::types::PipeTargetParameters) -> Self {
        self.target_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The parameters required to set up a target for your pipe.</p>
    /// <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>
    pub fn set_target_parameters(mut self, input: ::std::option::Option<crate::types::PipeTargetParameters>) -> Self {
        self.target_parameters = input;
        self
    }
    /// <p>The parameters required to set up a target for your pipe.</p>
    /// <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>
    pub fn get_target_parameters(&self) -> &::std::option::Option<crate::types::PipeTargetParameters> {
        &self.target_parameters
    }
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    /// This field is required.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The logging configuration settings for the pipe.</p>
    pub fn log_configuration(mut self, input: crate::types::PipeLogConfigurationParameters) -> Self {
        self.log_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The logging configuration settings for the pipe.</p>
    pub fn set_log_configuration(mut self, input: ::std::option::Option<crate::types::PipeLogConfigurationParameters>) -> Self {
        self.log_configuration = input;
        self
    }
    /// <p>The logging configuration settings for the pipe.</p>
    pub fn get_log_configuration(&self) -> &::std::option::Option<crate::types::PipeLogConfigurationParameters> {
        &self.log_configuration
    }
    /// <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>
    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
    /// <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>
    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
    /// <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>
    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_identifier = input;
        self
    }
    /// <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>
    /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</p>
    /// <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>
    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_identifier
    }
    /// Consumes the builder and constructs a [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_pipe::CreatePipeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_pipe::CreatePipeInput {
            name: self.name,
            description: self.description,
            desired_state: self.desired_state,
            source: self.source,
            source_parameters: self.source_parameters,
            enrichment: self.enrichment,
            enrichment_parameters: self.enrichment_parameters,
            target: self.target,
            target_parameters: self.target_parameters,
            role_arn: self.role_arn,
            tags: self.tags,
            log_configuration: self.log_configuration,
            kms_key_identifier: self.kms_key_identifier,
        })
    }
}
impl ::std::fmt::Debug for CreatePipeInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreatePipeInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("desired_state", &self.desired_state);
        formatter.field("source", &self.source);
        formatter.field("source_parameters", &self.source_parameters);
        formatter.field("enrichment", &self.enrichment);
        formatter.field("enrichment_parameters", &self.enrichment_parameters);
        formatter.field("target", &self.target);
        formatter.field("target_parameters", &self.target_parameters);
        formatter.field("role_arn", &self.role_arn);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("log_configuration", &self.log_configuration);
        formatter.field("kms_key_identifier", &self.kms_key_identifier);
        formatter.finish()
    }
}