listAppsLists method

Future<ListAppsListsResponse> listAppsLists({
  1. required int maxResults,
  2. bool? defaultLists,
  3. String? nextToken,
})

Returns an array of AppsListDataSummary objects.

May throw InternalErrorException. May throw InvalidOperationException. May throw LimitExceededException. 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<ListAppsListsResponse> listAppsLists({
  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.ListAppsLists'
  };
  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 ListAppsListsResponse.fromJson(jsonResponse.body);
}