listClusterJobs method
Returns an array of JobListEntry objects of the specified
length. Each JobListEntry object is for a job in the
specified cluster and contains a job's state, a job's ID, and other
information.
May throw InvalidResourceException. May throw InvalidNextTokenException.
Parameter clusterId :
The 39-character ID for the cluster that you want to list, for example
CID123e4567-e89b-12d3-a456-426655440000.
Parameter maxResults :
The number of JobListEntry objects to return.
Parameter nextToken :
HTTP requests are stateless. To identify what object comes "next" in the
list of JobListEntry objects, you have the option of
specifying NextToken as the starting point for your returned
list.
Implementation
Future<ListClusterJobsResult> listClusterJobs({
required String clusterId,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(clusterId, 'clusterId');
_s.validateStringLength(
'clusterId',
clusterId,
39,
39,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIESnowballJobManagementService.ListClusterJobs'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterId': clusterId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListClusterJobsResult.fromJson(jsonResponse.body);
}