deleteFolderContents method

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

Deletes the contents of the specified folder.

May throw ConflictingOperationException. May throw EntityNotExistsException. May throw FailedDependencyException. 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> deleteFolderContents({
  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)}/contents',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}