Support / Client / complete_attachment_upload
complete_attachment_upload¶
- Support.Client.complete_attachment_upload(**kwargs)¶
Completes an attachment upload that was started with GetAttachmentUploadLinks. After you upload a part of the file to its presigned Amazon S3 URL, call
CompleteAttachmentUploadwith thepartIndexandeTagof that part. You can include one part per call, or multiple parts in a single call. AfterCompleteAttachmentUploadhas been called for every part of the file, the service processes the upload asynchronously. Theattachment-readystatus might not be reflected immediately. Use DescribeAttachmentUploadStatus to poll for theuploadStatusto becomeattachment-readybefore passing theuploadIdto CreateCase or AddCommunicationToCase.See also: AWS API Documentation
Request Syntax
response = client.complete_attachment_upload( uploadId='string', completedUploads=[ { 'partIndex': 123, 'eTag': 'string' }, ], dryRun=True|False )
- Parameters:
uploadId (string) –
[REQUIRED]
The identifier associated with the upload to complete.
completedUploads (list) –
[REQUIRED]
The list of parts being reported as completed in this call. Each entry must contain the
partIndexof an uploaded part and theETagreturned by Amazon S3 when that part was uploaded.(dict) –
Identifies a single uploaded part of a multipart attachment upload. Pass a list of
CompletedUploadobjects to CompleteAttachmentUpload to finalize the upload.partIndex (integer) – [REQUIRED]
The index of the uploaded part. This is the same
partIndexvalue returned for the corresponding entry in theuploadUrlsfield of theGetAttachmentUploadLinksresponse.eTag (string) – [REQUIRED]
The ETag returned in the response headers when the part was uploaded to Amazon S3. The
ETagvalue identifies the part contents.
dryRun (boolean) – Specifies whether to validate the request without actually completing the upload. When set to
true, the request is validated but the upload isn’t finalized, and the operation returns aDryRunOperationException. When omitted or set tofalse, the request runs normally.
- Return type:
dict
- Returns:
Response Syntax
{ 'uploadStatus': 'attachment-ready'|'attachment-not-ready'|'failed' }
Response Structure
(dict) –
uploadStatus (string) –
The status of the multipart upload after the operation finalizes the attachment. Valid values:
attachment-ready,attachment-not-ready, andfailed.
Exceptions
Support.Client.exceptions.InternalServerErrorSupport.Client.exceptions.DryRunOperationExceptionSupport.Client.exceptions.UploadIdNotFound