- [Resource: Policy](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Policy)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Policy.SCHEMA_REPRESENTATION)
- [Network](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Network)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Network.SCHEMA_REPRESENTATION)
- [AlternativeNameServerConfig](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#AlternativeNameServerConfig)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#AlternativeNameServerConfig.SCHEMA_REPRESENTATION)
- [TargetNameServer](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#TargetNameServer)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#TargetNameServer.SCHEMA_REPRESENTATION)
- [ForwardingPath](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#ForwardingPath)
- [OutboundEndpoint](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#OutboundEndpoint)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#OutboundEndpoint.SCHEMA_REPRESENTATION)
- [Dns64Config](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Dns64Config)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Dns64Config.SCHEMA_REPRESENTATION)
- [Scope](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Scope)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Scope.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#METHODS_SUMMARY)

## Resource: Policy

A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.

| JSON representation |
|---|
| ``` { "id": string, "name": string, "enableInboundForwarding": boolean, "description": string, "networks": [ { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Network`) } ], "alternativeNameServerConfig": { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#AlternativeNameServerConfig`) }, "enableLogging": boolean, "dns64Config": { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Dns64Config`) }, "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). |
| `name` | `string` User-assigned name for this policy. |
| `enableInboundForwarding` | `boolean` Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address is allocated from each of the subnetworks that are bound to this policy. |
| `description` | `string` A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the policy's function. |
| `networks[]` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Network`)`` policies.list of network names specifying networks to which this policy is applied. |
| `alternativeNameServerConfig` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#AlternativeNameServerConfig`)`` Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. |
| `enableLogging` | `boolean` Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set. |
| `dns64Config` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Dns64Config`)`` Configurations related to DNS64 for this policy. |
| `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` |

## AlternativeNameServerConfig

| JSON representation |
|---|
| ``` { "targetNameServers": [ { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#TargetNameServer`) } ], "kind": string, "outboundEndpoints": [ { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#OutboundEndpoint`) } ] } ``` |

| Fields ||
|---|---|
| `targetNameServers[]` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#TargetNameServer`)`` Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. |
| `kind` | `string` |
| `outboundEndpoints[]` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#OutboundEndpoint`)`` The list of outbound endpoints to use for queries. |

## TargetNameServer

| JSON representation |
|---|
| ``` { "ipv4Address": string, "forwardingPath": enum (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#ForwardingPath`), "ipv6Address": string, "kind": string } ``` |

| Fields ||
|---|---|
| `ipv4Address` | `string` IPv4 address to forward queries to. |
| `forwardingPath` | ``enum (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#ForwardingPath`)`` Forwarding path for this TargetNameServer. If unset or set to DEFAULT, Cloud DNS makes forwarding decisions based on address ranges; that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud DNS always sends queries through the VPC network for this target. |
| `ipv6Address` | `string` IPv6 address to forward to. Does not accept both fields (ipv4 \& ipv6) being populated. Public preview as of November 2022. |
| `kind` | `string` |

## ForwardingPath

| Enums ||
|---|---|
| `default` | Cloud DNS makes forwarding decision based on IP address ranges; that is, RFC1918 addresses forward to the target through the VPC and non-RFC1918 addresses forward to the target through the internet |
| `private` | Cloud DNS always forwards to this target through the VPC. |

## OutboundEndpoint

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

| Fields ||
|---|---|
| `name` | `string` Specified as a resource path including project and region. This should be formatted like projects/{project}/locations/{location}/outboundEndpoints/{endpoint} |
| `kind` | `string` |

## Dns64Config

DNS64 policies

| JSON representation |
|---|
| ``` { "scope": { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Scope`) }, "kind": string } ``` |

| Fields ||
|---|---|
| `scope` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Scope`)`` The scope to which DNS64 config will be applied to. |
| `kind` | `string` |

## Scope

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

| Fields ||
|---|---|
| `allQueries` | `boolean` Controls whether DNS64 is enabled globally for all networks bound to the policy. |
| `kind` | `string` |

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