startMetadataModelExportAsScript

Queues an export of metadata models (database objects such as tables, views, and procedures) as a data definition language (DDL) script. The script is stored as a ZIP archive in the Amazon S3 bucket associated with the migration project. If other requests created by Start* operations are already in the migration project's queue, the export begins after they complete.

When exporting from the target metadata tree, the export applies only to metadata models created by conversion. Metadata models imported from the database are skipped.

To check the status of the export request, call DescribeMetadataModelExportsAsScript using the returned RequestIdentifier as a filter.

Required permissions:dms:StartMetadataModelExportAsScripts. For more information, see Actions, resources, and condition keys for Database Migration Service.

Samples

// The following example queues an export of converted metadata models for all objects in the
// ExampleSchema schema as data definition language (DDL) scripts to the S3 bucket associated with the migration
// project.
val resp = databaseMigrationClient.startMetadataModelExportAsScript {
    migrationProjectIdentifier = "arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS"
    selectionRules = "{\"rules\": [{\"rule-type\": \"selection\",\"rule-id\": \"1\",\"rule-name\": \"1\",\"object-locator\": {\"server-name\": \"example-target-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\"},\"rule-action\": \"explicit\"}]}"
    origin = OriginTypeValue.fromValue("TARGET")
    fileName = "ExampleScript"
}