deleteFolderContents method

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

Deletes the contents of the specified folder.

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