describeAttachment method
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.
- You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.
-
If you call the Amazon Web Services Support API from an account that
doesn't have a Business, Enterprise On-Ramp, or Enterprise Support plan,
the
SubscriptionRequiredExceptionerror message appears. For information about changing your support plan, see Amazon Web Services Support.
May throw AttachmentIdNotFound.
May throw DescribeAttachmentLimitExceeded.
May throw InternalServerError.
Parameter attachmentId :
The ID of the attachment to return. Attachment IDs are returned by the
DescribeCommunications operation.
Implementation
Future<DescribeAttachmentResponse> describeAttachment({
required String attachmentId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSupport_20130415.DescribeAttachment'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'attachmentId': attachmentId,
},
);
return DescribeAttachmentResponse.fromJson(jsonResponse.body);
}