rebootReplicationInstance method

Future<RebootReplicationInstanceResponse> rebootReplicationInstance({
  1. required String replicationInstanceArn,
  2. bool? forceFailover,
})

Reboots a replication instance. Rebooting results in a momentary outage, until the replication instance becomes available again.

May throw ResourceNotFoundFault. May throw InvalidResourceStateFault.

Parameter replicationInstanceArn : The Amazon Resource Name (ARN) of the replication instance.

Parameter forceFailover : If this parameter is true, the reboot is conducted through a Multi-AZ failover. (If the instance isn't configured for Multi-AZ, then you can't specify true.)

Implementation

Future<RebootReplicationInstanceResponse> rebootReplicationInstance({
  required String replicationInstanceArn,
  bool? forceFailover,
}) async {
  ArgumentError.checkNotNull(
      replicationInstanceArn, 'replicationInstanceArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.RebootReplicationInstance'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ReplicationInstanceArn': replicationInstanceArn,
      if (forceFailover != null) 'ForceFailover': forceFailover,
    },
  );

  return RebootReplicationInstanceResponse.fromJson(jsonResponse.body);
}