initiate_document_version_upload
¶
initiate_document_version_upload(
*,
config_overrides: Optional[WorkDocsClientConfig] = 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/work_docs.py
3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 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 | |