CompleteAttachmentUpload
Completes an attachment upload that was started with GetAttachmentUploadLinks. After you upload a part of the file to its
presigned Amazon S3 URL, call CompleteAttachmentUpload with the
partIndex and eTag of that part. You can include one part per
call, or multiple parts in a single call. After CompleteAttachmentUpload has
been called for every part of the file, the service processes the upload asynchronously. The
attachment-ready status might not be reflected immediately. Use DescribeAttachmentUploadStatus to poll for the uploadStatus to
become attachment-ready before passing the uploadId to CreateCase or AddCommunicationToCase.
Request Syntax
{
"completedUploads": [
{
"eTag": "string",
"partIndex": number
}
],
"dryRun": boolean,
"uploadId": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- completedUploads
-
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.Type: Array of CompletedUpload objects
- dryRun
-
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.Type: Boolean
- uploadId
-
The identifier associated with the upload to complete.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Response Syntax
{
"uploadStatus": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- uploadStatus
-
The status of the multipart upload after the operation finalizes the attachment. Valid values:
attachment-ready,attachment-not-ready, andfailed.Type: String
Valid Values:
attachment-ready | attachment-not-ready | failed
Errors
For information about the errors that are common to all actions, see Common Error Types.
- DryRunOperationException
-
The request was valid, but the operation wasn't performed because
dryRunwas set totrue.HTTP Status Code: 400
- InternalServerError
-
An internal server error occurred.
- message
-
An internal server error occurred.
HTTP Status Code: 500
- UploadIdNotFound
-
The specified
uploadIdcouldn't be located.HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: