# REST Resource: responsePolicies

- [Resource: ResponsePolicy](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#ResponsePolicy)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#ResponsePolicy.SCHEMA_REPRESENTATION)
- [Network](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#Network)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#Network.SCHEMA_REPRESENTATION)
- [GKECluster](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#GKECluster)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#GKECluster.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#METHODS_SUMMARY)

## Resource: ResponsePolicy

A Response Policy is a collection of selectors that apply to queries made against one or more Virtual Private Cloud networks.

| JSON representation |
|---|
| ``` { "id": string, "responsePolicyName": string, "description": string, "networks": [ { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#Network`) } ], "gkeClusters": [ { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#GKECluster`) } ], "labels": { string: string, ... }, "kind": string } ``` |

| Fields ||
|---|---|
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Unique identifier for the resource; defined by the server (output only). |
| `responsePolicyName` | `string` User assigned name for this Response Policy. |
| `description` | `string` User-provided description for this Response Policy. |
| `networks[]` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#Network`)`` responsePolicies.list of network names specifying networks to which this policy is applied. |
| `gkeClusters[]` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies#GKECluster`)`` The list of Google Kubernetes Engine clusters to which this response policy is applied. |
| `labels` | `map (key: string, value: string)` User labels. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `kind` | `string` |

## Network

| JSON representation |
|---|
| ``` { "networkUrl": string, "kind": string } ``` |

| Fields ||
|---|---|
| `networkUrl` | `string` The fully qualified URL of the VPC network to bind to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}` |
| `kind` | `string` |

## GKECluster

| JSON representation |
|---|
| ``` { "gkeClusterName": string, "kind": string } ``` |

| Fields ||
|---|---|
| `gkeClusterName` | `string` The resource name of the cluster to bind this response policy to. This should be specified in the format like: projects/\*/locations/\*/clusters/\*. This is referenced from GKE projects.locations.clusters.get API: <https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get> |
| `kind` | `string` |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies/create` | Creates a new Response Policy |
| ### `https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies/delete` | Deletes a previously created Response Policy. |
| ### `https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies/get` | Fetches the representation of an existing Response Policy. |
| ### `https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies/list` | Enumerates all Response Policies associated with a project. |
| ### `https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies/patch` | Applies a partial update to an existing Response Policy. |
| ### `https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/responsePolicies/update` | Updates an existing Response Policy. |