removeRegion method

Future<void> removeRegion({
  1. required String directoryId,
})

Stops all replication and removes the domain controllers from the specified Region. You cannot remove the primary Region with this operation. Instead, use the DeleteDirectory API.

May throw AccessDeniedException. May throw ClientException. May throw DirectoryDoesNotExistException. May throw DirectoryUnavailableException. May throw ServiceException. May throw UnsupportedOperationException.

Parameter directoryId : The identifier of the directory for which you want to remove Region replication.

Implementation

Future<void> removeRegion({
  required String directoryId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.RemoveRegion'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
    },
  );
}