Class CfnEndpoint.MongoDbSettingsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEndpoint.MongoDbSettingsProperty>
- Enclosing interface:
CfnEndpoint.MongoDbSettingsProperty
CfnEndpoint.MongoDbSettingsProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthMechanism
(String authMechanism) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getAuthMechanism()
authSource
(String authSource) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getAuthSource()
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getAuthType()
build()
Builds the configured instance.databaseName
(String databaseName) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getDatabaseName()
docsToInvestigate
(String docsToInvestigate) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getDocsToInvestigate()
extractDocId
(String extractDocId) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getExtractDocId()
nestingLevel
(String nestingLevel) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getNestingLevel()
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getPassword()
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getPort()
secretsManagerAccessRoleArn
(String secretsManagerAccessRoleArn) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getSecretsManagerAccessRoleArn()
secretsManagerSecretId
(String secretsManagerSecretId) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getSecretsManagerSecretId()
serverName
(String serverName) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getServerName()
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getUsername()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
authMechanism
@Stability(Stable) public CfnEndpoint.MongoDbSettingsProperty.Builder authMechanism(String authMechanism) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getAuthMechanism()
- Parameters:
authMechanism
- 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 whenAuthType
is set to"no"
.- Returns:
this
-
authSource
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getAuthSource()
- Parameters:
authSource
- The MongoDB database name. This setting isn't used whenAuthType
is set to"no"
. The default is"admin"
.- Returns:
this
-
authType
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getAuthType()
- Parameters:
authType
- The authentication type you use to access the MongoDB source endpoint. When set to"no"
, user name and password parameters are not used and can be empty.- Returns:
this
-
databaseName
@Stability(Stable) public CfnEndpoint.MongoDbSettingsProperty.Builder databaseName(String databaseName) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getDatabaseName()
- Parameters:
databaseName
- The database name on the MongoDB source endpoint.- Returns:
this
-
docsToInvestigate
@Stability(Stable) public CfnEndpoint.MongoDbSettingsProperty.Builder docsToInvestigate(String docsToInvestigate) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getDocsToInvestigate()
- Parameters:
docsToInvestigate
- Indicates the number of documents to preview to determine the document organization. Use this setting whenNestingLevel
is set to"one"
.Must be a positive value greater than
0
. Default value is1000
.- Returns:
this
-
extractDocId
@Stability(Stable) public CfnEndpoint.MongoDbSettingsProperty.Builder extractDocId(String extractDocId) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getExtractDocId()
- Parameters:
extractDocId
- Specifies the document ID. Use this setting whenNestingLevel
is set to"none"
. Default value is"false"
.- Returns:
this
-
nestingLevel
@Stability(Stable) public CfnEndpoint.MongoDbSettingsProperty.Builder nestingLevel(String nestingLevel) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getNestingLevel()
- Parameters:
nestingLevel
- Specifies either document or table mode. Default value is"none"
. Specify"none"
to use document mode. Specify"one"
to use table mode.- Returns:
this
-
password
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getPassword()
- Parameters:
password
- The password for the user account you use to access the MongoDB source endpoint.- Returns:
this
-
port
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getPort()
- Parameters:
port
- The port value for the MongoDB source endpoint.- Returns:
this
-
secretsManagerAccessRoleArn
@Stability(Stable) public CfnEndpoint.MongoDbSettingsProperty.Builder secretsManagerAccessRoleArn(String secretsManagerAccessRoleArn) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getSecretsManagerAccessRoleArn()
- Parameters:
secretsManagerAccessRoleArn
- The full Amazon Resource Name (ARN) of the IAM role that specifies AWS DMS as the trusted entity and grants the required permissions to access the value inSecretsManagerSecret
. The role must allow theiam:PassRole
action.SecretsManagerSecret
has the value of the AWS 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 forUserName
,Password
,ServerName
, andPort
. You can't specify both.For more information on creating this
SecretsManagerSecret
, the correspondingSecretsManagerAccessRoleArn
, and theSecretsManagerSecretId
that is required to access it, see Using secrets to access AWS Database Migration Service resources in the AWS Database Migration Service User Guide .- Returns:
this
-
secretsManagerSecretId
@Stability(Stable) public CfnEndpoint.MongoDbSettingsProperty.Builder secretsManagerSecretId(String secretsManagerSecretId) Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getSecretsManagerSecretId()
- Parameters:
secretsManagerSecretId
- The full ARN, partial ARN, or display name of theSecretsManagerSecret
that contains the MongoDB endpoint connection details.- Returns:
this
-
serverName
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getServerName()
- Parameters:
serverName
- The name of the server on the MongoDB source endpoint.- Returns:
this
-
username
Sets the value ofCfnEndpoint.MongoDbSettingsProperty.getUsername()
- Parameters:
username
- The user name you use to access the MongoDB source endpoint.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnEndpoint.MongoDbSettingsProperty>
- Returns:
- a new instance of
CfnEndpoint.MongoDbSettingsProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-