Method: regionNetworkPolicies.getAssociation

Gets an association with the specified name.

HTTP request

GET https://compute.googleapis.com/compute/beta/projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getAssociation

The URL usesgRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to theservice error catalog

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region of this request.

networkPolicy

string

Name of the network policy to which the queried association belongs.

Query parameters

Parameters
name

string

The name of the association to get from the network policy.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{"name":string,"attachmentTarget":string}
Fields
name

string

The name for an association.

attachmentTarget

string

The target that the network policy is attached to.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/compute.readonly
  • https://www.googleapis.com/auth/compute
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the followingIAM permissions:

  • compute.regionNetworkPolicies.get

To find predefined roles that contain those permissions, seeCompute Engine IAM Roles.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-08 UTC.