listProtocolsLists method
Returns an array of ProtocolsListDataSummary objects.
May throw InternalErrorException.
May throw InvalidOperationException.
May throw ResourceNotFoundException.
Parameter maxResults :
The maximum number of objects that you want Firewall Manager to return for
this request. If more objects are available, in the response, Firewall
Manager provides a NextToken value that you can use in a
subsequent call to get the next batch of objects.
If you don't specify this, Firewall Manager returns all available objects.
Parameter defaultLists :
Specifies whether the lists to retrieve are default lists owned by
Firewall Manager.
Parameter nextToken :
If you specify a value for MaxResults in your list request,
and you have more objects than the maximum, Firewall Manager returns this
token in the response. For all but the first request, you provide the
token returned by the prior request in the request parameters, to retrieve
the next batch of objects.
Implementation
Future<ListProtocolsListsResponse> listProtocolsLists({
required int maxResults,
bool? defaultLists,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSFMS_20180101.ListProtocolsLists'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MaxResults': maxResults,
if (defaultLists != null) 'DefaultLists': defaultLists,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListProtocolsListsResponse.fromJson(jsonResponse.body);
}