describeCases method
Returns a list of cases that you specify by passing one or more case IDs.
You can use the afterTime and beforeTime
parameters to filter the cases by date. You can set values for the
includeResolvedCases and includeCommunications
parameters to specify how much information to return.
The response returns the following in JSON format:
- One or more CaseDetails data types.
-
One or more
nextTokenvalues, which specify where to paginate the returned records represented by theCaseDetailsobjects.
May throw CaseIdNotFound.
May throw InternalServerError.
Parameter afterTime :
The start date for a filtered date search on support case communications.
Case communications are available for 12 months after creation.
Parameter beforeTime :
The end date for a filtered date search on support case communications.
Case communications are available for 12 months after creation.
Parameter caseIdList :
A list of ID numbers of the support cases you want returned. The maximum
number of cases is 100.
Parameter displayId :
The ID displayed for a case in the Amazon Web Services Support Center user
interface.
Parameter includeCommunications :
Specifies whether to include communications in the
DescribeCases response. By default, communications are
included.
Parameter includeResolvedCases :
Specifies whether to include resolved support cases in the
DescribeCases response. By default, resolved cases aren't
included.
Parameter language :
The language in which Amazon Web Services Support handles the case. Amazon
Web Services Support currently supports Chinese (“zh”), English ("en"),
Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for
the language parameter if you want support in that language.
Parameter maxResults :
The maximum number of results to return before paginating.
Parameter nextToken :
A resumption point for pagination.
Implementation
Future<DescribeCasesResponse> describeCases({
String? afterTime,
String? beforeTime,
List<String>? caseIdList,
String? displayId,
bool? includeCommunications,
bool? includeResolvedCases,
String? language,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
10,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSupport_20130415.DescribeCases'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (afterTime != null) 'afterTime': afterTime,
if (beforeTime != null) 'beforeTime': beforeTime,
if (caseIdList != null) 'caseIdList': caseIdList,
if (displayId != null) 'displayId': displayId,
if (includeCommunications != null)
'includeCommunications': includeCommunications,
if (includeResolvedCases != null)
'includeResolvedCases': includeResolvedCases,
if (language != null) 'language': language,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return DescribeCasesResponse.fromJson(jsonResponse.body);
}