describeFleets method
Retrieves a list that describes one or more specified fleets, if the fleet names are provided. Otherwise, all fleets in the account are described.
May throw ResourceNotFoundException.
Parameter names
:
The names of the fleets to describe.
Parameter nextToken
:
The pagination token to use to retrieve the next page of results for this
operation. If this value is null, it retrieves the first page.
Implementation
Future<DescribeFleetsResult> describeFleets({
List<String>? names,
String? nextToken,
}) async {
_s.validateStringLength(
'nextToken',
nextToken,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'PhotonAdminProxyService.DescribeFleets'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (names != null) 'Names': names,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeFleetsResult.fromJson(jsonResponse.body);
}