aws-sdk-databasemigration 1.113.0

AWS SDK for AWS Database Migration Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateReplicationConfigInput {
    /// <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
    pub replication_config_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
    pub source_endpoint_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
    pub target_endpoint_arn: ::std::option::Option<::std::string::String>,
    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
    pub compute_config: ::std::option::Option<crate::types::ComputeConfig>,
    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
    /// <p>Possible values:</p>
    /// <ul>
    /// <li>
    /// <p><code>"full-load"</code></p></li>
    /// <li>
    /// <p><code>"cdc"</code></p></li>
    /// <li>
    /// <p><code>"full-load-and-cdc"</code></p></li>
    /// </ul>
    pub replication_type: ::std::option::Option<crate::types::MigrationTypeValue>,
    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
    pub table_mappings: ::std::option::Option<::std::string::String>,
    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
    pub replication_settings: ::std::option::Option<::std::string::String>,
    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
    pub supplemental_settings: ::std::option::Option<::std::string::String>,
    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
    pub resource_identifier: ::std::option::Option<::std::string::String>,
    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateReplicationConfigInput {
    /// <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
    pub fn replication_config_identifier(&self) -> ::std::option::Option<&str> {
        self.replication_config_identifier.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
    pub fn source_endpoint_arn(&self) -> ::std::option::Option<&str> {
        self.source_endpoint_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
    pub fn target_endpoint_arn(&self) -> ::std::option::Option<&str> {
        self.target_endpoint_arn.as_deref()
    }
    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
    pub fn compute_config(&self) -> ::std::option::Option<&crate::types::ComputeConfig> {
        self.compute_config.as_ref()
    }
    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
    /// <p>Possible values:</p>
    /// <ul>
    /// <li>
    /// <p><code>"full-load"</code></p></li>
    /// <li>
    /// <p><code>"cdc"</code></p></li>
    /// <li>
    /// <p><code>"full-load-and-cdc"</code></p></li>
    /// </ul>
    pub fn replication_type(&self) -> ::std::option::Option<&crate::types::MigrationTypeValue> {
        self.replication_type.as_ref()
    }
    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
    pub fn table_mappings(&self) -> ::std::option::Option<&str> {
        self.table_mappings.as_deref()
    }
    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
    pub fn replication_settings(&self) -> ::std::option::Option<&str> {
        self.replication_settings.as_deref()
    }
    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
    pub fn supplemental_settings(&self) -> ::std::option::Option<&str> {
        self.supplemental_settings.as_deref()
    }
    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
    pub fn resource_identifier(&self) -> ::std::option::Option<&str> {
        self.resource_identifier.as_deref()
    }
    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateReplicationConfigInput {
    /// Creates a new builder-style object to manufacture [`CreateReplicationConfigInput`](crate::operation::create_replication_config::CreateReplicationConfigInput).
    pub fn builder() -> crate::operation::create_replication_config::builders::CreateReplicationConfigInputBuilder {
        crate::operation::create_replication_config::builders::CreateReplicationConfigInputBuilder::default()
    }
}

/// A builder for [`CreateReplicationConfigInput`](crate::operation::create_replication_config::CreateReplicationConfigInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateReplicationConfigInputBuilder {
    pub(crate) replication_config_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) source_endpoint_arn: ::std::option::Option<::std::string::String>,
    pub(crate) target_endpoint_arn: ::std::option::Option<::std::string::String>,
    pub(crate) compute_config: ::std::option::Option<crate::types::ComputeConfig>,
    pub(crate) replication_type: ::std::option::Option<crate::types::MigrationTypeValue>,
    pub(crate) table_mappings: ::std::option::Option<::std::string::String>,
    pub(crate) replication_settings: ::std::option::Option<::std::string::String>,
    pub(crate) supplemental_settings: ::std::option::Option<::std::string::String>,
    pub(crate) resource_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateReplicationConfigInputBuilder {
    /// <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
    /// This field is required.
    pub fn replication_config_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replication_config_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
    pub fn set_replication_config_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replication_config_identifier = input;
        self
    }
    /// <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
    pub fn get_replication_config_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.replication_config_identifier
    }
    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
    /// This field is required.
    pub fn source_endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_endpoint_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
    pub fn set_source_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_endpoint_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
    pub fn get_source_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_endpoint_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
    /// This field is required.
    pub fn target_endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_endpoint_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
    pub fn set_target_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_endpoint_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
    pub fn get_target_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_endpoint_arn
    }
    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
    /// This field is required.
    pub fn compute_config(mut self, input: crate::types::ComputeConfig) -> Self {
        self.compute_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
    pub fn set_compute_config(mut self, input: ::std::option::Option<crate::types::ComputeConfig>) -> Self {
        self.compute_config = input;
        self
    }
    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
    pub fn get_compute_config(&self) -> &::std::option::Option<crate::types::ComputeConfig> {
        &self.compute_config
    }
    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
    /// <p>Possible values:</p>
    /// <ul>
    /// <li>
    /// <p><code>"full-load"</code></p></li>
    /// <li>
    /// <p><code>"cdc"</code></p></li>
    /// <li>
    /// <p><code>"full-load-and-cdc"</code></p></li>
    /// </ul>
    /// This field is required.
    pub fn replication_type(mut self, input: crate::types::MigrationTypeValue) -> Self {
        self.replication_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
    /// <p>Possible values:</p>
    /// <ul>
    /// <li>
    /// <p><code>"full-load"</code></p></li>
    /// <li>
    /// <p><code>"cdc"</code></p></li>
    /// <li>
    /// <p><code>"full-load-and-cdc"</code></p></li>
    /// </ul>
    pub fn set_replication_type(mut self, input: ::std::option::Option<crate::types::MigrationTypeValue>) -> Self {
        self.replication_type = input;
        self
    }
    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
    /// <p>Possible values:</p>
    /// <ul>
    /// <li>
    /// <p><code>"full-load"</code></p></li>
    /// <li>
    /// <p><code>"cdc"</code></p></li>
    /// <li>
    /// <p><code>"full-load-and-cdc"</code></p></li>
    /// </ul>
    pub fn get_replication_type(&self) -> &::std::option::Option<crate::types::MigrationTypeValue> {
        &self.replication_type
    }
    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
    /// This field is required.
    pub fn table_mappings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.table_mappings = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
    pub fn set_table_mappings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.table_mappings = input;
        self
    }
    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
    pub fn get_table_mappings(&self) -> &::std::option::Option<::std::string::String> {
        &self.table_mappings
    }
    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
    pub fn replication_settings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replication_settings = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
    pub fn set_replication_settings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replication_settings = input;
        self
    }
    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
    pub fn get_replication_settings(&self) -> &::std::option::Option<::std::string::String> {
        &self.replication_settings
    }
    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
    pub fn supplemental_settings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.supplemental_settings = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
    pub fn set_supplemental_settings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.supplemental_settings = input;
        self
    }
    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
    pub fn get_supplemental_settings(&self) -> &::std::option::Option<::std::string::String> {
        &self.supplemental_settings
    }
    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
    pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
    pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_identifier = input;
        self
    }
    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
    pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_identifier
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateReplicationConfigInput`](crate::operation::create_replication_config::CreateReplicationConfigInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_replication_config::CreateReplicationConfigInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_replication_config::CreateReplicationConfigInput {
            replication_config_identifier: self.replication_config_identifier,
            source_endpoint_arn: self.source_endpoint_arn,
            target_endpoint_arn: self.target_endpoint_arn,
            compute_config: self.compute_config,
            replication_type: self.replication_type,
            table_mappings: self.table_mappings,
            replication_settings: self.replication_settings,
            supplemental_settings: self.supplemental_settings,
            resource_identifier: self.resource_identifier,
            tags: self.tags,
        })
    }
}