deleteFolder method

Future<void> deleteFolder({
  1. required String folderId,
  2. String? authenticationToken,
})

Permanently deletes the specified folder and its contents.

May throw ConcurrentModificationException. May throw ConflictingOperationException. May throw EntityNotExistsException. May throw FailedDependencyException. May throw LimitExceededException. May throw ProhibitedStateException. May throw ServiceUnavailableException. May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException.

Parameter folderId : The ID of the folder.

Parameter authenticationToken : Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Implementation

Future<void> deleteFolder({
  required String folderId,
  String? authenticationToken,
}) async {
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/api/v1/folders/${Uri.encodeComponent(folderId)}',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}