createEndpoint

Creates an endpoint using the provided settings.

For a MySQL source or target endpoint, don't explicitly specify the database using the DatabaseName request parameter on the CreateEndpoint API call. Specifying DatabaseName when you create a MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify the database only when you specify the schema in the table-mapping rules of the DMS task.

Samples

import aws.sdk.kotlin.services.databasemigrationservice.model.Tag
fun main() { 
   //sampleStart 
   // Creates an endpoint using the provided settings.
val resp = databaseMigrationClient.createEndpoint {
    endpointIdentifier = "test-endpoint-1"
    endpointType = ReplicationEndpointTypeValue.fromValue("source")
    engineName = "mysql"
    username = "username"
    password = "pasword"
    serverName = "mydb.cx1llnox7iyx.us-west-2.rds.amazonaws.com"
    port = 3306
    databaseName = "testdb"
    extraConnectionAttributes = ""
    kmsKeyId = "arn:aws:kms:us-east-1:123456789012:key/4c1731d6-5435-ed4d-be13-d53411a7cfbd"
    tags = listOf<Tag>(
        Tag {
            key = "Acount"
            value = "143327655"
        }            
    )
    certificateArn = ""
    sslMode = DmsSslModeValue.fromValue("require")
} 
   //sampleEnd
}