Struct aws_sdk_databasemigration::model::mongo_db_settings::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for MongoDbSettings
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn username(self, input: impl Into<String>) -> Self
pub fn username(self, input: impl Into<String>) -> Self
The user name you use to access the MongoDB source endpoint.
sourcepub fn set_username(self, input: Option<String>) -> Self
pub fn set_username(self, input: Option<String>) -> Self
The user name you use to access the MongoDB source endpoint.
sourcepub fn password(self, input: impl Into<String>) -> Self
pub fn password(self, input: impl Into<String>) -> Self
The password for the user account you use to access the MongoDB source endpoint.
sourcepub fn set_password(self, input: Option<String>) -> Self
pub fn set_password(self, input: Option<String>) -> Self
The password for the user account you use to access the MongoDB source endpoint.
sourcepub fn server_name(self, input: impl Into<String>) -> Self
pub fn server_name(self, input: impl Into<String>) -> Self
The name of the server on the MongoDB source endpoint.
sourcepub fn set_server_name(self, input: Option<String>) -> Self
pub fn set_server_name(self, input: Option<String>) -> Self
The name of the server on the MongoDB source endpoint.
sourcepub fn set_port(self, input: Option<i32>) -> Self
pub fn set_port(self, input: Option<i32>) -> Self
The port value for the MongoDB source endpoint.
sourcepub fn database_name(self, input: impl Into<String>) -> Self
pub fn database_name(self, input: impl Into<String>) -> Self
The database name on the MongoDB source endpoint.
sourcepub fn set_database_name(self, input: Option<String>) -> Self
pub fn set_database_name(self, input: Option<String>) -> Self
The database name on the MongoDB source endpoint.
sourcepub fn auth_type(self, input: AuthTypeValue) -> Self
pub fn auth_type(self, input: AuthTypeValue) -> Self
The authentication type you use to access the MongoDB source endpoint.
When when set to "no"
, user name and password parameters are not used and can be empty.
sourcepub fn set_auth_type(self, input: Option<AuthTypeValue>) -> Self
pub fn set_auth_type(self, input: Option<AuthTypeValue>) -> Self
The authentication type you use to access the MongoDB source endpoint.
When when set to "no"
, user name and password parameters are not used and can be empty.
sourcepub fn auth_mechanism(self, input: AuthMechanismValue) -> Self
pub fn auth_mechanism(self, input: AuthMechanismValue) -> Self
The authentication mechanism you use to access the MongoDB source endpoint.
For the default value, in MongoDB version 2.x, "default"
is "mongodb_cr"
. For MongoDB version 3.x or later, "default"
is "scram_sha_1"
. This setting isn't used when AuthType
is set to "no"
.
sourcepub fn set_auth_mechanism(self, input: Option<AuthMechanismValue>) -> Self
pub fn set_auth_mechanism(self, input: Option<AuthMechanismValue>) -> Self
The authentication mechanism you use to access the MongoDB source endpoint.
For the default value, in MongoDB version 2.x, "default"
is "mongodb_cr"
. For MongoDB version 3.x or later, "default"
is "scram_sha_1"
. This setting isn't used when AuthType
is set to "no"
.
sourcepub fn nesting_level(self, input: NestingLevelValue) -> Self
pub fn nesting_level(self, input: NestingLevelValue) -> Self
Specifies either document or table mode.
Default value is "none"
. Specify "none"
to use document mode. Specify "one"
to use table mode.
sourcepub fn set_nesting_level(self, input: Option<NestingLevelValue>) -> Self
pub fn set_nesting_level(self, input: Option<NestingLevelValue>) -> Self
Specifies either document or table mode.
Default value is "none"
. Specify "none"
to use document mode. Specify "one"
to use table mode.
sourcepub fn extract_doc_id(self, input: impl Into<String>) -> Self
pub fn extract_doc_id(self, input: impl Into<String>) -> Self
Specifies the document ID. Use this setting when NestingLevel
is set to "none"
.
Default value is "false"
.
sourcepub fn set_extract_doc_id(self, input: Option<String>) -> Self
pub fn set_extract_doc_id(self, input: Option<String>) -> Self
Specifies the document ID. Use this setting when NestingLevel
is set to "none"
.
Default value is "false"
.
sourcepub fn docs_to_investigate(self, input: impl Into<String>) -> Self
pub fn docs_to_investigate(self, input: impl Into<String>) -> Self
Indicates the number of documents to preview to determine the document organization. Use this setting when NestingLevel
is set to "one"
.
Must be a positive value greater than 0
. Default value is 1000
.
sourcepub fn set_docs_to_investigate(self, input: Option<String>) -> Self
pub fn set_docs_to_investigate(self, input: Option<String>) -> Self
Indicates the number of documents to preview to determine the document organization. Use this setting when NestingLevel
is set to "one"
.
Must be a positive value greater than 0
. Default value is 1000
.
sourcepub fn auth_source(self, input: impl Into<String>) -> Self
pub fn auth_source(self, input: impl Into<String>) -> Self
The MongoDB database name. This setting isn't used when AuthType
is set to "no"
.
The default is "admin"
.
sourcepub fn set_auth_source(self, input: Option<String>) -> Self
pub fn set_auth_source(self, input: Option<String>) -> Self
The MongoDB database name. This setting isn't used when AuthType
is set to "no"
.
The default is "admin"
.
sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
The KMS key identifier that is used to encrypt the content on the replication instance. If you don't specify a value for the KmsKeyId
parameter, then DMS uses your default encryption key. KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.
sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
The KMS key identifier that is used to encrypt the content on the replication instance. If you don't specify a value for the KmsKeyId
parameter, then DMS uses your default encryption key. KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.
sourcepub fn secrets_manager_access_role_arn(self, input: impl Into<String>) -> Self
pub fn secrets_manager_access_role_arn(self, input: impl Into<String>) -> Self
The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret
. The role must allow the iam:PassRole
action. SecretsManagerSecret
has the value of the Amazon Web Services Secrets Manager secret that allows access to the MongoDB endpoint.
You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId
. Or you can specify clear-text values for UserName
, Password
, ServerName
, and Port
. You can't specify both. For more information on creating this SecretsManagerSecret
and the SecretsManagerAccessRoleArn
and SecretsManagerSecretId
required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.
sourcepub fn set_secrets_manager_access_role_arn(self, input: Option<String>) -> Self
pub fn set_secrets_manager_access_role_arn(self, input: Option<String>) -> Self
The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret
. The role must allow the iam:PassRole
action. SecretsManagerSecret
has the value of the Amazon Web Services Secrets Manager secret that allows access to the MongoDB endpoint.
You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId
. Or you can specify clear-text values for UserName
, Password
, ServerName
, and Port
. You can't specify both. For more information on creating this SecretsManagerSecret
and the SecretsManagerAccessRoleArn
and SecretsManagerSecretId
required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.
sourcepub fn secrets_manager_secret_id(self, input: impl Into<String>) -> Self
pub fn secrets_manager_secret_id(self, input: impl Into<String>) -> Self
The full ARN, partial ARN, or friendly name of the SecretsManagerSecret
that contains the MongoDB endpoint connection details.
sourcepub fn set_secrets_manager_secret_id(self, input: Option<String>) -> Self
pub fn set_secrets_manager_secret_id(self, input: Option<String>) -> Self
The full ARN, partial ARN, or friendly name of the SecretsManagerSecret
that contains the MongoDB endpoint connection details.
sourcepub fn build(self) -> MongoDbSettings
pub fn build(self) -> MongoDbSettings
Consumes the builder and constructs a MongoDbSettings
.