startMetadataModelAssessment method

Future<StartMetadataModelAssessmentResponse> startMetadataModelAssessment({
  1. required String migrationProjectIdentifier,
  2. required String selectionRules,
})

Queues an assessment of the selected source metadata models (database objects such as tables, views, and procedures) to evaluate conversion complexity to the target database format. If other requests created by Start* operations are already in the migration project's queue, the assessment begins after they complete.

The assessment 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 assessment request, call DescribeMetadataModelAssessments using the returned RequestIdentifier as a filter.

To export the conversion assessment report after the request completes successfully, call ExportMetadataModelAssessment.

Required permissions: dms:StartMetadataModelAssessment. 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 assess. For the selection rule format and examples, see Selection rules in DMS Schema Conversion.

Usage:

  • Accepts only source selection rules, where server-name in the object locator matches the source data provider.
  • Supports explicit, include, and exclude rule actions.

Implementation

Future<StartMetadataModelAssessmentResponse> startMetadataModelAssessment({
  required String migrationProjectIdentifier,
  required String selectionRules,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.StartMetadataModelAssessment'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'MigrationProjectIdentifier': migrationProjectIdentifier,
      'SelectionRules': selectionRules,
    },
  );

  return StartMetadataModelAssessmentResponse.fromJson(jsonResponse.body);
}