describeAttachment method

Future<DescribeAttachmentResponse> describeAttachment({
  1. required String attachmentId,
})

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 or Enterprise support plan to use the AWS Support API.
  • If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the SubscriptionRequiredException error message appears. For information about changing your support plan, see AWS Support.

May throw InternalServerError. May throw DescribeAttachmentLimitExceeded. May throw AttachmentIdNotFound.

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 {
  ArgumentError.checkNotNull(attachmentId, 'attachmentId');
  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);
}