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.

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 : The JSON string that specifies which metadata model to retrieve. Only one selection rule with "rule-action": "explicit" can be provided. For more information, see Selection Rules in the DMS User Guide.

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);
}