aws-sdk-rds 1.131.0

AWS SDK for Amazon Relational Database Service
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, ::std::fmt::Debug)]
pub struct StartActivityStreamInput {
    /// <p>The Amazon Resource Name (ARN) of the DB cluster, for example, <code>arn:aws:rds:us-east-1:12345667890:cluster:das-cluster</code>.</p>
    pub resource_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the mode of the database activity stream. Database events such as a change or access generate an activity stream event. The database session can handle these events either synchronously or asynchronously.</p>
    pub mode: ::std::option::Option<crate::types::ActivityStreamMode>,
    /// <p>The Amazon Web Services KMS key identifier for encrypting messages in the database activity stream. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether or not the database activity stream is to start as soon as possible, regardless of the maintenance window for the database.</p>
    pub apply_immediately: ::std::option::Option<bool>,
    /// <p>Specifies whether the database activity stream includes engine-native audit fields. This option applies to an Oracle or Microsoft SQL Server DB instance. By default, no engine-native audit fields are included.</p>
    pub engine_native_audit_fields_included: ::std::option::Option<bool>,
}
impl StartActivityStreamInput {
    /// <p>The Amazon Resource Name (ARN) of the DB cluster, for example, <code>arn:aws:rds:us-east-1:12345667890:cluster:das-cluster</code>.</p>
    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>Specifies the mode of the database activity stream. Database events such as a change or access generate an activity stream event. The database session can handle these events either synchronously or asynchronously.</p>
    pub fn mode(&self) -> ::std::option::Option<&crate::types::ActivityStreamMode> {
        self.mode.as_ref()
    }
    /// <p>The Amazon Web Services KMS key identifier for encrypting messages in the database activity stream. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>Specifies whether or not the database activity stream is to start as soon as possible, regardless of the maintenance window for the database.</p>
    pub fn apply_immediately(&self) -> ::std::option::Option<bool> {
        self.apply_immediately
    }
    /// <p>Specifies whether the database activity stream includes engine-native audit fields. This option applies to an Oracle or Microsoft SQL Server DB instance. By default, no engine-native audit fields are included.</p>
    pub fn engine_native_audit_fields_included(&self) -> ::std::option::Option<bool> {
        self.engine_native_audit_fields_included
    }
}
impl StartActivityStreamInput {
    /// Creates a new builder-style object to manufacture [`StartActivityStreamInput`](crate::operation::start_activity_stream::StartActivityStreamInput).
    pub fn builder() -> crate::operation::start_activity_stream::builders::StartActivityStreamInputBuilder {
        crate::operation::start_activity_stream::builders::StartActivityStreamInputBuilder::default()
    }
}

/// A builder for [`StartActivityStreamInput`](crate::operation::start_activity_stream::StartActivityStreamInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartActivityStreamInputBuilder {
    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
    pub(crate) mode: ::std::option::Option<crate::types::ActivityStreamMode>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) apply_immediately: ::std::option::Option<bool>,
    pub(crate) engine_native_audit_fields_included: ::std::option::Option<bool>,
}
impl StartActivityStreamInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the DB cluster, for example, <code>arn:aws:rds:us-east-1:12345667890:cluster:das-cluster</code>.</p>
    /// This field is required.
    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the DB cluster, for example, <code>arn:aws:rds:us-east-1:12345667890:cluster:das-cluster</code>.</p>
    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the DB cluster, for example, <code>arn:aws:rds:us-east-1:12345667890:cluster:das-cluster</code>.</p>
    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_arn
    }
    /// <p>Specifies the mode of the database activity stream. Database events such as a change or access generate an activity stream event. The database session can handle these events either synchronously or asynchronously.</p>
    /// This field is required.
    pub fn mode(mut self, input: crate::types::ActivityStreamMode) -> Self {
        self.mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the mode of the database activity stream. Database events such as a change or access generate an activity stream event. The database session can handle these events either synchronously or asynchronously.</p>
    pub fn set_mode(mut self, input: ::std::option::Option<crate::types::ActivityStreamMode>) -> Self {
        self.mode = input;
        self
    }
    /// <p>Specifies the mode of the database activity stream. Database events such as a change or access generate an activity stream event. The database session can handle these events either synchronously or asynchronously.</p>
    pub fn get_mode(&self) -> &::std::option::Option<crate::types::ActivityStreamMode> {
        &self.mode
    }
    /// <p>The Amazon Web Services KMS key identifier for encrypting messages in the database activity stream. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.</p>
    /// This field is required.
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services KMS key identifier for encrypting messages in the database activity stream. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>The Amazon Web Services KMS key identifier for encrypting messages in the database activity stream. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>Specifies whether or not the database activity stream is to start as soon as possible, regardless of the maintenance window for the database.</p>
    pub fn apply_immediately(mut self, input: bool) -> Self {
        self.apply_immediately = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether or not the database activity stream is to start as soon as possible, regardless of the maintenance window for the database.</p>
    pub fn set_apply_immediately(mut self, input: ::std::option::Option<bool>) -> Self {
        self.apply_immediately = input;
        self
    }
    /// <p>Specifies whether or not the database activity stream is to start as soon as possible, regardless of the maintenance window for the database.</p>
    pub fn get_apply_immediately(&self) -> &::std::option::Option<bool> {
        &self.apply_immediately
    }
    /// <p>Specifies whether the database activity stream includes engine-native audit fields. This option applies to an Oracle or Microsoft SQL Server DB instance. By default, no engine-native audit fields are included.</p>
    pub fn engine_native_audit_fields_included(mut self, input: bool) -> Self {
        self.engine_native_audit_fields_included = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the database activity stream includes engine-native audit fields. This option applies to an Oracle or Microsoft SQL Server DB instance. By default, no engine-native audit fields are included.</p>
    pub fn set_engine_native_audit_fields_included(mut self, input: ::std::option::Option<bool>) -> Self {
        self.engine_native_audit_fields_included = input;
        self
    }
    /// <p>Specifies whether the database activity stream includes engine-native audit fields. This option applies to an Oracle or Microsoft SQL Server DB instance. By default, no engine-native audit fields are included.</p>
    pub fn get_engine_native_audit_fields_included(&self) -> &::std::option::Option<bool> {
        &self.engine_native_audit_fields_included
    }
    /// Consumes the builder and constructs a [`StartActivityStreamInput`](crate::operation::start_activity_stream::StartActivityStreamInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_activity_stream::StartActivityStreamInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_activity_stream::StartActivityStreamInput {
            resource_arn: self.resource_arn,
            mode: self.mode,
            kms_key_id: self.kms_key_id,
            apply_immediately: self.apply_immediately,
            engine_native_audit_fields_included: self.engine_native_audit_fields_included,
        })
    }
}