listAccelerators method
List the accelerators for an AWS account.
May throw InvalidArgumentException. May throw InvalidNextTokenException. May throw InternalServiceErrorException.
Parameter maxResults
:
The number of Global Accelerator objects that you want to return with this
call. The default value is 10.
Parameter nextToken
:
The token for the next set of results. You receive this token from a
previous call.
Implementation
Future<ListAcceleratorsResponse> listAccelerators({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
255,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GlobalAccelerator_V20180706.ListAccelerators'
};
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 ListAcceleratorsResponse.fromJson(jsonResponse.body);
}