View a markdown version of this page

GetAttachmentUploadLinks - AWS Support

GetAttachmentUploadLinks

Returns one or more presigned upload URLs for uploading a large file attachment to a support case by using a multipart upload workflow. The maximum file size that you can upload with this workflow is 150 MB, and parts can be up to 100 MB each. Initiate a new upload by providing fileName and fileSizeBytes; the response returns a unique uploadId, the part size, the total number of parts, and a list of presigned upload URLs for the requested range of parts. A maximum of 10 upload URLs are returned per call. To retrieve more upload URLs for an upload that's already in progress, call GetAttachmentUploadLinks again with the existing uploadId and a new uploadRange.

Upload each part to its presigned URL by using HTTP PUT and capture the ETag from the response. After you upload all parts, call CompleteAttachmentUpload with the uploadId and the list of part indexes and ETags to finalize the upload. You can then attach the upload to a case by passing the uploadId in the uploadIds parameter of CreateCase or AddCommunicationToCase. To monitor progress before completion, call DescribeAttachmentUploadStatus.

Note
  • You must have an AWS Business Support+, AWS Enterprise Support, or AWS Unified Operations plan to use the AWS Support API. If you're in an AWS Region that doesn't offer one of these AWS Support plans, or if you haven't transitioned to one of these plans, you can use the AWS Support API with a Business, Enterprise On-Ramp, or Enterprise Support plan.

  • If you call the AWS Support API from an account that doesn't have an AWS Business Support+, AWS Enterprise Support, or AWS Unified Operations plan, the SubscriptionRequiredException error message appears. For information about changing your support plan, see AWS Support.

{ "dryRun": boolean, "fileName": "string", "fileSizeBytes": number, "uploadId": "string", "uploadRange": { "endIndex": number, "startIndex": number } }

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Specifies whether to validate the request without actually generating upload URLs. When set to true, the request is validated but no URLs are returned, and the operation returns a DryRunOperationException. When omitted or set to false, the request runs normally.

Type: Boolean

The name of the file to upload, including the file extension. This value is required when you initiate a new upload.

Type: String

The total size of the file in bytes. The service uses this value to calculate the total number of parts and the size of each part. Required when you initiate a new upload (when uploadId isn't provided). Valid range: 1 to 157,286,400 bytes (approximately 150 MB).

Type: Long

Valid Range: Minimum value of 1. Maximum value of 157286400.

The unique identifier of an in-progress multipart upload, returned by a previous call to GetAttachmentUploadLinks. Specify uploadId to retrieve additional presigned upload URLs for an upload that has already been initiated. Required when fileSizeBytes isn't provided. Length: 1 to 2,048 characters.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

The range of part indexes for which to return presigned upload URLs. Use this parameter to page through the upload URLs for a large file across multiple calls. If you omit this parameter, the service determines the range to return.

Type: UploadRange object

{ "nextIndex": number, "partSizeBytes": number, "totalParts": number, "uploadId": "string", "uploadUrls": [ { "expiryDate": "string", "partIndex": number, "url": "string" } ] }

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

The next part index to request presigned URLs for. If all upload URLs for the file have been returned, this field is null. Use this value as the startIndex in uploadRange on a subsequent call to GetAttachmentUploadLinks to retrieve the next batch of upload URLs.

Type: Integer

The size, in bytes, of each part. Split the file into parts of this size before you upload them to the presigned URLs. For an upload with n total parts, parts 1 through n - 1 are exactly this size; the last part may be smaller. Maximum: 104,857,600 bytes (approximately 100 MB).

Type: Long

Valid Range: Minimum value of 1. Maximum value of 104857600.

The total number of parts that the file is split into. Upload one part to each presigned URL.

Type: Integer

The unique identifier for the multipart upload. Use this value in subsequent calls to GetAttachmentUploadLinks, DescribeAttachmentUploadStatus, and CompleteAttachmentUpload, and to attach the upload to a case through the uploadIds parameter on CreateCase or AddCommunicationToCase.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

The list of presigned upload URLs for the requested range of parts. The list contains at most 10 URLs per call. Upload each part to its corresponding URL by using HTTP PUT before the URL expires.

Type: Array of UploadUrl objects

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 dryRun was set to true.

HTTP Status Code: 400

InternalServerError

An internal server error occurred.

message

An internal server error occurred.

HTTP Status Code: 500

UploadIdNotFound

The specified uploadId couldn't be located.

HTTP Status Code: 400

For more information about using this API in one of the language-specific AWS SDKs, see the following: