getTargetSelectionRules method

Future<GetTargetSelectionRulesResponse> getTargetSelectionRules({
  1. required String migrationProjectIdentifier,
  2. required String selectionRules,
})

Converts source selection rules into their target counterparts for schema conversion operations.

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

May throw AccessDeniedFault. May throw InvalidResourceStateFault. May throw ResourceNotFoundFault.

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

Parameter selectionRules : A JSON string that contains the source selection rules to convert into their target counterparts. 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.
  • Does not support category-name in the object locator.
  • Up to 10 rules are allowed.

Implementation

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

  return GetTargetSelectionRulesResponse.fromJson(jsonResponse.body);
}