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 ResourceNotFoundException. May throw DirectoryNotDisabledException. May throw InternalServiceException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw DirectoryDeletedException. May throw RetryableConflictException. May throw InvalidArnException.

Parameter directoryArn : The ARN of the directory to delete.

Implementation

Future<DeleteDirectoryResponse> deleteDirectory({
  required String directoryArn,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  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);
}