listAssociations method

Future<FirewallPoliciesListAssociationsResponse> listAssociations({
  1. String? targetResource,
  2. String? $fields,
})

Lists associations of a specified target, i.e., organization or folder.

Request parameters:

targetResource - The target resource to list associations. It is an organization, or a folder.

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

Completes with a FirewallPoliciesListAssociationsResponse.

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<FirewallPoliciesListAssociationsResponse> listAssociations({
  core.String? targetResource,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (targetResource != null) 'targetResource': [targetResource],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'locations/global/firewallPolicies/listAssociations';

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