listClusters method
Returns an array of ClusterListEntry objects of the specified
length. Each ClusterListEntry object contains a cluster's
state, a cluster's ID, and other important status information.
May throw InvalidNextTokenException.
Parameter maxResults :
The number of ClusterListEntry objects to return.
Parameter nextToken :
HTTP requests are stateless. To identify what object comes "next" in the
list of ClusterListEntry objects, you have the option of
specifying NextToken as the starting point for your returned
list.
Implementation
Future<ListClustersResult> listClusters({
int? maxResults,
String? nextToken,
}) async {
_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.ListClusters'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListClustersResult.fromJson(jsonResponse.body);
}