blob: 4dbce0cfe93dd0699f54676080f77b188dd92517 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<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
Bu Sun Kimd059ad82020-07-22 17:02:09 -070075<h1><a href="dns_v2beta1.html">Cloud DNS API</a> . <a href="dns_v2beta1.policies.html">policies</a></h1>
Bu Sun Kim65020912020-05-20 12:08:20 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070078 <code><a href="#create">create(project, body=None, clientOperationId=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Create a new Policy</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070080<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070081 <code><a href="#delete">delete(project, policy, clientOperationId=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Delete a previously created Policy. Will fail if the policy is still being</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070083<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070084 <code><a href="#get">get(project, policy, clientOperationId=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Fetch the representation of an existing Policy.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070086<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#list">list(project, pageToken=None, maxResults=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Enumerate all Policies associated with a project.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070089<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">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070093 <code><a href="#patch">patch(project, policy, body=None, clientOperationId=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Apply a partial update to an existing Policy.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070095<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070096 <code><a href="#update">update(project, policy, body=None, clientOperationId=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Update an existing Policy.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070098<h3>Method Details</h3>
99<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700100 <code class="details" id="create">create(project, body=None, clientOperationId=None, x__xgafv=None)</code>
101 <pre>Create a new Policy
Bu Sun Kim65020912020-05-20 12:08:20 -0700102
103Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700104 project: string, Identifies the project addressed by this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 body: object, The request body.
106 The object takes the form of:
107
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700108{ # A policy is a collection of DNS rules applied to one or more Virtual Private
109 # Cloud resources.
110 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
111 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700112 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700113 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
114 # This should be formatted like
115 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
116 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 },
118 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700119 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
120 # specified, all DNS queries are forwarded to a name server that you
121 # choose. Names such as .internal are not available when an alternative
122 # name server is specified.
123 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
124 # specified, all DNS queries are forwarded to a name server that you
125 # choose. Names such as .internal are not available when an alternative
126 # name server is specified.
127 {
128 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
129 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
130 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
131 # Cloud DNS will make forwarding decision based on address ranges,
132 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
133 # Internet. When set to PRIVATE, Cloud DNS will always send queries
134 # through VPC for this target
135 },
136 ],
137 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
138 },
139 &quot;kind&quot;: &quot;dns#policy&quot;,
140 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
141 # applications over VPN connections. When enabled, a virtual IP address will
142 # be allocated from each of the sub-networks that are bound to this policy.
143 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
144 # Defaults to no logging if not set.
145 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
146 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
147 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 }
149
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700150 clientOperationId: string, For mutating operation requests only. An optional identifier
151specified by the client. Must be unique for operation resources in the
152Operations collection.
153 x__xgafv: string, V1 error format.
154 Allowed values
155 1 - v1 error format
156 2 - v2 error format
Bu Sun Kim65020912020-05-20 12:08:20 -0700157
158Returns:
159 An object of the form:
160
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700161 { # A policy is a collection of DNS rules applied to one or more Virtual Private
162 # Cloud resources.
163 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
164 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700166 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
167 # This should be formatted like
168 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
169 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 },
171 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700172 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
173 # specified, all DNS queries are forwarded to a name server that you
174 # choose. Names such as .internal are not available when an alternative
175 # name server is specified.
176 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
177 # specified, all DNS queries are forwarded to a name server that you
178 # choose. Names such as .internal are not available when an alternative
179 # name server is specified.
180 {
181 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
182 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
183 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
184 # Cloud DNS will make forwarding decision based on address ranges,
185 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
186 # Internet. When set to PRIVATE, Cloud DNS will always send queries
187 # through VPC for this target
188 },
189 ],
190 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
191 },
192 &quot;kind&quot;: &quot;dns#policy&quot;,
193 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
194 # applications over VPN connections. When enabled, a virtual IP address will
195 # be allocated from each of the sub-networks that are bound to this policy.
196 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
197 # Defaults to no logging if not set.
198 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
199 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
200 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 }</pre>
202</div>
203
204<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700205 <code class="details" id="delete">delete(project, policy, clientOperationId=None, x__xgafv=None)</code>
206 <pre>Delete a previously created Policy. Will fail if the policy is still being
207referenced by a network.
Bu Sun Kim65020912020-05-20 12:08:20 -0700208
209Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 project: string, Identifies the project addressed by this request. (required)
211 policy: string, User given friendly name of the policy addressed by this request. (required)
212 clientOperationId: string, For mutating operation requests only. An optional identifier
213specified by the client. Must be unique for operation resources in the
214Operations collection.
215 x__xgafv: string, V1 error format.
216 Allowed values
217 1 - v1 error format
218 2 - v2 error format
Bu Sun Kim65020912020-05-20 12:08:20 -0700219</pre>
220</div>
221
222<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700223 <code class="details" id="get">get(project, policy, clientOperationId=None, x__xgafv=None)</code>
224 <pre>Fetch the representation of an existing Policy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700225
226Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700227 project: string, Identifies the project addressed by this request. (required)
228 policy: string, User given friendly name of the policy addressed by this request. (required)
229 clientOperationId: string, For mutating operation requests only. An optional identifier
230specified by the client. Must be unique for operation resources in the
231Operations collection.
232 x__xgafv: string, V1 error format.
233 Allowed values
234 1 - v1 error format
235 2 - v2 error format
Bu Sun Kim65020912020-05-20 12:08:20 -0700236
237Returns:
238 An object of the form:
239
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700240 { # A policy is a collection of DNS rules applied to one or more Virtual Private
241 # Cloud resources.
242 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
243 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700244 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700245 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
246 # This should be formatted like
247 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
248 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 },
250 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700251 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
252 # specified, all DNS queries are forwarded to a name server that you
253 # choose. Names such as .internal are not available when an alternative
254 # name server is specified.
255 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
256 # specified, all DNS queries are forwarded to a name server that you
257 # choose. Names such as .internal are not available when an alternative
258 # name server is specified.
259 {
260 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
261 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
262 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
263 # Cloud DNS will make forwarding decision based on address ranges,
264 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
265 # Internet. When set to PRIVATE, Cloud DNS will always send queries
266 # through VPC for this target
267 },
268 ],
269 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
270 },
271 &quot;kind&quot;: &quot;dns#policy&quot;,
272 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
273 # applications over VPN connections. When enabled, a virtual IP address will
274 # be allocated from each of the sub-networks that are bound to this policy.
275 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
276 # Defaults to no logging if not set.
277 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
278 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
279 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 }</pre>
281</div>
282
283<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700284 <code class="details" id="list">list(project, pageToken=None, maxResults=None, x__xgafv=None)</code>
285 <pre>Enumerate all Policies associated with a project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700286
287Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700288 project: string, Identifies the project addressed by this request. (required)
289 pageToken: string, Optional. A tag returned by a previous list request that was truncated.
290Use this parameter to continue a previous list request.
291 maxResults: integer, Optional. Maximum number of results to be returned. If unspecified, the
292server will decide how many results to return.
293 x__xgafv: string, V1 error format.
294 Allowed values
295 1 - v1 error format
296 2 - v2 error format
Bu Sun Kim65020912020-05-20 12:08:20 -0700297
298Returns:
299 An object of the form:
300
301 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 &quot;kind&quot;: &quot;dns#policiesListResponse&quot;, # Type of resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700303 &quot;nextPageToken&quot;: &quot;A String&quot;, # The presence of this field indicates that there exist more results
304 # following your last page of results in pagination order. To fetch them,
305 # make another list request using this value as your page token.
306 #
307 # In this way you can retrieve the complete contents of even very large
308 # collections one page at a time. However, if the contents of the collection
309 # change between the first and last paginated list request, the set of all
310 # elements returned will be an inconsistent view of the collection. There is
311 # no way to retrieve a consistent snapshot of a collection larger than the
312 # maximum page size.
313 &quot;header&quot;: { # Elements common to every response.
314 &quot;operationId&quot;: &quot;A String&quot;, # For mutating operation requests that completed successfully.
315 # This is the client_operation_id if the client specified it,
316 # otherwise it is generated by the server (output only).
317 },
318 &quot;policies&quot;: [ # The policy resources.
319 { # A policy is a collection of DNS rules applied to one or more Virtual Private
320 # Cloud resources.
321 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
322 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700324 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
325 # This should be formatted like
326 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
327 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 },
329 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700330 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
331 # specified, all DNS queries are forwarded to a name server that you
332 # choose. Names such as .internal are not available when an alternative
333 # name server is specified.
334 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
335 # specified, all DNS queries are forwarded to a name server that you
336 # choose. Names such as .internal are not available when an alternative
337 # name server is specified.
338 {
339 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
340 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
341 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
342 # Cloud DNS will make forwarding decision based on address ranges,
343 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
344 # Internet. When set to PRIVATE, Cloud DNS will always send queries
345 # through VPC for this target
346 },
347 ],
348 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
349 },
350 &quot;kind&quot;: &quot;dns#policy&quot;,
351 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
352 # applications over VPN connections. When enabled, a virtual IP address will
353 # be allocated from each of the sub-networks that are bound to this policy.
354 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
355 # Defaults to no logging if not set.
356 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
357 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
358 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 },
360 ],
361 }</pre>
362</div>
363
364<div class="method">
365 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
366 <pre>Retrieves the next page of results.
367
368Args:
369 previous_request: The request for the previous page. (required)
370 previous_response: The response from the request for the previous page. (required)
371
372Returns:
373 A request object that you can call &#x27;execute()&#x27; on to request the next
374 page. Returns None if there are no more items in the collection.
375 </pre>
376</div>
377
378<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700379 <code class="details" id="patch">patch(project, policy, body=None, clientOperationId=None, x__xgafv=None)</code>
380 <pre>Apply a partial update to an existing Policy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700381
382Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700383 project: string, Identifies the project addressed by this request. (required)
384 policy: string, User given friendly name of the policy addressed by this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700385 body: object, The request body.
386 The object takes the form of:
387
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700388{ # A policy is a collection of DNS rules applied to one or more Virtual Private
389 # Cloud resources.
390 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
391 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700393 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
394 # This should be formatted like
395 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
396 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 },
398 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700399 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
400 # specified, all DNS queries are forwarded to a name server that you
401 # choose. Names such as .internal are not available when an alternative
402 # name server is specified.
403 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
404 # specified, all DNS queries are forwarded to a name server that you
405 # choose. Names such as .internal are not available when an alternative
406 # name server is specified.
407 {
408 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
409 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
410 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
411 # Cloud DNS will make forwarding decision based on address ranges,
412 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
413 # Internet. When set to PRIVATE, Cloud DNS will always send queries
414 # through VPC for this target
415 },
416 ],
417 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
418 },
419 &quot;kind&quot;: &quot;dns#policy&quot;,
420 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
421 # applications over VPN connections. When enabled, a virtual IP address will
422 # be allocated from each of the sub-networks that are bound to this policy.
423 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
424 # Defaults to no logging if not set.
425 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
426 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
427 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 }
429
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700430 clientOperationId: string, For mutating operation requests only. An optional identifier
431specified by the client. Must be unique for operation resources in the
432Operations collection.
433 x__xgafv: string, V1 error format.
434 Allowed values
435 1 - v1 error format
436 2 - v2 error format
Bu Sun Kim65020912020-05-20 12:08:20 -0700437
438Returns:
439 An object of the form:
440
441 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700442 &quot;header&quot;: { # Elements common to every response.
443 &quot;operationId&quot;: &quot;A String&quot;, # For mutating operation requests that completed successfully.
444 # This is the client_operation_id if the client specified it,
445 # otherwise it is generated by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700447 &quot;policy&quot;: { # A policy is a collection of DNS rules applied to one or more Virtual Private
448 # Cloud resources.
449 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
450 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700452 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
453 # This should be formatted like
454 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
455 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 },
457 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700458 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
459 # specified, all DNS queries are forwarded to a name server that you
460 # choose. Names such as .internal are not available when an alternative
461 # name server is specified.
462 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
463 # specified, all DNS queries are forwarded to a name server that you
464 # choose. Names such as .internal are not available when an alternative
465 # name server is specified.
466 {
467 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
468 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
469 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
470 # Cloud DNS will make forwarding decision based on address ranges,
471 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
472 # Internet. When set to PRIVATE, Cloud DNS will always send queries
473 # through VPC for this target
474 },
475 ],
476 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
477 },
478 &quot;kind&quot;: &quot;dns#policy&quot;,
479 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
480 # applications over VPN connections. When enabled, a virtual IP address will
481 # be allocated from each of the sub-networks that are bound to this policy.
482 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
483 # Defaults to no logging if not set.
484 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
485 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
486 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700487 },
488 }</pre>
489</div>
490
491<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700492 <code class="details" id="update">update(project, policy, body=None, clientOperationId=None, x__xgafv=None)</code>
493 <pre>Update an existing Policy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700494
495Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700496 project: string, Identifies the project addressed by this request. (required)
497 policy: string, User given friendly name of the policy addressed by this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700498 body: object, The request body.
499 The object takes the form of:
500
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700501{ # A policy is a collection of DNS rules applied to one or more Virtual Private
502 # Cloud resources.
503 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
504 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700506 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
507 # This should be formatted like
508 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
509 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 },
511 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700512 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
513 # specified, all DNS queries are forwarded to a name server that you
514 # choose. Names such as .internal are not available when an alternative
515 # name server is specified.
516 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
517 # specified, all DNS queries are forwarded to a name server that you
518 # choose. Names such as .internal are not available when an alternative
519 # name server is specified.
520 {
521 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
522 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
523 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
524 # Cloud DNS will make forwarding decision based on address ranges,
525 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
526 # Internet. When set to PRIVATE, Cloud DNS will always send queries
527 # through VPC for this target
528 },
529 ],
530 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
531 },
532 &quot;kind&quot;: &quot;dns#policy&quot;,
533 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
534 # applications over VPN connections. When enabled, a virtual IP address will
535 # be allocated from each of the sub-networks that are bound to this policy.
536 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
537 # Defaults to no logging if not set.
538 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
539 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
540 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 }
542
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700543 clientOperationId: string, For mutating operation requests only. An optional identifier
544specified by the client. Must be unique for operation resources in the
545Operations collection.
546 x__xgafv: string, V1 error format.
547 Allowed values
548 1 - v1 error format
549 2 - v2 error format
Bu Sun Kim65020912020-05-20 12:08:20 -0700550
551Returns:
552 An object of the form:
553
554 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700555 &quot;header&quot;: { # Elements common to every response.
556 &quot;operationId&quot;: &quot;A String&quot;, # For mutating operation requests that completed successfully.
557 # This is the client_operation_id if the client specified it,
558 # otherwise it is generated by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700560 &quot;policy&quot;: { # A policy is a collection of DNS rules applied to one or more Virtual Private
561 # Cloud resources.
562 &quot;name&quot;: &quot;A String&quot;, # User assigned name for this policy.
563 &quot;networks&quot;: [ # List of network names specifying networks to which this policy is applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700565 &quot;networkUrl&quot;: &quot;A String&quot;, # The fully qualified URL of the VPC network to bind to.
566 # This should be formatted like
567 # https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
568 &quot;kind&quot;: &quot;dns#policyNetwork&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700569 },
570 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700571 &quot;alternativeNameServerConfig&quot;: { # Sets an alternative name server for the associated networks. When
572 # specified, all DNS queries are forwarded to a name server that you
573 # choose. Names such as .internal are not available when an alternative
574 # name server is specified.
575 &quot;targetNameServers&quot;: [ # Sets an alternative name server for the associated networks. When
576 # specified, all DNS queries are forwarded to a name server that you
577 # choose. Names such as .internal are not available when an alternative
578 # name server is specified.
579 {
580 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfigTargetNameServer&quot;,
581 &quot;ipv4Address&quot;: &quot;A String&quot;, # IPv4 address to forward to.
582 &quot;forwardingPath&quot;: &quot;A String&quot;, # Forwarding path for this TargetNameServer, if unset or set to DEFAULT,
583 # Cloud DNS will make forwarding decision based on address ranges,
584 # i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the
585 # Internet. When set to PRIVATE, Cloud DNS will always send queries
586 # through VPC for this target
587 },
588 ],
589 &quot;kind&quot;: &quot;dns#policyAlternativeNameServerConfig&quot;,
590 },
591 &quot;kind&quot;: &quot;dns#policy&quot;,
592 &quot;enableInboundForwarding&quot;: True or False, # Allows networks bound to this policy to receive DNS queries sent by VMs or
593 # applications over VPN connections. When enabled, a virtual IP address will
594 # be allocated from each of the sub-networks that are bound to this policy.
595 &quot;enableLogging&quot;: True or False, # Controls whether logging is enabled for the networks bound to this policy.
596 # Defaults to no logging if not set.
597 &quot;description&quot;: &quot;A String&quot;, # A mutable string of at most 1024 characters associated with this resource
598 # for the user&#x27;s convenience. Has no effect on the policy&#x27;s function.
599 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for the resource; defined by the server (output only).
Bu Sun Kim65020912020-05-20 12:08:20 -0700600 },
601 }</pre>
602</div>
603
604</body></html>