Class CfnDataProvider.MongoDbSettingsProperty.Builder
java.lang.Object
software.amazon.awscdk.services.dms.CfnDataProvider.MongoDbSettingsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDataProvider.MongoDbSettingsProperty>
- Enclosing interface:
CfnDataProvider.MongoDbSettingsProperty
@Stability(Stable)
public static final class CfnDataProvider.MongoDbSettingsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDataProvider.MongoDbSettingsProperty>
A builder for
CfnDataProvider.MongoDbSettingsProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthMechanism
(String authMechanism) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getAuthMechanism()
authSource
(String authSource) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getAuthSource()
Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getAuthType()
build()
Builds the configured instance.certificateArn
(String certificateArn) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getCertificateArn()
databaseName
(String databaseName) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getDatabaseName()
Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getPort()
serverName
(String serverName) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getServerName()
Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getSslMode()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
port
Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getPort()
- Parameters:
port
- The port value for the MongoDB source endpoint. This parameter is required.- Returns:
this
-
serverName
@Stability(Stable) public CfnDataProvider.MongoDbSettingsProperty.Builder serverName(String serverName) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getServerName()
- Parameters:
serverName
- The name of the server on the MongoDB source endpoint. This parameter is required. For MongoDB Atlas, provide the server name for any of the servers in the replication set.- Returns:
this
-
authMechanism
@Stability(Stable) public CfnDataProvider.MongoDbSettingsProperty.Builder authMechanism(String authMechanism) Sets the value ofCfnDataProvider.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
@Stability(Stable) public CfnDataProvider.MongoDbSettingsProperty.Builder authSource(String authSource) Sets the value ofCfnDataProvider.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 ofCfnDataProvider.MongoDbSettingsProperty.getAuthType()
- Parameters:
authType
- 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.- Returns:
this
-
certificateArn
@Stability(Stable) public CfnDataProvider.MongoDbSettingsProperty.Builder certificateArn(String certificateArn) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getCertificateArn()
- Parameters:
certificateArn
- the value to be set.- Returns:
this
-
databaseName
@Stability(Stable) public CfnDataProvider.MongoDbSettingsProperty.Builder databaseName(String databaseName) Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getDatabaseName()
- Parameters:
databaseName
- The database name on the MongoDB source endpoint.- Returns:
this
-
sslMode
Sets the value ofCfnDataProvider.MongoDbSettingsProperty.getSslMode()
- Parameters:
sslMode
- the value to be set.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnDataProvider.MongoDbSettingsProperty>
- Returns:
- a new instance of
CfnDataProvider.MongoDbSettingsProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-