listAppsLists method

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

Returns an array of AppsListDataSummary objects.

May throw ResourceNotFoundException. May throw InvalidOperationException. May throw LimitExceededException. May throw InternalErrorException.

Parameter maxResults : The maximum number of objects that you want AWS Firewall Manager to return for this request. If more objects are available, in the response, AWS 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, AWS Firewall Manager returns all available objects.

Parameter defaultLists : Specifies whether the lists to retrieve are default lists owned by AWS Firewall Manager.

Parameter nextToken : If you specify a value for MaxResults in your list request, and you have more objects than the maximum, AWS 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 {
  ArgumentError.checkNotNull(maxResults, 'maxResults');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
    isRequired: true,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    4096,
  );
  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);
}