initiate_document_version_upload
async
¶
initiate_document_version_upload(
*,
config_overrides: Optional[AsyncWorkDocsClientConfig] = None,
authentication_token: Optional[AuthenticationHeaderType] = None,
id: Optional[ResourceIdType] = None,
name: Optional[ResourceNameType] = None,
content_created_timestamp: Optional[TimestampType] = None,
content_modified_timestamp: Optional[TimestampType] = None,
content_type: Optional[DocumentContentType] = None,
document_size_in_bytes: Optional[SizeType] = None,
parent_folder_id: Optional[ResourceIdType] = None,
) -> InitiateDocumentVersionUploadResponse
Creates a new document object and version object.
The client specifies the parent folder ID and name of the document to upload. The ID is optionally specified when creating a new version of an existing document. This is the first step to upload a document. Next, upload the document to the URL returned from the call, and then call UpdateDocumentVersion.
To cancel the document upload, call AbortDocumentVersionUpload.
Parameters:
-
authentication_token(Optional[AuthenticationHeaderType], default:None) –Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
-
id(Optional[ResourceIdType], default:None) –The ID of the document.
-
name(Optional[ResourceNameType], default:None) –The name of the document.
-
content_created_timestamp(Optional[TimestampType], default:None) –The timestamp when the content of the document was originally created.
-
content_modified_timestamp(Optional[TimestampType], default:None) –The timestamp when the content of the document was modified.
-
content_type(Optional[DocumentContentType], default:None) –The content type of the document.
-
document_size_in_bytes(Optional[SizeType], default:None) –The size of the document, in bytes.
-
parent_folder_id(Optional[ResourceIdType], default:None) –The ID of the parent folder.
Raises:
-
DraftUploadOutOfSyncException–This exception is thrown when a valid checkout ID is not presented on document version upload calls for a document that has been checked out from Web client.
-
EntityAlreadyExistsException–The resource already exists.
-
EntityNotExistsException–The resource does not exist.
-
FailedDependencyException–The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.
-
InvalidArgumentException–The pagination marker or limit fields are not valid.
-
InvalidPasswordException–The password is invalid.
-
LimitExceededException–The maximum of 100,000 files and folders under the parent folder has been exceeded.
-
ProhibitedStateException–The specified document version is not in the INITIALIZED state.
-
ResourceAlreadyCheckedOutException–The resource is already checked out.
-
ServiceUnavailableException–One or more of the dependencies is unavailable.
-
StorageLimitExceededException–The storage limit has been exceeded.
-
StorageLimitWillExceedException–The storage limit will be exceeded.
-
UnauthorizedOperationException–The operation is not permitted.
-
UnauthorizedResourceAccessException–The caller does not have access to perform the action on the resource.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_workdocs/_services/async_work_docs.py
3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 | |