listGateways method
Lists backup gateways owned by an Amazon Web Services account in an Amazon Web Services Region. The returned list is ordered by gateway Amazon Resource Name (ARN).
Parameter maxResults :
The maximum number of gateways to list.
Parameter nextToken :
The next item following a partial list of returned resources. For example,
if a request is made to return MaxResults number of
resources, NextToken allows you to return more items in your
list starting at the location pointed to by the next token.
Implementation
Future<ListGatewaysOutput> listGateways({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'BackupOnPremises_v20210101.ListGateways'
};
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 ListGatewaysOutput.fromJson(jsonResponse.body);
}