deleteFolder method

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

Permanently deletes the specified folder and its contents.

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

Parameter folderId : The ID of the folder.

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

Implementation

Future<void> deleteFolder({
  required String folderId,
  String? authenticationToken,
}) async {
  ArgumentError.checkNotNull(folderId, 'folderId');
  _s.validateStringLength(
    'folderId',
    folderId,
    1,
    128,
    isRequired: true,
  );
  _s.validateStringLength(
    'authenticationToken',
    authenticationToken,
    1,
    8199,
  );
  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,
  );
}