abortDocumentVersionUpload method

Future<void> abortDocumentVersionUpload({
  1. required String documentId,
  2. required String versionId,
  3. String? authenticationToken,
})

Aborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload. The client should make this call only when it no longer intends to upload the document version, or fails to do so.

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

Parameter documentId : The ID of the document.

Parameter versionId : The ID of the version.

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

Implementation

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