View a markdown version of this page

DescribeAttachment - AWS Support

DescribeAttachment

Returns the attachment that has the specified ID. Attachments can include screenshots, error logs, or other files that describe your issue. Attachment IDs are generated by the case management system when you add an attachment to a case or case communication. Attachment IDs are returned in the AttachmentDetails objects that are returned by the DescribeCommunications operation.

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.

Important

DescribeAttachment can't return attachments larger than 5 MB. If the specified attachmentId refers to an attachment larger than 5 MB, the request fails with InvalidParameterValueException.

To download an attachment of any size, including attachments larger than 5 MB, use GetAttachmentDownloadLink. GetAttachmentDownloadLink returns an Amazon S3 presigned URL that you can use to download the attachment directly.

Request Syntax

{ "attachmentId": "string", "dryRun": boolean }

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.

attachmentId

The ID of the attachment to return. Attachment IDs are returned by the DescribeCommunications operation.

If the specified attachment is larger than 5 MB, this operation returns InvalidParameterValueException. To download attachments larger than 5 MB, use GetAttachmentDownloadLink.

Type: String

dryRun

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

Type: Boolean

Response Syntax

{ "attachment": { "data": blob, "fileName": "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.

attachment

This object includes the attachment content and file name.

In the previous response syntax, the value for the data parameter appears as blob, which is represented as a base64-encoded string. The value for fileName is the name of the attachment, such as troubleshoot-screenshot.png.

Type: Attachment object

Errors

For information about the errors that are common to all actions, see Common Error Types.

AttachmentIdNotFound

An attachment with the specified ID could not be found.

message

An attachment with the specified ID could not be found.

HTTP Status Code: 400

DescribeAttachmentLimitExceeded

The limit for the number of DescribeAttachment requests in a short period of time has been exceeded.

message

The limit for the number of DescribeAttachment requests in a short period of time has been exceeded.

HTTP Status Code: 400

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

See Also

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