describeJobs method
Returns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime
- latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to Support and only used in response to relevant support tickets.
May throw InternalServerException.
May throw ThrottlingException.
May throw UninitializedAccountException.
May throw ValidationException.
Parameter filters :
A set of filters by which to return Jobs.
Parameter maxResults :
Maximum number of Jobs to retrieve.
Parameter nextToken :
The token of the next Job to retrieve.
Implementation
Future<DescribeJobsResponse> describeJobs({
DescribeJobsRequestFilters? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1152921504606846976,
);
final $payload = <String, dynamic>{
if (filters != null) 'filters': filters,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/DescribeJobs',
exceptionFnMap: _exceptionFns,
);
return DescribeJobsResponse.fromJson(response);
}