Support / Client / describe_attachment
describe_attachment¶
- Support.Client.describe_attachment(**kwargs)¶
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 Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan to use the Amazon Web Services Support API. If you’re in an Amazon Web Services Region that doesn’t offer one of these Amazon Web Services Support plans, or if you haven’t transitioned to one of these plans, you can use the Amazon Web Services Support API with a Business, Enterprise On-Ramp, or Enterprise Support plan.
If you call the Amazon Web Services Support API from an account that doesn’t have an Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan, the
SubscriptionRequiredExceptionerror message appears. For information about changing your support plan, see Amazon Web Services Support.
Warning
DescribeAttachmentcan’t return attachments larger than 5 MB. If the specifiedattachmentIdrefers to an attachment larger than 5 MB, the request fails withInvalidParameterValueException.To download an attachment of any size, including attachments larger than 5 MB, use GetAttachmentDownloadLink.
GetAttachmentDownloadLinkreturns an Amazon S3 presigned URL that you can use to download the attachment directly.See also: AWS API Documentation
Request Syntax
response = client.describe_attachment( attachmentId='string', dryRun=True|False )
- Parameters:
attachmentId (string) –
[REQUIRED]
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.dryRun (boolean) – 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 aDryRunOperationException. When omitted or set tofalse, the request runs normally.
- Return type:
dict
- Returns:
Response Syntax
{ 'attachment': { 'fileName': 'string', 'data': b'bytes' } }
Response Structure
(dict) –
The content and file name of the attachment returned by the DescribeAttachment operation.
attachment (dict) –
This object includes the attachment content and file name.
In the previous response syntax, the value for the
dataparameter appears asblob, which is represented as a base64-encoded string. The value forfileNameis the name of the attachment, such astroubleshoot-screenshot.png.fileName (string) –
The name of the attachment file.
data (bytes) –
The content of the attachment file.
Exceptions
Support.Client.exceptions.InternalServerErrorSupport.Client.exceptions.DescribeAttachmentLimitExceededSupport.Client.exceptions.AttachmentIdNotFoundSupport.Client.exceptions.DryRunOperationException