DatabaseMigrationService / Client / start_metadata_model_export_as_script
start_metadata_model_export_as_script¶
- DatabaseMigrationService.Client.start_metadata_model_export_as_script(**kwargs)¶
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
RequestIdentifieras a filter.Required permissions:
dms:StartMetadataModelExportAsScripts. For more information, see Actions, resources, and condition keys for Database Migration Service.See also: AWS API Documentation
Request Syntax
response = client.start_metadata_model_export_as_script( MigrationProjectIdentifier='string', SelectionRules='string', Origin='SOURCE'|'TARGET', FileName='string' )
- Parameters:
MigrationProjectIdentifier (string) –
[REQUIRED]
The migration project name or Amazon Resource Name (ARN).
SelectionRules (string) –
[REQUIRED]
A JSON string that identifies the metadata models to export as a SQL script. For the selection rule format and examples, see Selection rules in DMS Schema Conversion.
Usage:
Accepts source or target selection rules depending on the
Originparameter. Theserver-namein the object locator must match the corresponding data provider.Supports
explicit,include, andexcluderule actions.
Origin (string) –
[REQUIRED]
Specifies the metadata tree to export from.
FileName (string) – The name for the exported file. When you omit this parameter, the service generates a name from the data provider engine name and an export timestamp.
- Return type:
dict
- Returns:
Response Syntax
{ 'RequestIdentifier': 'string' }
Response Structure
(dict) –
RequestIdentifier (string) –
The identifier for the export request.
Exceptions
DatabaseMigrationService.Client.exceptions.AccessDeniedFaultDatabaseMigrationService.Client.exceptions.InvalidResourceStateFaultDatabaseMigrationService.Client.exceptions.ResourceAlreadyExistsFaultDatabaseMigrationService.Client.exceptions.ResourceNotFoundFaultDatabaseMigrationService.Client.exceptions.KMSKeyNotAccessibleFaultDatabaseMigrationService.Client.exceptions.ResourceQuotaExceededFaultDatabaseMigrationService.Client.exceptions.S3ResourceNotFoundFaultDatabaseMigrationService.Client.exceptions.S3AccessDeniedFault