startMetadataModelExportToTarget method
Queues an export of the selected converted metadata models (database
objects such as tables, views, and procedures) to your target database. If
other requests created by Start* operations are already in
the migration project's queue, the export begins after they complete.
This operation requires a non-virtual target data provider.
The export applies only metadata models created by conversion. Metadata models imported from the database are skipped. The operation installs the extension pack on the target database. For more information, see Using extension packs in DMS Schema Conversion.
To check the status of the export request, call DescribeMetadataModelExportsToTarget
using the returned RequestIdentifier as a filter.
Required permissions:
dms:StartMetadataModelExportToTarget. For more information,
see Actions,
resources, and condition keys for Database Migration Service.
May throw AccessDeniedFault.
May throw InvalidResourceStateFault.
May throw KMSKeyNotAccessibleFault.
May throw ResourceAlreadyExistsFault.
May throw ResourceNotFoundFault.
May throw ResourceQuotaExceededFault.
May throw S3AccessDeniedFault.
May throw S3ResourceNotFoundFault.
Parameter migrationProjectIdentifier :
The migration project name or Amazon Resource Name (ARN).
Parameter selectionRules :
A JSON string that identifies the metadata models to export to the target
database. For the selection rule format and examples, see Selection
rules in DMS Schema Conversion.
Usage:
-
Accepts only target selection rules, where
server-namein the object locator matches the target data provider. -
Supports
explicit,include, andexcluderule actions.
Parameter overwriteExtensionPack :
Specifies whether to overwrite the extension pack if one already exists on
the target database. The default value is true.
Implementation
Future<StartMetadataModelExportToTargetResponse>
startMetadataModelExportToTarget({
required String migrationProjectIdentifier,
required String selectionRules,
bool? overwriteExtensionPack,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.StartMetadataModelExportToTarget'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MigrationProjectIdentifier': migrationProjectIdentifier,
'SelectionRules': selectionRules,
if (overwriteExtensionPack != null)
'OverwriteExtensionPack': overwriteExtensionPack,
},
);
return StartMetadataModelExportToTargetResponse.fromJson(jsonResponse.body);
}