testMigration method

Future<TestMigrationResponse> testMigration({
  1. required List<CustomerNodeEndpoint> customerNodeEndpointList,
  2. required String replicationGroupId,
})

Async API to test connection between source and target replication group.

May throw InvalidParameterValueException. May throw InvalidReplicationGroupStateFault. May throw ReplicationGroupAlreadyUnderMigrationFault. May throw ReplicationGroupNotFoundFault.

Parameter customerNodeEndpointList : List of endpoints from which data should be migrated. List should have only one element.

Parameter replicationGroupId : The ID of the replication group to which data is to be migrated.

Implementation

Future<TestMigrationResponse> testMigration({
  required List<CustomerNodeEndpoint> customerNodeEndpointList,
  required String replicationGroupId,
}) async {
  final $request = <String, String>{
    if (customerNodeEndpointList.isEmpty)
      'CustomerNodeEndpointList': ''
    else
      for (var i1 = 0; i1 < customerNodeEndpointList.length; i1++)
        for (var e3 in customerNodeEndpointList[i1].toQueryMap().entries)
          'CustomerNodeEndpointList.member.${i1 + 1}.${e3.key}': e3.value,
    'ReplicationGroupId': replicationGroupId,
  };
  final $result = await _protocol.send(
    $request,
    action: 'TestMigration',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'TestMigrationResult',
  );
  return TestMigrationResponse.fromXml($result);
}