exportMetadataModelAssessment method

Future<ExportMetadataModelAssessmentResponse> exportMetadataModelAssessment({
  1. required String migrationProjectIdentifier,
  2. required String selectionRules,
  3. List<AssessmentReportType>? assessmentReportTypes,
  4. String? fileName,
})

Saves a copy of a database migration assessment report to your Amazon S3 bucket. DMS can save your assessment report as a comma-separated value (CSV) or a PDF file.

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

May throw ResourceNotFoundFault.

Parameter migrationProjectIdentifier : The migration project name or Amazon Resource Name (ARN).

Parameter selectionRules : A JSON string that identifies the metadata models to export a conversion assessment report for. 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 only explicit rule actions.

Parameter assessmentReportTypes : The file format of the assessment file.

Parameter fileName : The name of the assessment file to create in your Amazon S3 bucket.

Implementation

Future<ExportMetadataModelAssessmentResponse> exportMetadataModelAssessment({
  required String migrationProjectIdentifier,
  required String selectionRules,
  List<AssessmentReportType>? assessmentReportTypes,
  String? fileName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.ExportMetadataModelAssessment'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'MigrationProjectIdentifier': migrationProjectIdentifier,
      'SelectionRules': selectionRules,
      if (assessmentReportTypes != null)
        'AssessmentReportTypes':
            assessmentReportTypes.map((e) => e.value).toList(),
      if (fileName != null) 'FileName': fileName,
    },
  );

  return ExportMetadataModelAssessmentResponse.fromJson(jsonResponse.body);
}