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
nextToken
values, which specify where to paginate the returned records represented by theCaseDetails
objects.
May throw InternalServerError. May throw CaseIdNotFound.
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 AWS Support Center user interface.
Parameter includeCommunications
:
Specifies whether to include communications in the
DescribeCases
response. By default, communications are
incuded.
Parameter includeResolvedCases
:
Specifies whether to include resolved support cases in the
DescribeCases
response. By default, resolved cases aren't
included.
Parameter language
:
The ISO 639-1 code for the language in which AWS provides support. AWS
Support currently supports English ("en") and Japanese ("ja"). Language
parameters must be passed explicitly for operations that take them.
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);
}