startMetadataModelConversion method
Queues a conversion of the selected source metadata models (database
objects such as tables, views, and procedures) to the target database
format. If other requests created by Start* operations are
already in the migration project's queue, the conversion begins after they
complete.
The conversion request loads metadata models that are not yet in the
metadata tree, but does not reload metadata models that are already
present. If your source database has changed since the metadata was
loaded, refresh the affected metadata models with StartMetadataModelImport
before calling this operation.
To check the status of the conversion request, call DescribeMetadataModelConversions
using the returned RequestIdentifier as a filter.
To cancel a queued or in-progress request, call CancelMetadataModelConversion
with the returned RequestIdentifier.
After the conversion completes successfully:
- To export a post-conversion assessment report, call ExportMetadataModelAssessment.
-
To retrieve converted code, use any of the following options:
- DescribeMetadataModel and DescribeMetadataModelChildren – navigate the target metadata tree and retrieve converted definitions.
- StartMetadataModelExportAsScript – export as data definition language (DDL) scripts to your Amazon S3 bucket.
- StartMetadataModelExportToTarget – apply directly to your target database.
dms:StartMetadataModelConversion. 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 convert. For the
selection rule format and examples, see Selection
rules in DMS Schema Conversion.
Usage:
-
Accepts only source selection rules, where
server-namein the object locator matches the source data provider. -
Supports
explicit,include, andexcluderule actions.
Implementation
Future<StartMetadataModelConversionResponse> startMetadataModelConversion({
required String migrationProjectIdentifier,
required String selectionRules,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.StartMetadataModelConversion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MigrationProjectIdentifier': migrationProjectIdentifier,
'SelectionRules': selectionRules,
},
);
return StartMetadataModelConversionResponse.fromJson(jsonResponse.body);
}