startMetadataModelExportAsScript
inline suspend fun DatabaseMigrationClient.startMetadataModelExportAsScript(crossinline block: StartMetadataModelExportAsScriptRequest.Builder.() -> Unit): StartMetadataModelExportAsScriptResponse
Saves your converted code to a file as a SQL script, and stores this file on your Amazon S3 bucket.
Samples
import aws.sdk.kotlin.services.databasemigrationservice.model.OriginTypeValue
fun main() {
//sampleStart
// Saves your converted code to a file as a SQL script, and stores this file on your S3 bucket.
val resp = databaseMigrationClient.startMetadataModelExportAsScript {
migrationProjectIdentifier = "arn:aws:dms:us-east-1:012345678901:migration-project:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ012"
selectionRules = "{\"rules\": [{\"rule-type\": \"selection\",\"rule-id\": \"1\",\"rule-name\": \"1\",\"object-locator\": {\"server-name\": \"aurora-pg.cluster-0a1b2c3d4e5f.us-east-1.rds.amazonaws.com\", \"schema-name\": \"schema1\", \"table-name\": \"Cities\"},\"rule-action\": \"explicit\"} ]}"
origin = OriginTypeValue.fromValue("SOURCE")
fileName = "FILE"
}
//sampleEnd
}