addCommunicationToCase method
Adds additional customer communication to an Amazon Web Services Support
case. Use the caseId parameter to identify the case to which
to add communication. You can list a set of email addresses to copy on the
communication by using the ccEmailAddresses parameter. The
communicationBody value contains the text of the
communication.
- 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 AttachmentSetExpired.
May throw AttachmentSetIdNotFound.
May throw CaseIdNotFound.
May throw InternalServerError.
Parameter communicationBody :
The body of an email communication to add to the support case.
Parameter attachmentSetId :
The ID of a set of one or more attachments for the communication to add to
the case. Create the set by calling AddAttachmentsToSet
Parameter caseId :
The support case ID requested or returned in the call. The case ID is an
alphanumeric string formatted as shown in this example:
case-12345678910-2013-c4c1d2bf33c5cf47
Parameter ccEmailAddresses :
The email addresses in the CC line of an email to be added to the support
case.
Implementation
Future<AddCommunicationToCaseResponse> addCommunicationToCase({
required String communicationBody,
String? attachmentSetId,
String? caseId,
List<String>? ccEmailAddresses,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSupport_20130415.AddCommunicationToCase'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'communicationBody': communicationBody,
if (attachmentSetId != null) 'attachmentSetId': attachmentSetId,
if (caseId != null) 'caseId': caseId,
if (ccEmailAddresses != null) 'ccEmailAddresses': ccEmailAddresses,
},
);
return AddCommunicationToCaseResponse.fromJson(jsonResponse.body);
}