describeMetadataModel method

Future<DescribeMetadataModelResponse> describeMetadataModel({
  1. required String migrationProjectIdentifier,
  2. required OriginTypeValue origin,
  3. required String selectionRules,
})

Gets detailed information about the specified metadata model, including its definition and corresponding converted objects in the target database if applicable.

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

May throw AccessDeniedFault. May throw ResourceNotFoundFault.

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

Parameter origin : Specifies whether to retrieve metadata from the source or target tree. Valid values: SOURCE | TARGET

Parameter selectionRules : A JSON string that identifies the metadata model to retrieve. For the selection rule format and examples, see Selection rules in DMS Schema Conversion.

Usage:

  • Accepts source or target selection rules depending on the Origin parameter. The server-name in the object locator must match the corresponding data provider.
  • Supports only explicit rule actions.
  • Exactly one rule is allowed.

Implementation

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

  return DescribeMetadataModelResponse.fromJson(jsonResponse.body);
}