deleteDirectory method

Future<DeleteDirectoryResponse> deleteDirectory({
  1. required String directoryArn,
})

Deletes a directory. Only disabled directories can be deleted. A deleted directory cannot be undone. Exercise extreme caution when deleting directories.

May throw AccessDeniedException. May throw DirectoryDeletedException. May throw DirectoryNotDisabledException. May throw InternalServiceException. May throw InvalidArnException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw RetryableConflictException. May throw ValidationException.

Parameter directoryArn : The ARN of the directory to delete.

Implementation

Future<DeleteDirectoryResponse> deleteDirectory({
  required String directoryArn,
}) async {
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final response = await _protocol.send(
    payload: null,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/directory',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteDirectoryResponse.fromJson(response);
}