For a list of methods for this resource, see the end of this page.
Resource representations
A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
{ "kind": "dns#policy", "id": unsigned long, "name": string, "enableInboundForwarding": boolean, "description": string, "networks": [ { "kind": "dns#policyNetwork", "networkUrl": string } ], "alternativeNameServerConfig": { "kind": "dns#policyAlternativeNameServerConfig", "targetNameServers": [ { "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", "ipv4Address": string, "forwardingPath": string } ] }, "enableLogging": boolean }
Property name | Value | Description | Notes |
---|---|---|---|
alternativeNameServerConfig |
nested object |
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. | |
alternativeNameServerConfig.kind |
string |
Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig" . |
|
alternativeNameServerConfig.targetNameServers[] |
list |
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. | |
alternativeNameServerConfig.targetNameServers[].forwardingPath |
string |
Forwarding path for this TargetNameServer. If unset or set to DEFAULT, Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, non-RFC1918 addresses go to the Internet. When set to PRIVATE, Cloud DNS will always send queries through VPC for this target.
Acceptable values are:
|
|
alternativeNameServerConfig.targetNameServers[].ipv4Address |
string |
IPv4 address to forward to. | |
alternativeNameServerConfig.targetNameServers[].kind |
string |
Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer" . |
|
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. | |
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 will be allocated from each of the sub-networks that are bound to this policy. | |
enableLogging |
boolean |
Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set. | |
id |
unsigned long |
Unique identifier for the resource; defined by the server (output only). | |
kind |
string |
Identifies what kind of resource this is. Value: the fixed string "dns#policy" . |
|
name |
string |
User assigned name for this policy. | |
networks[] |
list |
List of network names specifying networks to which this policy is applied. | |
networks[].kind |
string |
Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork" . |
|
networks[].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} |
Methods
- create
- Create a new Policy
- delete
- Delete a previously created Policy. Will fail if the policy is still being referenced by a network.
- get
- Fetch the representation of an existing Policy.
- list
- Enumerate all Policies associated with a project.
- patch
- Apply a partial update to an existing Policy.
- update
- Update an existing Policy.