1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dns_v1beta2.html">Google Cloud DNS API</a> . <a href="dns_v1beta2.policies.html">policies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#create">create(project, body, clientOperationId=None)</a></code></p>
79<p class="firstline">Create a new Policy</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(project, policy, clientOperationId=None)</a></code></p>
82<p class="firstline">Delete a previously created Policy. Will fail if the policy is still being referenced by a network.</p>
83<p class="toc_element">
84  <code><a href="#get">get(project, policy, clientOperationId=None)</a></code></p>
85<p class="firstline">Fetch the representation of an existing Policy.</p>
86<p class="toc_element">
87  <code><a href="#list">list(project, pageToken=None, maxResults=None)</a></code></p>
88<p class="firstline">Enumerate all Policies associated with a project.</p>
89<p class="toc_element">
90  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93  <code><a href="#patch">patch(project, policy, body, clientOperationId=None)</a></code></p>
94<p class="firstline">Apply a partial update to an existing Policy.</p>
95<p class="toc_element">
96  <code><a href="#update">update(project, policy, body, clientOperationId=None)</a></code></p>
97<p class="firstline">Update an existing Policy.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="create">create(project, body, clientOperationId=None)</code>
101  <pre>Create a new Policy
102
103Args:
104  project: string, Identifies the project addressed by this request. (required)
105  body: object, The request body. (required)
106    The object takes the form of:
107
108{ # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
109  "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.
110    "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
111    "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.
112      {
113        "ipv4Address": "A String", # IPv4 address to forward to.
114        "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
115      },
116    ],
117  },
118  "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
119  "description": "A 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.
120  "enableInboundForwarding": True or False, # 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.
121  "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
122  "networks": [ # List of network names specifying networks to which this policy is applied.
123    {
124      "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
125      "networkUrl": "A 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}
126    },
127  ],
128  "id": "A String", # Unique identifier for the resource; defined by the server (output only).
129  "name": "A String", # User assigned name for this policy.
130}
131
132  clientOperationId: string, For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
133
134Returns:
135  An object of the form:
136
137    { # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
138    "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.
139      "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
140      "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.
141        {
142          "ipv4Address": "A String", # IPv4 address to forward to.
143          "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
144        },
145      ],
146    },
147    "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
148    "description": "A 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.
149    "enableInboundForwarding": True or False, # 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.
150    "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
151    "networks": [ # List of network names specifying networks to which this policy is applied.
152      {
153        "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
154        "networkUrl": "A 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}
155      },
156    ],
157    "id": "A String", # Unique identifier for the resource; defined by the server (output only).
158    "name": "A String", # User assigned name for this policy.
159  }</pre>
160</div>
161
162<div class="method">
163    <code class="details" id="delete">delete(project, policy, clientOperationId=None)</code>
164  <pre>Delete a previously created Policy. Will fail if the policy is still being referenced by a network.
165
166Args:
167  project: string, Identifies the project addressed by this request. (required)
168  policy: string, User given friendly name of the policy addressed by this request. (required)
169  clientOperationId: string, For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
170</pre>
171</div>
172
173<div class="method">
174    <code class="details" id="get">get(project, policy, clientOperationId=None)</code>
175  <pre>Fetch the representation of an existing Policy.
176
177Args:
178  project: string, Identifies the project addressed by this request. (required)
179  policy: string, User given friendly name of the policy addressed by this request. (required)
180  clientOperationId: string, For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
181
182Returns:
183  An object of the form:
184
185    { # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
186    "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.
187      "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
188      "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.
189        {
190          "ipv4Address": "A String", # IPv4 address to forward to.
191          "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
192        },
193      ],
194    },
195    "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
196    "description": "A 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.
197    "enableInboundForwarding": True or False, # 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.
198    "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
199    "networks": [ # List of network names specifying networks to which this policy is applied.
200      {
201        "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
202        "networkUrl": "A 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}
203      },
204    ],
205    "id": "A String", # Unique identifier for the resource; defined by the server (output only).
206    "name": "A String", # User assigned name for this policy.
207  }</pre>
208</div>
209
210<div class="method">
211    <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
212  <pre>Enumerate all Policies associated with a project.
213
214Args:
215  project: string, Identifies the project addressed by this request. (required)
216  pageToken: string, Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
217  maxResults: integer, Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
218
219Returns:
220  An object of the form:
221
222    {
223    "nextPageToken": "A String", # The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token.
224        #
225        # In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.
226    "header": { # Elements common to every response.
227      "operationId": "A String", # For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).
228    },
229    "kind": "dns#policiesListResponse", # Type of resource.
230    "policies": [ # The policy resources.
231      { # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
232        "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.
233          "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
234          "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.
235            {
236              "ipv4Address": "A String", # IPv4 address to forward to.
237              "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
238            },
239          ],
240        },
241        "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
242        "description": "A 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.
243        "enableInboundForwarding": True or False, # 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.
244        "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
245        "networks": [ # List of network names specifying networks to which this policy is applied.
246          {
247            "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
248            "networkUrl": "A 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}
249          },
250        ],
251        "id": "A String", # Unique identifier for the resource; defined by the server (output only).
252        "name": "A String", # User assigned name for this policy.
253      },
254    ],
255  }</pre>
256</div>
257
258<div class="method">
259    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
260  <pre>Retrieves the next page of results.
261
262Args:
263  previous_request: The request for the previous page. (required)
264  previous_response: The response from the request for the previous page. (required)
265
266Returns:
267  A request object that you can call 'execute()' on to request the next
268  page. Returns None if there are no more items in the collection.
269    </pre>
270</div>
271
272<div class="method">
273    <code class="details" id="patch">patch(project, policy, body, clientOperationId=None)</code>
274  <pre>Apply a partial update to an existing Policy.
275
276Args:
277  project: string, Identifies the project addressed by this request. (required)
278  policy: string, User given friendly name of the policy addressed by this request. (required)
279  body: object, The request body. (required)
280    The object takes the form of:
281
282{ # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
283  "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.
284    "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
285    "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.
286      {
287        "ipv4Address": "A String", # IPv4 address to forward to.
288        "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
289      },
290    ],
291  },
292  "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
293  "description": "A 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.
294  "enableInboundForwarding": True or False, # 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.
295  "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
296  "networks": [ # List of network names specifying networks to which this policy is applied.
297    {
298      "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
299      "networkUrl": "A 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}
300    },
301  ],
302  "id": "A String", # Unique identifier for the resource; defined by the server (output only).
303  "name": "A String", # User assigned name for this policy.
304}
305
306  clientOperationId: string, For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
307
308Returns:
309  An object of the form:
310
311    {
312    "policy": { # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
313      "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.
314        "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
315        "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.
316          {
317            "ipv4Address": "A String", # IPv4 address to forward to.
318            "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
319          },
320        ],
321      },
322      "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
323      "description": "A 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.
324      "enableInboundForwarding": True or False, # 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.
325      "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
326      "networks": [ # List of network names specifying networks to which this policy is applied.
327        {
328          "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
329          "networkUrl": "A 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}
330        },
331      ],
332      "id": "A String", # Unique identifier for the resource; defined by the server (output only).
333      "name": "A String", # User assigned name for this policy.
334    },
335    "header": { # Elements common to every response.
336      "operationId": "A String", # For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).
337    },
338  }</pre>
339</div>
340
341<div class="method">
342    <code class="details" id="update">update(project, policy, body, clientOperationId=None)</code>
343  <pre>Update an existing Policy.
344
345Args:
346  project: string, Identifies the project addressed by this request. (required)
347  policy: string, User given friendly name of the policy addressed by this request. (required)
348  body: object, The request body. (required)
349    The object takes the form of:
350
351{ # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
352  "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.
353    "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
354    "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.
355      {
356        "ipv4Address": "A String", # IPv4 address to forward to.
357        "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
358      },
359    ],
360  },
361  "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
362  "description": "A 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.
363  "enableInboundForwarding": True or False, # 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.
364  "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
365  "networks": [ # List of network names specifying networks to which this policy is applied.
366    {
367      "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
368      "networkUrl": "A 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}
369    },
370  ],
371  "id": "A String", # Unique identifier for the resource; defined by the server (output only).
372  "name": "A String", # User assigned name for this policy.
373}
374
375  clientOperationId: string, For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
376
377Returns:
378  An object of the form:
379
380    {
381    "policy": { # A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
382      "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.
383        "kind": "dns#policyAlternativeNameServerConfig", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfig".
384        "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.
385          {
386            "ipv4Address": "A String", # IPv4 address to forward to.
387            "kind": "dns#policyAlternativeNameServerConfigTargetNameServer", # Identifies what kind of resource this is. Value: the fixed string "dns#policyAlternativeNameServerConfigTargetNameServer".
388          },
389        ],
390      },
391      "kind": "dns#policy", # Identifies what kind of resource this is. Value: the fixed string "dns#policy".
392      "description": "A 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.
393      "enableInboundForwarding": True or False, # 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.
394      "enableLogging": True or False, # Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
395      "networks": [ # List of network names specifying networks to which this policy is applied.
396        {
397          "kind": "dns#policyNetwork", # Identifies what kind of resource this is. Value: the fixed string "dns#policyNetwork".
398          "networkUrl": "A 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}
399        },
400      ],
401      "id": "A String", # Unique identifier for the resource; defined by the server (output only).
402      "name": "A String", # User assigned name for this policy.
403    },
404    "header": { # Elements common to every response.
405      "operationId": "A String", # For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).
406    },
407  }</pre>
408</div>
409
410</body></html>