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 ( |
Fields | |
---|---|
id |
Unique identifier for the resource; defined by the server (output only). |
name |
User-assigned name for this policy. |
enableInboundForwarding |
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 |
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[] |
policies.list of network names specifying networks to which this policy is applied. |
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 |
Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set. |
kind |
|
Network
JSON representation |
---|
{ "networkUrl": string, "kind": string } |
Fields | |
---|---|
networkUrl |
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 |
|
AlternativeNameServerConfig
JSON representation |
---|
{
"targetNameServers": [
{
object ( |
Fields | |
---|---|
targetNameServers[] |
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 |
|
TargetNameServer
JSON representation |
---|
{
"ipv4Address": string,
"forwardingPath": enum ( |
Fields | |
---|---|
ipv4Address |
IPv4 address to forward queries to. |
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 |
IPv6 address to forward to. Does not accept both fields (ipv4 & ipv6) being populated. Public preview as of November 2022. |
kind |
|
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. |
Methods |
|
---|---|
|
Creates a new Policy. |
|
Deletes a previously created Policy. |
|
Fetches the representation of an existing Policy. |
|
Enumerates all Policies associated with a project. |
|
Applies a partial update to an existing Policy. |
|
Updates an existing Policy. |