moveReplicationTask method

Future<MoveReplicationTaskResponse> moveReplicationTask({
  1. required String replicationTaskArn,
  2. required String targetReplicationInstanceArn,
})

Moves a replication task from its current replication instance to a different target replication instance using the specified parameters. The target replication instance must be created with the same or later AWS DMS version as the current replication instance.

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

Parameter replicationTaskArn : The Amazon Resource Name (ARN) of the task that you want to move.

Parameter targetReplicationInstanceArn : The ARN of the replication instance where you want to move the task to.

Implementation

Future<MoveReplicationTaskResponse> moveReplicationTask({
  required String replicationTaskArn,
  required String targetReplicationInstanceArn,
}) async {
  ArgumentError.checkNotNull(replicationTaskArn, 'replicationTaskArn');
  ArgumentError.checkNotNull(
      targetReplicationInstanceArn, 'targetReplicationInstanceArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.MoveReplicationTask'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ReplicationTaskArn': replicationTaskArn,
      'TargetReplicationInstanceArn': targetReplicationInstanceArn,
    },
  );

  return MoveReplicationTaskResponse.fromJson(jsonResponse.body);
}