Class: AWSCDK::DMS::CfnEndpoint::MongoDBSettingsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
dms/cfn_endpoint.rb

Overview

Provides information that defines a MongoDB endpoint.

This information includes the output format of records applied to the endpoint and details of transaction and control table data information. For more information about other available settings, see Endpoint configuration settings when using MongoDB as a source for AWS DMS in the AWS Database Migration Service User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auth_mechanism: nil, auth_source: nil, auth_type: nil, database_name: nil, docs_to_investigate: nil, extract_doc_id: nil, nesting_level: nil, password: nil, port: nil, secrets_manager_access_role_arn: nil, secrets_manager_secret_id: nil, server_name: nil, username: nil) ⇒ MongoDBSettingsProperty

Returns a new instance of MongoDBSettingsProperty.

Parameters:

  • auth_mechanism (String, nil) (defaults to: nil)

    The authentication mechanism you use to access the MongoDB source endpoint.

  • auth_source (String, nil) (defaults to: nil)

    The MongoDB database name. This setting isn't used when AuthType is set to "no" .

  • auth_type (String, nil) (defaults to: nil)

    The authentication type you use to access the MongoDB source endpoint.

  • database_name (String, nil) (defaults to: nil)

    The database name on the MongoDB source endpoint.

  • docs_to_investigate (String, nil) (defaults to: nil)

    Indicates the number of documents to preview to determine the document organization.

  • extract_doc_id (String, nil) (defaults to: nil)

    Specifies the document ID. Use this setting when NestingLevel is set to "none" .

  • nesting_level (String, nil) (defaults to: nil)

    Specifies either document or table mode.

  • password (String, nil) (defaults to: nil)

    The password for the user account you use to access the MongoDB source endpoint.

  • port (Numeric, nil) (defaults to: nil)

    The port value for the MongoDB source endpoint.

  • secrets_manager_access_role_arn (String, nil) (defaults to: nil)

    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 in SecretsManagerSecret .

  • secrets_manager_secret_id (String, nil) (defaults to: nil)

    The full ARN, partial ARN, or display name of the SecretsManagerSecret that contains the MongoDB endpoint connection details.

  • server_name (String, nil) (defaults to: nil)

    The name of the server on the MongoDB source endpoint.

  • username (String, nil) (defaults to: nil)

    The user name you use to access the MongoDB source endpoint.



2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
# File 'dms/cfn_endpoint.rb', line 2055

def initialize(auth_mechanism: nil, auth_source: nil, auth_type: nil, database_name: nil, docs_to_investigate: nil, extract_doc_id: nil, nesting_level: nil, password: nil, port: nil, secrets_manager_access_role_arn: nil, secrets_manager_secret_id: nil, server_name: nil, username: nil)
  @auth_mechanism = auth_mechanism
  Jsii::Type.check_type(@auth_mechanism, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authMechanism") unless @auth_mechanism.nil?
  @auth_source = auth_source
  Jsii::Type.check_type(@auth_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authSource") unless @auth_source.nil?
  @auth_type = auth_type
  Jsii::Type.check_type(@auth_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authType") unless @auth_type.nil?
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName") unless @database_name.nil?
  @docs_to_investigate = docs_to_investigate
  Jsii::Type.check_type(@docs_to_investigate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "docsToInvestigate") unless @docs_to_investigate.nil?
  @extract_doc_id = extract_doc_id
  Jsii::Type.check_type(@extract_doc_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "extractDocId") unless @extract_doc_id.nil?
  @nesting_level = nesting_level
  Jsii::Type.check_type(@nesting_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nestingLevel") unless @nesting_level.nil?
  @password = password
  Jsii::Type.check_type(@password, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "password") unless @password.nil?
  @port = port
  Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil?
  @secrets_manager_access_role_arn = secrets_manager_access_role_arn
  Jsii::Type.check_type(@secrets_manager_access_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretsManagerAccessRoleArn") unless @secrets_manager_access_role_arn.nil?
  @secrets_manager_secret_id = secrets_manager_secret_id
  Jsii::Type.check_type(@secrets_manager_secret_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretsManagerSecretId") unless @secrets_manager_secret_id.nil?
  @server_name = server_name
  Jsii::Type.check_type(@server_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverName") unless @server_name.nil?
  @username = username
  Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "username") unless @username.nil?
end

Instance Attribute Details

#auth_mechanismString? (readonly)

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" .



2090
2091
2092
# File 'dms/cfn_endpoint.rb', line 2090

def auth_mechanism
  @auth_mechanism
end

#auth_sourceString? (readonly)

The MongoDB database name. This setting isn't used when AuthType is set to "no" .

The default is "admin" .



2097
2098
2099
# File 'dms/cfn_endpoint.rb', line 2097

def auth_source
  @auth_source
end

#auth_typeString? (readonly)

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.



2104
2105
2106
# File 'dms/cfn_endpoint.rb', line 2104

def auth_type
  @auth_type
end

#database_nameString? (readonly)

The database name on the MongoDB source endpoint.



2109
2110
2111
# File 'dms/cfn_endpoint.rb', line 2109

def database_name
  @database_name
end

#docs_to_investigateString? (readonly)

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 .



2118
2119
2120
# File 'dms/cfn_endpoint.rb', line 2118

def docs_to_investigate
  @docs_to_investigate
end

#extract_doc_idString? (readonly)

Specifies the document ID. Use this setting when NestingLevel is set to "none" .

Default value is "false" .



2125
2126
2127
# File 'dms/cfn_endpoint.rb', line 2125

def extract_doc_id
  @extract_doc_id
end

#nesting_levelString? (readonly)

Specifies either document or table mode.

Default value is "none" . Specify "none" to use document mode. Specify "one" to use table mode.



2132
2133
2134
# File 'dms/cfn_endpoint.rb', line 2132

def nesting_level
  @nesting_level
end

#passwordString? (readonly)

The password for the user account you use to access the MongoDB source endpoint.



2137
2138
2139
# File 'dms/cfn_endpoint.rb', line 2137

def password
  @password
end

#portNumeric? (readonly)

The port value for the MongoDB source endpoint.



2142
2143
2144
# File 'dms/cfn_endpoint.rb', line 2142

def port
  @port
end

#secrets_manager_access_role_arnString? (readonly)

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 in SecretsManagerSecret .

The role must allow the iam: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 for UserName , Password , ServerName , and Port . You can't specify both.

For more information on creating this SecretsManagerSecret , the corresponding SecretsManagerAccessRoleArn , and the SecretsManagerSecretId that is required to access it, see Using secrets to access AWS Database Migration Service resources in the AWS Database Migration Service User Guide .



2153
2154
2155
# File 'dms/cfn_endpoint.rb', line 2153

def secrets_manager_access_role_arn
  @secrets_manager_access_role_arn
end

#secrets_manager_secret_idString? (readonly)

The full ARN, partial ARN, or display name of the SecretsManagerSecret that contains the MongoDB endpoint connection details.



2158
2159
2160
# File 'dms/cfn_endpoint.rb', line 2158

def secrets_manager_secret_id
  @secrets_manager_secret_id
end

#server_nameString? (readonly)

The name of the server on the MongoDB source endpoint.



2163
2164
2165
# File 'dms/cfn_endpoint.rb', line 2163

def server_name
  @server_name
end

#usernameString? (readonly)

The user name you use to access the MongoDB source endpoint.



2168
2169
2170
# File 'dms/cfn_endpoint.rb', line 2168

def username
  @username
end

Class Method Details

.jsii_propertiesObject



2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
# File 'dms/cfn_endpoint.rb', line 2170

def self.jsii_properties
  {
    :auth_mechanism => "authMechanism",
    :auth_source => "authSource",
    :auth_type => "authType",
    :database_name => "databaseName",
    :docs_to_investigate => "docsToInvestigate",
    :extract_doc_id => "extractDocId",
    :nesting_level => "nestingLevel",
    :password => "password",
    :port => "port",
    :secrets_manager_access_role_arn => "secretsManagerAccessRoleArn",
    :secrets_manager_secret_id => "secretsManagerSecretId",
    :server_name => "serverName",
    :username => "username",
  }
end

Instance Method Details

#to_jsiiObject



2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
# File 'dms/cfn_endpoint.rb', line 2188

def to_jsii
  result = {}
  result.merge!({
    "authMechanism" => @auth_mechanism,
    "authSource" => @auth_source,
    "authType" => @auth_type,
    "databaseName" => @database_name,
    "docsToInvestigate" => @docs_to_investigate,
    "extractDocId" => @extract_doc_id,
    "nestingLevel" => @nesting_level,
    "password" => @password,
    "port" => @port,
    "secretsManagerAccessRoleArn" => @secrets_manager_access_role_arn,
    "secretsManagerSecretId" => @secrets_manager_secret_id,
    "serverName" => @server_name,
    "username" => @username,
  })
  result.compact
end