list method

Future<ListIngressRulesResponse> list(
  1. String appsId, {
  2. String? matchingAddress,
  3. int? pageSize,
  4. String? pageToken,
  5. String? $fields,
})

Lists the firewall rules of an application.

Request parameters:

appsId - Part of parent. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.

matchingAddress - A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.

pageSize - Maximum results to return per page.

pageToken - Continuation token for fetching the next page of results.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListIngressRulesResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<ListIngressRulesResponse> list(
  core.String appsId, {
  core.String? matchingAddress,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (matchingAddress != null) 'matchingAddress': [matchingAddress],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/apps/' +
      commons.escapeVariable('$appsId') +
      '/firewall/ingressRules';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListIngressRulesResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}