google-apis-dns_v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1702 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DnsV2
23
+ # Cloud DNS API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/dns_v2'
29
+ #
30
+ # Dns = Google::Apis::DnsV2 # Alias the module
31
+ # service = Dns::DnsService.new
32
+ #
33
+ # @see https://cloud.google.com/dns/docs
34
+ class DnsService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://dns.googleapis.com/', '',
47
+ client_name: 'google-apis-dns_v2',
48
+ client_version: Google::Apis::DnsV2::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Atomically updates the ResourceRecordSet collection.
53
+ # @param [String] project
54
+ # Identifies the project addressed by this request.
55
+ # @param [String] location
56
+ # @param [String] managed_zone
57
+ # Identifies the managed zone addressed by this request. Can be the managed zone
58
+ # name or ID.
59
+ # @param [Google::Apis::DnsV2::Change] change_object
60
+ # @param [String] client_operation_id
61
+ # For mutating operation requests only. An optional identifier specified by the
62
+ # client. Must be unique for operation resources in the Operations collection.
63
+ # @param [String] fields
64
+ # Selector specifying which fields to include in a partial response.
65
+ # @param [String] quota_user
66
+ # Available to use for quota purposes for server-side applications. Can be any
67
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
68
+ # @param [Google::Apis::RequestOptions] options
69
+ # Request-specific options
70
+ #
71
+ # @yield [result, err] Result & error if block supplied
72
+ # @yieldparam result [Google::Apis::DnsV2::Change] parsed result object
73
+ # @yieldparam err [StandardError] error object if request failed
74
+ #
75
+ # @return [Google::Apis::DnsV2::Change]
76
+ #
77
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
80
+ def create_change(project, location, managed_zone, change_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
81
+ command = make_simple_command(:post, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes', options)
82
+ command.request_representation = Google::Apis::DnsV2::Change::Representation
83
+ command.request_object = change_object
84
+ command.response_representation = Google::Apis::DnsV2::Change::Representation
85
+ command.response_class = Google::Apis::DnsV2::Change
86
+ command.params['project'] = project unless project.nil?
87
+ command.params['location'] = location unless location.nil?
88
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
89
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
90
+ command.query['fields'] = fields unless fields.nil?
91
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
92
+ execute_or_queue_command(command, &block)
93
+ end
94
+
95
+ # Fetches the representation of an existing Change.
96
+ # @param [String] project
97
+ # Identifies the project addressed by this request.
98
+ # @param [String] location
99
+ # @param [String] managed_zone
100
+ # Identifies the managed zone addressed by this request. Can be the managed zone
101
+ # name or ID.
102
+ # @param [String] change_id
103
+ # The identifier of the requested change, from a previous
104
+ # ResourceRecordSetsChangeResponse.
105
+ # @param [String] client_operation_id
106
+ # For mutating operation requests only. An optional identifier specified by the
107
+ # client. Must be unique for operation resources in the Operations collection.
108
+ # @param [String] fields
109
+ # Selector specifying which fields to include in a partial response.
110
+ # @param [String] quota_user
111
+ # Available to use for quota purposes for server-side applications. Can be any
112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
113
+ # @param [Google::Apis::RequestOptions] options
114
+ # Request-specific options
115
+ #
116
+ # @yield [result, err] Result & error if block supplied
117
+ # @yieldparam result [Google::Apis::DnsV2::Change] parsed result object
118
+ # @yieldparam err [StandardError] error object if request failed
119
+ #
120
+ # @return [Google::Apis::DnsV2::Change]
121
+ #
122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
125
+ def get_change(project, location, managed_zone, change_id, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
126
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}', options)
127
+ command.response_representation = Google::Apis::DnsV2::Change::Representation
128
+ command.response_class = Google::Apis::DnsV2::Change
129
+ command.params['project'] = project unless project.nil?
130
+ command.params['location'] = location unless location.nil?
131
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
132
+ command.params['changeId'] = change_id unless change_id.nil?
133
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
134
+ command.query['fields'] = fields unless fields.nil?
135
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
136
+ execute_or_queue_command(command, &block)
137
+ end
138
+
139
+ # Enumerates Changes to a ResourceRecordSet collection.
140
+ # @param [String] project
141
+ # Identifies the project addressed by this request.
142
+ # @param [String] location
143
+ # @param [String] managed_zone
144
+ # Identifies the managed zone addressed by this request. Can be the managed zone
145
+ # name or ID.
146
+ # @param [Fixnum] max_results
147
+ # Optional. Maximum number of results to be returned. If unspecified, the server
148
+ # decides how many results to return.
149
+ # @param [String] page_token
150
+ # Optional. A tag returned by a previous list request that was truncated. Use
151
+ # this parameter to continue a previous list request.
152
+ # @param [String] sort_by
153
+ # Sorting criterion. The only supported value is change sequence.
154
+ # @param [String] sort_order
155
+ # Sorting order direction: 'ascending' or 'descending'.
156
+ # @param [String] fields
157
+ # Selector specifying which fields to include in a partial response.
158
+ # @param [String] quota_user
159
+ # Available to use for quota purposes for server-side applications. Can be any
160
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
161
+ # @param [Google::Apis::RequestOptions] options
162
+ # Request-specific options
163
+ #
164
+ # @yield [result, err] Result & error if block supplied
165
+ # @yieldparam result [Google::Apis::DnsV2::ChangesListResponse] parsed result object
166
+ # @yieldparam err [StandardError] error object if request failed
167
+ #
168
+ # @return [Google::Apis::DnsV2::ChangesListResponse]
169
+ #
170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
173
+ def list_changes(project, location, managed_zone, max_results: nil, page_token: nil, sort_by: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil, &block)
174
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes', options)
175
+ command.response_representation = Google::Apis::DnsV2::ChangesListResponse::Representation
176
+ command.response_class = Google::Apis::DnsV2::ChangesListResponse
177
+ command.params['project'] = project unless project.nil?
178
+ command.params['location'] = location unless location.nil?
179
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
180
+ command.query['maxResults'] = max_results unless max_results.nil?
181
+ command.query['pageToken'] = page_token unless page_token.nil?
182
+ command.query['sortBy'] = sort_by unless sort_by.nil?
183
+ command.query['sortOrder'] = sort_order unless sort_order.nil?
184
+ command.query['fields'] = fields unless fields.nil?
185
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
186
+ execute_or_queue_command(command, &block)
187
+ end
188
+
189
+ # Fetches the representation of an existing DnsKey.
190
+ # @param [String] project
191
+ # Identifies the project addressed by this request.
192
+ # @param [String] location
193
+ # Specifies the location of the resource. This information will be used for
194
+ # routing and will be part of the resource name.
195
+ # @param [String] managed_zone
196
+ # Identifies the managed zone addressed by this request. Can be the managed zone
197
+ # name or ID.
198
+ # @param [String] dns_key_id
199
+ # The identifier of the requested DnsKey.
200
+ # @param [String] client_operation_id
201
+ # For mutating operation requests only. An optional identifier specified by the
202
+ # client. Must be unique for operation resources in the Operations collection.
203
+ # @param [String] digest_type
204
+ # An optional comma-separated list of digest types to compute and display for
205
+ # key signing keys. If omitted, the recommended digest type is computed and
206
+ # displayed.
207
+ # @param [String] fields
208
+ # Selector specifying which fields to include in a partial response.
209
+ # @param [String] quota_user
210
+ # Available to use for quota purposes for server-side applications. Can be any
211
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
212
+ # @param [Google::Apis::RequestOptions] options
213
+ # Request-specific options
214
+ #
215
+ # @yield [result, err] Result & error if block supplied
216
+ # @yieldparam result [Google::Apis::DnsV2::DnsKey] parsed result object
217
+ # @yieldparam err [StandardError] error object if request failed
218
+ #
219
+ # @return [Google::Apis::DnsV2::DnsKey]
220
+ #
221
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
222
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
223
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
224
+ def get_dns_key(project, location, managed_zone, dns_key_id, client_operation_id: nil, digest_type: nil, fields: nil, quota_user: nil, options: nil, &block)
225
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}', options)
226
+ command.response_representation = Google::Apis::DnsV2::DnsKey::Representation
227
+ command.response_class = Google::Apis::DnsV2::DnsKey
228
+ command.params['project'] = project unless project.nil?
229
+ command.params['location'] = location unless location.nil?
230
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
231
+ command.params['dnsKeyId'] = dns_key_id unless dns_key_id.nil?
232
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
233
+ command.query['digestType'] = digest_type unless digest_type.nil?
234
+ command.query['fields'] = fields unless fields.nil?
235
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
236
+ execute_or_queue_command(command, &block)
237
+ end
238
+
239
+ # Enumerates DnsKeys to a ResourceRecordSet collection.
240
+ # @param [String] project
241
+ # Identifies the project addressed by this request.
242
+ # @param [String] location
243
+ # Specifies the location of the resource. This information will be used for
244
+ # routing and will be part of the resource name.
245
+ # @param [String] managed_zone
246
+ # Identifies the managed zone addressed by this request. Can be the managed zone
247
+ # name or ID.
248
+ # @param [String] digest_type
249
+ # An optional comma-separated list of digest types to compute and display for
250
+ # key signing keys. If omitted, the recommended digest type is computed and
251
+ # displayed.
252
+ # @param [Fixnum] max_results
253
+ # Optional. Maximum number of results to be returned. If unspecified, the server
254
+ # decides how many results to return.
255
+ # @param [String] page_token
256
+ # Optional. A tag returned by a previous list request that was truncated. Use
257
+ # this parameter to continue a previous list request.
258
+ # @param [String] fields
259
+ # Selector specifying which fields to include in a partial response.
260
+ # @param [String] quota_user
261
+ # Available to use for quota purposes for server-side applications. Can be any
262
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
263
+ # @param [Google::Apis::RequestOptions] options
264
+ # Request-specific options
265
+ #
266
+ # @yield [result, err] Result & error if block supplied
267
+ # @yieldparam result [Google::Apis::DnsV2::DnsKeysListResponse] parsed result object
268
+ # @yieldparam err [StandardError] error object if request failed
269
+ #
270
+ # @return [Google::Apis::DnsV2::DnsKeysListResponse]
271
+ #
272
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
273
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
274
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
275
+ def list_dns_keys(project, location, managed_zone, digest_type: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
276
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys', options)
277
+ command.response_representation = Google::Apis::DnsV2::DnsKeysListResponse::Representation
278
+ command.response_class = Google::Apis::DnsV2::DnsKeysListResponse
279
+ command.params['project'] = project unless project.nil?
280
+ command.params['location'] = location unless location.nil?
281
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
282
+ command.query['digestType'] = digest_type unless digest_type.nil?
283
+ command.query['maxResults'] = max_results unless max_results.nil?
284
+ command.query['pageToken'] = page_token unless page_token.nil?
285
+ command.query['fields'] = fields unless fields.nil?
286
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
287
+ execute_or_queue_command(command, &block)
288
+ end
289
+
290
+ # Fetches the representation of an existing Operation.
291
+ # @param [String] project
292
+ # Identifies the project addressed by this request.
293
+ # @param [String] location
294
+ # Specifies the location of the resource. This information will be used for
295
+ # routing and will be part of the resource name.
296
+ # @param [String] managed_zone
297
+ # Identifies the managed zone addressed by this request.
298
+ # @param [String] operation
299
+ # Identifies the operation addressed by this request (ID of the operation).
300
+ # @param [String] client_operation_id
301
+ # For mutating operation requests only. An optional identifier specified by the
302
+ # client. Must be unique for operation resources in the Operations collection.
303
+ # @param [String] fields
304
+ # Selector specifying which fields to include in a partial response.
305
+ # @param [String] quota_user
306
+ # Available to use for quota purposes for server-side applications. Can be any
307
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
308
+ # @param [Google::Apis::RequestOptions] options
309
+ # Request-specific options
310
+ #
311
+ # @yield [result, err] Result & error if block supplied
312
+ # @yieldparam result [Google::Apis::DnsV2::Operation] parsed result object
313
+ # @yieldparam err [StandardError] error object if request failed
314
+ #
315
+ # @return [Google::Apis::DnsV2::Operation]
316
+ #
317
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
318
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
319
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
320
+ def get_managed_zone_operation(project, location, managed_zone, operation, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
321
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}', options)
322
+ command.response_representation = Google::Apis::DnsV2::Operation::Representation
323
+ command.response_class = Google::Apis::DnsV2::Operation
324
+ command.params['project'] = project unless project.nil?
325
+ command.params['location'] = location unless location.nil?
326
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
327
+ command.params['operation'] = operation unless operation.nil?
328
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
329
+ command.query['fields'] = fields unless fields.nil?
330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
331
+ execute_or_queue_command(command, &block)
332
+ end
333
+
334
+ # Enumerates Operations for the given ManagedZone.
335
+ # @param [String] project
336
+ # Identifies the project addressed by this request.
337
+ # @param [String] location
338
+ # Specifies the location of the resource. This information will be used for
339
+ # routing and will be part of the resource name.
340
+ # @param [String] managed_zone
341
+ # Identifies the managed zone addressed by this request.
342
+ # @param [Fixnum] max_results
343
+ # Optional. Maximum number of results to be returned. If unspecified, the server
344
+ # decides how many results to return.
345
+ # @param [String] page_token
346
+ # Optional. A tag returned by a previous list request that was truncated. Use
347
+ # this parameter to continue a previous list request.
348
+ # @param [String] sort_by
349
+ # Sorting criterion. The only supported values are START_TIME and ID.
350
+ # @param [String] fields
351
+ # Selector specifying which fields to include in a partial response.
352
+ # @param [String] quota_user
353
+ # Available to use for quota purposes for server-side applications. Can be any
354
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
355
+ # @param [Google::Apis::RequestOptions] options
356
+ # Request-specific options
357
+ #
358
+ # @yield [result, err] Result & error if block supplied
359
+ # @yieldparam result [Google::Apis::DnsV2::ManagedZoneOperationsListResponse] parsed result object
360
+ # @yieldparam err [StandardError] error object if request failed
361
+ #
362
+ # @return [Google::Apis::DnsV2::ManagedZoneOperationsListResponse]
363
+ #
364
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
365
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
366
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
367
+ def list_managed_zone_operations(project, location, managed_zone, max_results: nil, page_token: nil, sort_by: nil, fields: nil, quota_user: nil, options: nil, &block)
368
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations', options)
369
+ command.response_representation = Google::Apis::DnsV2::ManagedZoneOperationsListResponse::Representation
370
+ command.response_class = Google::Apis::DnsV2::ManagedZoneOperationsListResponse
371
+ command.params['project'] = project unless project.nil?
372
+ command.params['location'] = location unless location.nil?
373
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
374
+ command.query['maxResults'] = max_results unless max_results.nil?
375
+ command.query['pageToken'] = page_token unless page_token.nil?
376
+ command.query['sortBy'] = sort_by unless sort_by.nil?
377
+ command.query['fields'] = fields unless fields.nil?
378
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
379
+ execute_or_queue_command(command, &block)
380
+ end
381
+
382
+ # Creates a new ManagedZone.
383
+ # @param [String] project
384
+ # Identifies the project addressed by this request.
385
+ # @param [String] location
386
+ # Specifies the location of the resource. This information will be used for
387
+ # routing and will be part of the resource name.
388
+ # @param [Google::Apis::DnsV2::ManagedZone] managed_zone_object
389
+ # @param [String] client_operation_id
390
+ # For mutating operation requests only. An optional identifier specified by the
391
+ # client. Must be unique for operation resources in the Operations collection.
392
+ # @param [String] fields
393
+ # Selector specifying which fields to include in a partial response.
394
+ # @param [String] quota_user
395
+ # Available to use for quota purposes for server-side applications. Can be any
396
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
397
+ # @param [Google::Apis::RequestOptions] options
398
+ # Request-specific options
399
+ #
400
+ # @yield [result, err] Result & error if block supplied
401
+ # @yieldparam result [Google::Apis::DnsV2::ManagedZone] parsed result object
402
+ # @yieldparam err [StandardError] error object if request failed
403
+ #
404
+ # @return [Google::Apis::DnsV2::ManagedZone]
405
+ #
406
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
407
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
408
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
409
+ def create_managed_zone(project, location, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
410
+ command = make_simple_command(:post, 'dns/v2/projects/{project}/locations/{location}/managedZones', options)
411
+ command.request_representation = Google::Apis::DnsV2::ManagedZone::Representation
412
+ command.request_object = managed_zone_object
413
+ command.response_representation = Google::Apis::DnsV2::ManagedZone::Representation
414
+ command.response_class = Google::Apis::DnsV2::ManagedZone
415
+ command.params['project'] = project unless project.nil?
416
+ command.params['location'] = location unless location.nil?
417
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
418
+ command.query['fields'] = fields unless fields.nil?
419
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
420
+ execute_or_queue_command(command, &block)
421
+ end
422
+
423
+ # Deletes a previously created ManagedZone.
424
+ # @param [String] project
425
+ # Identifies the project addressed by this request.
426
+ # @param [String] location
427
+ # Specifies the location of the resource. This information will be used for
428
+ # routing and will be part of the resource name.
429
+ # @param [String] managed_zone
430
+ # Identifies the managed zone addressed by this request. Can be the managed zone
431
+ # name or ID.
432
+ # @param [String] client_operation_id
433
+ # For mutating operation requests only. An optional identifier specified by the
434
+ # client. Must be unique for operation resources in the Operations collection.
435
+ # @param [String] fields
436
+ # Selector specifying which fields to include in a partial response.
437
+ # @param [String] quota_user
438
+ # Available to use for quota purposes for server-side applications. Can be any
439
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
440
+ # @param [Google::Apis::RequestOptions] options
441
+ # Request-specific options
442
+ #
443
+ # @yield [result, err] Result & error if block supplied
444
+ # @yieldparam result [NilClass] No result returned for this method
445
+ # @yieldparam err [StandardError] error object if request failed
446
+ #
447
+ # @return [void]
448
+ #
449
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
450
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
451
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
452
+ def delete_managed_zone(project, location, managed_zone, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
453
+ command = make_simple_command(:delete, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}', options)
454
+ command.params['project'] = project unless project.nil?
455
+ command.params['location'] = location unless location.nil?
456
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
457
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
458
+ command.query['fields'] = fields unless fields.nil?
459
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
460
+ execute_or_queue_command(command, &block)
461
+ end
462
+
463
+ # Fetches the representation of an existing ManagedZone.
464
+ # @param [String] project
465
+ # Identifies the project addressed by this request.
466
+ # @param [String] location
467
+ # Specifies the location of the resource. This information will be used for
468
+ # routing and will be part of the resource name.
469
+ # @param [String] managed_zone
470
+ # Identifies the managed zone addressed by this request. Can be the managed zone
471
+ # name or ID.
472
+ # @param [String] client_operation_id
473
+ # For mutating operation requests only. An optional identifier specified by the
474
+ # client. Must be unique for operation resources in the Operations collection.
475
+ # @param [String] fields
476
+ # Selector specifying which fields to include in a partial response.
477
+ # @param [String] quota_user
478
+ # Available to use for quota purposes for server-side applications. Can be any
479
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
480
+ # @param [Google::Apis::RequestOptions] options
481
+ # Request-specific options
482
+ #
483
+ # @yield [result, err] Result & error if block supplied
484
+ # @yieldparam result [Google::Apis::DnsV2::ManagedZone] parsed result object
485
+ # @yieldparam err [StandardError] error object if request failed
486
+ #
487
+ # @return [Google::Apis::DnsV2::ManagedZone]
488
+ #
489
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
490
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
491
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
492
+ def get_managed_zone(project, location, managed_zone, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
493
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}', options)
494
+ command.response_representation = Google::Apis::DnsV2::ManagedZone::Representation
495
+ command.response_class = Google::Apis::DnsV2::ManagedZone
496
+ command.params['project'] = project unless project.nil?
497
+ command.params['location'] = location unless location.nil?
498
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
499
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
500
+ command.query['fields'] = fields unless fields.nil?
501
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
502
+ execute_or_queue_command(command, &block)
503
+ end
504
+
505
+ # Enumerates ManagedZones that have been created but not yet deleted.
506
+ # @param [String] project
507
+ # Identifies the project addressed by this request.
508
+ # @param [String] location
509
+ # Specifies the location of the resource. This information will be used for
510
+ # routing and will be part of the resource name.
511
+ # @param [String] dns_name
512
+ # Restricts the list to return only zones with this domain name.
513
+ # @param [Fixnum] max_results
514
+ # Optional. Maximum number of results to be returned. If unspecified, the server
515
+ # decides how many results to return.
516
+ # @param [String] page_token
517
+ # Optional. A tag returned by a previous list request that was truncated. Use
518
+ # this parameter to continue a previous list request.
519
+ # @param [String] fields
520
+ # Selector specifying which fields to include in a partial response.
521
+ # @param [String] quota_user
522
+ # Available to use for quota purposes for server-side applications. Can be any
523
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
524
+ # @param [Google::Apis::RequestOptions] options
525
+ # Request-specific options
526
+ #
527
+ # @yield [result, err] Result & error if block supplied
528
+ # @yieldparam result [Google::Apis::DnsV2::ManagedZonesListResponse] parsed result object
529
+ # @yieldparam err [StandardError] error object if request failed
530
+ #
531
+ # @return [Google::Apis::DnsV2::ManagedZonesListResponse]
532
+ #
533
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
534
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
535
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
536
+ def list_managed_zones(project, location, dns_name: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
537
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones', options)
538
+ command.response_representation = Google::Apis::DnsV2::ManagedZonesListResponse::Representation
539
+ command.response_class = Google::Apis::DnsV2::ManagedZonesListResponse
540
+ command.params['project'] = project unless project.nil?
541
+ command.params['location'] = location unless location.nil?
542
+ command.query['dnsName'] = dns_name unless dns_name.nil?
543
+ command.query['maxResults'] = max_results unless max_results.nil?
544
+ command.query['pageToken'] = page_token unless page_token.nil?
545
+ command.query['fields'] = fields unless fields.nil?
546
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
547
+ execute_or_queue_command(command, &block)
548
+ end
549
+
550
+ # Applies a partial update to an existing ManagedZone.
551
+ # @param [String] project
552
+ # Identifies the project addressed by this request.
553
+ # @param [String] location
554
+ # Specifies the location of the resource. This information will be used for
555
+ # routing and will be part of the resource name.
556
+ # @param [String] managed_zone
557
+ # Identifies the managed zone addressed by this request. Can be the managed zone
558
+ # name or ID.
559
+ # @param [Google::Apis::DnsV2::ManagedZone] managed_zone_object
560
+ # @param [String] client_operation_id
561
+ # For mutating operation requests only. An optional identifier specified by the
562
+ # client. Must be unique for operation resources in the Operations collection.
563
+ # @param [String] fields
564
+ # Selector specifying which fields to include in a partial response.
565
+ # @param [String] quota_user
566
+ # Available to use for quota purposes for server-side applications. Can be any
567
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
568
+ # @param [Google::Apis::RequestOptions] options
569
+ # Request-specific options
570
+ #
571
+ # @yield [result, err] Result & error if block supplied
572
+ # @yieldparam result [Google::Apis::DnsV2::Operation] parsed result object
573
+ # @yieldparam err [StandardError] error object if request failed
574
+ #
575
+ # @return [Google::Apis::DnsV2::Operation]
576
+ #
577
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
578
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
579
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
580
+ def patch_managed_zone(project, location, managed_zone, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
581
+ command = make_simple_command(:patch, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}', options)
582
+ command.request_representation = Google::Apis::DnsV2::ManagedZone::Representation
583
+ command.request_object = managed_zone_object
584
+ command.response_representation = Google::Apis::DnsV2::Operation::Representation
585
+ command.response_class = Google::Apis::DnsV2::Operation
586
+ command.params['project'] = project unless project.nil?
587
+ command.params['location'] = location unless location.nil?
588
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
589
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
590
+ command.query['fields'] = fields unless fields.nil?
591
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
592
+ execute_or_queue_command(command, &block)
593
+ end
594
+
595
+ # Updates an existing ManagedZone.
596
+ # @param [String] project
597
+ # Identifies the project addressed by this request.
598
+ # @param [String] location
599
+ # Specifies the location of the resource. This information will be used for
600
+ # routing and will be part of the resource name.
601
+ # @param [String] managed_zone
602
+ # Identifies the managed zone addressed by this request. Can be the managed zone
603
+ # name or ID.
604
+ # @param [Google::Apis::DnsV2::ManagedZone] managed_zone_object
605
+ # @param [String] client_operation_id
606
+ # For mutating operation requests only. An optional identifier specified by the
607
+ # client. Must be unique for operation resources in the Operations collection.
608
+ # @param [String] fields
609
+ # Selector specifying which fields to include in a partial response.
610
+ # @param [String] quota_user
611
+ # Available to use for quota purposes for server-side applications. Can be any
612
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
613
+ # @param [Google::Apis::RequestOptions] options
614
+ # Request-specific options
615
+ #
616
+ # @yield [result, err] Result & error if block supplied
617
+ # @yieldparam result [Google::Apis::DnsV2::Operation] parsed result object
618
+ # @yieldparam err [StandardError] error object if request failed
619
+ #
620
+ # @return [Google::Apis::DnsV2::Operation]
621
+ #
622
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
623
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
624
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
625
+ def update_managed_zone(project, location, managed_zone, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
626
+ command = make_simple_command(:put, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}', options)
627
+ command.request_representation = Google::Apis::DnsV2::ManagedZone::Representation
628
+ command.request_object = managed_zone_object
629
+ command.response_representation = Google::Apis::DnsV2::Operation::Representation
630
+ command.response_class = Google::Apis::DnsV2::Operation
631
+ command.params['project'] = project unless project.nil?
632
+ command.params['location'] = location unless location.nil?
633
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
634
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
635
+ command.query['fields'] = fields unless fields.nil?
636
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
637
+ execute_or_queue_command(command, &block)
638
+ end
639
+
640
+ # Creates a new Policy.
641
+ # @param [String] project
642
+ # Identifies the project addressed by this request.
643
+ # @param [String] location
644
+ # Specifies the location of the resource. This information will be used for
645
+ # routing and will be part of the resource name.
646
+ # @param [Google::Apis::DnsV2::Policy] policy_object
647
+ # @param [String] client_operation_id
648
+ # For mutating operation requests only. An optional identifier specified by the
649
+ # client. Must be unique for operation resources in the Operations collection.
650
+ # @param [String] fields
651
+ # Selector specifying which fields to include in a partial response.
652
+ # @param [String] quota_user
653
+ # Available to use for quota purposes for server-side applications. Can be any
654
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
655
+ # @param [Google::Apis::RequestOptions] options
656
+ # Request-specific options
657
+ #
658
+ # @yield [result, err] Result & error if block supplied
659
+ # @yieldparam result [Google::Apis::DnsV2::Policy] parsed result object
660
+ # @yieldparam err [StandardError] error object if request failed
661
+ #
662
+ # @return [Google::Apis::DnsV2::Policy]
663
+ #
664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
667
+ def create_policy(project, location, policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
668
+ command = make_simple_command(:post, 'dns/v2/projects/{project}/locations/{location}/policies', options)
669
+ command.request_representation = Google::Apis::DnsV2::Policy::Representation
670
+ command.request_object = policy_object
671
+ command.response_representation = Google::Apis::DnsV2::Policy::Representation
672
+ command.response_class = Google::Apis::DnsV2::Policy
673
+ command.params['project'] = project unless project.nil?
674
+ command.params['location'] = location unless location.nil?
675
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
676
+ command.query['fields'] = fields unless fields.nil?
677
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
678
+ execute_or_queue_command(command, &block)
679
+ end
680
+
681
+ # Deletes a previously created Policy. Fails if the policy is still being
682
+ # referenced by a network.
683
+ # @param [String] project
684
+ # Identifies the project addressed by this request.
685
+ # @param [String] location
686
+ # Specifies the location of the resource. This information will be used for
687
+ # routing and will be part of the resource name.
688
+ # @param [String] policy
689
+ # User given friendly name of the policy addressed by this request.
690
+ # @param [String] client_operation_id
691
+ # For mutating operation requests only. An optional identifier specified by the
692
+ # client. Must be unique for operation resources in the Operations collection.
693
+ # @param [String] fields
694
+ # Selector specifying which fields to include in a partial response.
695
+ # @param [String] quota_user
696
+ # Available to use for quota purposes for server-side applications. Can be any
697
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
698
+ # @param [Google::Apis::RequestOptions] options
699
+ # Request-specific options
700
+ #
701
+ # @yield [result, err] Result & error if block supplied
702
+ # @yieldparam result [NilClass] No result returned for this method
703
+ # @yieldparam err [StandardError] error object if request failed
704
+ #
705
+ # @return [void]
706
+ #
707
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
708
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
709
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
710
+ def delete_policy(project, location, policy, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
711
+ command = make_simple_command(:delete, 'dns/v2/projects/{project}/locations/{location}/policies/{policy}', options)
712
+ command.params['project'] = project unless project.nil?
713
+ command.params['location'] = location unless location.nil?
714
+ command.params['policy'] = policy unless policy.nil?
715
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
716
+ command.query['fields'] = fields unless fields.nil?
717
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
718
+ execute_or_queue_command(command, &block)
719
+ end
720
+
721
+ # Fetches the representation of an existing Policy.
722
+ # @param [String] project
723
+ # Identifies the project addressed by this request.
724
+ # @param [String] location
725
+ # Specifies the location of the resource. This information will be used for
726
+ # routing and will be part of the resource name.
727
+ # @param [String] policy
728
+ # User given friendly name of the policy addressed by this request.
729
+ # @param [String] client_operation_id
730
+ # For mutating operation requests only. An optional identifier specified by the
731
+ # client. Must be unique for operation resources in the Operations collection.
732
+ # @param [String] fields
733
+ # Selector specifying which fields to include in a partial response.
734
+ # @param [String] quota_user
735
+ # Available to use for quota purposes for server-side applications. Can be any
736
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
737
+ # @param [Google::Apis::RequestOptions] options
738
+ # Request-specific options
739
+ #
740
+ # @yield [result, err] Result & error if block supplied
741
+ # @yieldparam result [Google::Apis::DnsV2::Policy] parsed result object
742
+ # @yieldparam err [StandardError] error object if request failed
743
+ #
744
+ # @return [Google::Apis::DnsV2::Policy]
745
+ #
746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
749
+ def get_policy(project, location, policy, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
750
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/policies/{policy}', options)
751
+ command.response_representation = Google::Apis::DnsV2::Policy::Representation
752
+ command.response_class = Google::Apis::DnsV2::Policy
753
+ command.params['project'] = project unless project.nil?
754
+ command.params['location'] = location unless location.nil?
755
+ command.params['policy'] = policy unless policy.nil?
756
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
757
+ command.query['fields'] = fields unless fields.nil?
758
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
759
+ execute_or_queue_command(command, &block)
760
+ end
761
+
762
+ # Enumerates all Policies associated with a project.
763
+ # @param [String] project
764
+ # Identifies the project addressed by this request.
765
+ # @param [String] location
766
+ # Specifies the location of the resource. This information will be used for
767
+ # routing and will be part of the resource name.
768
+ # @param [Fixnum] max_results
769
+ # Optional. Maximum number of results to be returned. If unspecified, the server
770
+ # decides how many results to return.
771
+ # @param [String] page_token
772
+ # Optional. A tag returned by a previous list request that was truncated. Use
773
+ # this parameter to continue a previous list request.
774
+ # @param [String] fields
775
+ # Selector specifying which fields to include in a partial response.
776
+ # @param [String] quota_user
777
+ # Available to use for quota purposes for server-side applications. Can be any
778
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
779
+ # @param [Google::Apis::RequestOptions] options
780
+ # Request-specific options
781
+ #
782
+ # @yield [result, err] Result & error if block supplied
783
+ # @yieldparam result [Google::Apis::DnsV2::PoliciesListResponse] parsed result object
784
+ # @yieldparam err [StandardError] error object if request failed
785
+ #
786
+ # @return [Google::Apis::DnsV2::PoliciesListResponse]
787
+ #
788
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
789
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
790
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
791
+ def list_policies(project, location, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
792
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/policies', options)
793
+ command.response_representation = Google::Apis::DnsV2::PoliciesListResponse::Representation
794
+ command.response_class = Google::Apis::DnsV2::PoliciesListResponse
795
+ command.params['project'] = project unless project.nil?
796
+ command.params['location'] = location unless location.nil?
797
+ command.query['maxResults'] = max_results unless max_results.nil?
798
+ command.query['pageToken'] = page_token unless page_token.nil?
799
+ command.query['fields'] = fields unless fields.nil?
800
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
801
+ execute_or_queue_command(command, &block)
802
+ end
803
+
804
+ # Applies a partial update to an existing Policy.
805
+ # @param [String] project
806
+ # Identifies the project addressed by this request.
807
+ # @param [String] location
808
+ # Specifies the location of the resource. This information will be used for
809
+ # routing and will be part of the resource name.
810
+ # @param [String] policy
811
+ # User given friendly name of the policy addressed by this request.
812
+ # @param [Google::Apis::DnsV2::Policy] policy_object
813
+ # @param [String] client_operation_id
814
+ # For mutating operation requests only. An optional identifier specified by the
815
+ # client. Must be unique for operation resources in the Operations collection.
816
+ # @param [String] fields
817
+ # Selector specifying which fields to include in a partial response.
818
+ # @param [String] quota_user
819
+ # Available to use for quota purposes for server-side applications. Can be any
820
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
821
+ # @param [Google::Apis::RequestOptions] options
822
+ # Request-specific options
823
+ #
824
+ # @yield [result, err] Result & error if block supplied
825
+ # @yieldparam result [Google::Apis::DnsV2::PoliciesPatchResponse] parsed result object
826
+ # @yieldparam err [StandardError] error object if request failed
827
+ #
828
+ # @return [Google::Apis::DnsV2::PoliciesPatchResponse]
829
+ #
830
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
831
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
832
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
833
+ def patch_policy(project, location, policy, policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
834
+ command = make_simple_command(:patch, 'dns/v2/projects/{project}/locations/{location}/policies/{policy}', options)
835
+ command.request_representation = Google::Apis::DnsV2::Policy::Representation
836
+ command.request_object = policy_object
837
+ command.response_representation = Google::Apis::DnsV2::PoliciesPatchResponse::Representation
838
+ command.response_class = Google::Apis::DnsV2::PoliciesPatchResponse
839
+ command.params['project'] = project unless project.nil?
840
+ command.params['location'] = location unless location.nil?
841
+ command.params['policy'] = policy unless policy.nil?
842
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
843
+ command.query['fields'] = fields unless fields.nil?
844
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
845
+ execute_or_queue_command(command, &block)
846
+ end
847
+
848
+ # Updates an existing Policy.
849
+ # @param [String] project
850
+ # Identifies the project addressed by this request.
851
+ # @param [String] location
852
+ # Specifies the location of the resource. This information will be used for
853
+ # routing and will be part of the resource name.
854
+ # @param [String] policy
855
+ # User given friendly name of the policy addressed by this request.
856
+ # @param [Google::Apis::DnsV2::Policy] policy_object
857
+ # @param [String] client_operation_id
858
+ # For mutating operation requests only. An optional identifier specified by the
859
+ # client. Must be unique for operation resources in the Operations collection.
860
+ # @param [String] fields
861
+ # Selector specifying which fields to include in a partial response.
862
+ # @param [String] quota_user
863
+ # Available to use for quota purposes for server-side applications. Can be any
864
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
865
+ # @param [Google::Apis::RequestOptions] options
866
+ # Request-specific options
867
+ #
868
+ # @yield [result, err] Result & error if block supplied
869
+ # @yieldparam result [Google::Apis::DnsV2::PoliciesUpdateResponse] parsed result object
870
+ # @yieldparam err [StandardError] error object if request failed
871
+ #
872
+ # @return [Google::Apis::DnsV2::PoliciesUpdateResponse]
873
+ #
874
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
875
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
876
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
877
+ def update_policy(project, location, policy, policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
878
+ command = make_simple_command(:put, 'dns/v2/projects/{project}/locations/{location}/policies/{policy}', options)
879
+ command.request_representation = Google::Apis::DnsV2::Policy::Representation
880
+ command.request_object = policy_object
881
+ command.response_representation = Google::Apis::DnsV2::PoliciesUpdateResponse::Representation
882
+ command.response_class = Google::Apis::DnsV2::PoliciesUpdateResponse
883
+ command.params['project'] = project unless project.nil?
884
+ command.params['location'] = location unless location.nil?
885
+ command.params['policy'] = policy unless policy.nil?
886
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
887
+ command.query['fields'] = fields unless fields.nil?
888
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
889
+ execute_or_queue_command(command, &block)
890
+ end
891
+
892
+ # Fetches the representation of an existing Project.
893
+ # @param [String] project
894
+ # Identifies the project addressed by this request.
895
+ # @param [String] location
896
+ # @param [String] client_operation_id
897
+ # For mutating operation requests only. An optional identifier specified by the
898
+ # client. Must be unique for operation resources in the Operations collection.
899
+ # @param [String] fields
900
+ # Selector specifying which fields to include in a partial response.
901
+ # @param [String] quota_user
902
+ # Available to use for quota purposes for server-side applications. Can be any
903
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
904
+ # @param [Google::Apis::RequestOptions] options
905
+ # Request-specific options
906
+ #
907
+ # @yield [result, err] Result & error if block supplied
908
+ # @yieldparam result [Google::Apis::DnsV2::Project] parsed result object
909
+ # @yieldparam err [StandardError] error object if request failed
910
+ #
911
+ # @return [Google::Apis::DnsV2::Project]
912
+ #
913
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
914
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
915
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
916
+ def get_project(project, location, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
917
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}', options)
918
+ command.response_representation = Google::Apis::DnsV2::Project::Representation
919
+ command.response_class = Google::Apis::DnsV2::Project
920
+ command.params['project'] = project unless project.nil?
921
+ command.params['location'] = location unless location.nil?
922
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
923
+ command.query['fields'] = fields unless fields.nil?
924
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
925
+ execute_or_queue_command(command, &block)
926
+ end
927
+
928
+ # Creates a new ResourceRecordSet.
929
+ # @param [String] project
930
+ # Identifies the project addressed by this request.
931
+ # @param [String] location
932
+ # Specifies the location of the resource. This information will be used for
933
+ # routing and will be part of the resource name.
934
+ # @param [String] managed_zone
935
+ # Identifies the managed zone addressed by this request. Can be the managed zone
936
+ # name or ID.
937
+ # @param [Google::Apis::DnsV2::ResourceRecordSet] resource_record_set_object
938
+ # @param [String] client_operation_id
939
+ # For mutating operation requests only. An optional identifier specified by the
940
+ # client. Must be unique for operation resources in the Operations collection.
941
+ # @param [String] fields
942
+ # Selector specifying which fields to include in a partial response.
943
+ # @param [String] quota_user
944
+ # Available to use for quota purposes for server-side applications. Can be any
945
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
946
+ # @param [Google::Apis::RequestOptions] options
947
+ # Request-specific options
948
+ #
949
+ # @yield [result, err] Result & error if block supplied
950
+ # @yieldparam result [Google::Apis::DnsV2::ResourceRecordSet] parsed result object
951
+ # @yieldparam err [StandardError] error object if request failed
952
+ #
953
+ # @return [Google::Apis::DnsV2::ResourceRecordSet]
954
+ #
955
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
956
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
957
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
958
+ def create_resource_record_set(project, location, managed_zone, resource_record_set_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
959
+ command = make_simple_command(:post, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets', options)
960
+ command.request_representation = Google::Apis::DnsV2::ResourceRecordSet::Representation
961
+ command.request_object = resource_record_set_object
962
+ command.response_representation = Google::Apis::DnsV2::ResourceRecordSet::Representation
963
+ command.response_class = Google::Apis::DnsV2::ResourceRecordSet
964
+ command.params['project'] = project unless project.nil?
965
+ command.params['location'] = location unless location.nil?
966
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
967
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
968
+ command.query['fields'] = fields unless fields.nil?
969
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
970
+ execute_or_queue_command(command, &block)
971
+ end
972
+
973
+ # Deletes a previously created ResourceRecordSet.
974
+ # @param [String] project
975
+ # Identifies the project addressed by this request.
976
+ # @param [String] location
977
+ # Specifies the location of the resource. This information will be used for
978
+ # routing and will be part of the resource name.
979
+ # @param [String] managed_zone
980
+ # Identifies the managed zone addressed by this request. Can be the managed zone
981
+ # name or ID.
982
+ # @param [String] name
983
+ # Fully qualified domain name.
984
+ # @param [String] type
985
+ # RRSet type.
986
+ # @param [String] client_operation_id
987
+ # For mutating operation requests only. An optional identifier specified by the
988
+ # client. Must be unique for operation resources in the Operations collection.
989
+ # @param [String] fields
990
+ # Selector specifying which fields to include in a partial response.
991
+ # @param [String] quota_user
992
+ # Available to use for quota purposes for server-side applications. Can be any
993
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
994
+ # @param [Google::Apis::RequestOptions] options
995
+ # Request-specific options
996
+ #
997
+ # @yield [result, err] Result & error if block supplied
998
+ # @yieldparam result [NilClass] No result returned for this method
999
+ # @yieldparam err [StandardError] error object if request failed
1000
+ #
1001
+ # @return [void]
1002
+ #
1003
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1004
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1005
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1006
+ def delete_resource_record_set(project, location, managed_zone, name, type, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1007
+ command = make_simple_command(:delete, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}', options)
1008
+ command.params['project'] = project unless project.nil?
1009
+ command.params['location'] = location unless location.nil?
1010
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
1011
+ command.params['name'] = name unless name.nil?
1012
+ command.params['type'] = type unless type.nil?
1013
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1014
+ command.query['fields'] = fields unless fields.nil?
1015
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1016
+ execute_or_queue_command(command, &block)
1017
+ end
1018
+
1019
+ # Fetches the representation of an existing ResourceRecordSet.
1020
+ # @param [String] project
1021
+ # Identifies the project addressed by this request.
1022
+ # @param [String] location
1023
+ # Specifies the location of the resource. This information will be used for
1024
+ # routing and will be part of the resource name.
1025
+ # @param [String] managed_zone
1026
+ # Identifies the managed zone addressed by this request. Can be the managed zone
1027
+ # name or ID.
1028
+ # @param [String] name
1029
+ # Fully qualified domain name.
1030
+ # @param [String] type
1031
+ # RRSet type.
1032
+ # @param [String] client_operation_id
1033
+ # For mutating operation requests only. An optional identifier specified by the
1034
+ # client. Must be unique for operation resources in the Operations collection.
1035
+ # @param [String] fields
1036
+ # Selector specifying which fields to include in a partial response.
1037
+ # @param [String] quota_user
1038
+ # Available to use for quota purposes for server-side applications. Can be any
1039
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1040
+ # @param [Google::Apis::RequestOptions] options
1041
+ # Request-specific options
1042
+ #
1043
+ # @yield [result, err] Result & error if block supplied
1044
+ # @yieldparam result [Google::Apis::DnsV2::ResourceRecordSet] parsed result object
1045
+ # @yieldparam err [StandardError] error object if request failed
1046
+ #
1047
+ # @return [Google::Apis::DnsV2::ResourceRecordSet]
1048
+ #
1049
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1050
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1051
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1052
+ def get_resource_record_set(project, location, managed_zone, name, type, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1053
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}', options)
1054
+ command.response_representation = Google::Apis::DnsV2::ResourceRecordSet::Representation
1055
+ command.response_class = Google::Apis::DnsV2::ResourceRecordSet
1056
+ command.params['project'] = project unless project.nil?
1057
+ command.params['location'] = location unless location.nil?
1058
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
1059
+ command.params['name'] = name unless name.nil?
1060
+ command.params['type'] = type unless type.nil?
1061
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1062
+ command.query['fields'] = fields unless fields.nil?
1063
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1064
+ execute_or_queue_command(command, &block)
1065
+ end
1066
+
1067
+ # Enumerates ResourceRecordSets that you have created but not yet deleted.
1068
+ # @param [String] project
1069
+ # Identifies the project addressed by this request.
1070
+ # @param [String] location
1071
+ # Specifies the location of the resource. This information will be used for
1072
+ # routing and will be part of the resource name.
1073
+ # @param [String] managed_zone
1074
+ # Identifies the managed zone addressed by this request. Can be the managed zone
1075
+ # name or ID.
1076
+ # @param [Fixnum] max_results
1077
+ # Optional. Maximum number of results to be returned. If unspecified, the server
1078
+ # decides how many results to return.
1079
+ # @param [String] name
1080
+ # Restricts the list to return only records with this fully qualified domain
1081
+ # name.
1082
+ # @param [String] page_token
1083
+ # Optional. A tag returned by a previous list request that was truncated. Use
1084
+ # this parameter to continue a previous list request.
1085
+ # @param [String] type
1086
+ # Restricts the list to return only records of this type. If present, the "name"
1087
+ # parameter must also be present.
1088
+ # @param [String] fields
1089
+ # Selector specifying which fields to include in a partial response.
1090
+ # @param [String] quota_user
1091
+ # Available to use for quota purposes for server-side applications. Can be any
1092
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1093
+ # @param [Google::Apis::RequestOptions] options
1094
+ # Request-specific options
1095
+ #
1096
+ # @yield [result, err] Result & error if block supplied
1097
+ # @yieldparam result [Google::Apis::DnsV2::ResourceRecordSetsListResponse] parsed result object
1098
+ # @yieldparam err [StandardError] error object if request failed
1099
+ #
1100
+ # @return [Google::Apis::DnsV2::ResourceRecordSetsListResponse]
1101
+ #
1102
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1103
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1104
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1105
+ def list_resource_record_sets(project, location, managed_zone, max_results: nil, name: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
1106
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets', options)
1107
+ command.response_representation = Google::Apis::DnsV2::ResourceRecordSetsListResponse::Representation
1108
+ command.response_class = Google::Apis::DnsV2::ResourceRecordSetsListResponse
1109
+ command.params['project'] = project unless project.nil?
1110
+ command.params['location'] = location unless location.nil?
1111
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
1112
+ command.query['maxResults'] = max_results unless max_results.nil?
1113
+ command.query['name'] = name unless name.nil?
1114
+ command.query['pageToken'] = page_token unless page_token.nil?
1115
+ command.query['type'] = type unless type.nil?
1116
+ command.query['fields'] = fields unless fields.nil?
1117
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1118
+ execute_or_queue_command(command, &block)
1119
+ end
1120
+
1121
+ # Applies a partial update to an existing ResourceRecordSet.
1122
+ # @param [String] project
1123
+ # Identifies the project addressed by this request.
1124
+ # @param [String] location
1125
+ # Specifies the location of the resource. This information will be used for
1126
+ # routing and will be part of the resource name.
1127
+ # @param [String] managed_zone
1128
+ # Identifies the managed zone addressed by this request. Can be the managed zone
1129
+ # name or ID.
1130
+ # @param [String] name
1131
+ # Fully qualified domain name.
1132
+ # @param [String] type
1133
+ # RRSet type.
1134
+ # @param [Google::Apis::DnsV2::ResourceRecordSet] resource_record_set_object
1135
+ # @param [String] client_operation_id
1136
+ # For mutating operation requests only. An optional identifier specified by the
1137
+ # client. Must be unique for operation resources in the Operations collection.
1138
+ # @param [String] fields
1139
+ # Selector specifying which fields to include in a partial response.
1140
+ # @param [String] quota_user
1141
+ # Available to use for quota purposes for server-side applications. Can be any
1142
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1143
+ # @param [Google::Apis::RequestOptions] options
1144
+ # Request-specific options
1145
+ #
1146
+ # @yield [result, err] Result & error if block supplied
1147
+ # @yieldparam result [Google::Apis::DnsV2::ResourceRecordSet] parsed result object
1148
+ # @yieldparam err [StandardError] error object if request failed
1149
+ #
1150
+ # @return [Google::Apis::DnsV2::ResourceRecordSet]
1151
+ #
1152
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1153
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1154
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1155
+ def patch_resource_record_set(project, location, managed_zone, name, type, resource_record_set_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1156
+ command = make_simple_command(:patch, 'dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}', options)
1157
+ command.request_representation = Google::Apis::DnsV2::ResourceRecordSet::Representation
1158
+ command.request_object = resource_record_set_object
1159
+ command.response_representation = Google::Apis::DnsV2::ResourceRecordSet::Representation
1160
+ command.response_class = Google::Apis::DnsV2::ResourceRecordSet
1161
+ command.params['project'] = project unless project.nil?
1162
+ command.params['location'] = location unless location.nil?
1163
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
1164
+ command.params['name'] = name unless name.nil?
1165
+ command.params['type'] = type unless type.nil?
1166
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1167
+ command.query['fields'] = fields unless fields.nil?
1168
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1169
+ execute_or_queue_command(command, &block)
1170
+ end
1171
+
1172
+ # Creates a new Response Policy
1173
+ # @param [String] project
1174
+ # Identifies the project addressed by this request.
1175
+ # @param [String] location
1176
+ # Specifies the location of the resource, only applicable in the v APIs. This
1177
+ # information will be used for routing and will be part of the resource name.
1178
+ # @param [Google::Apis::DnsV2::ResponsePolicy] response_policy_object
1179
+ # @param [String] client_operation_id
1180
+ # For mutating operation requests only. An optional identifier specified by the
1181
+ # client. Must be unique for operation resources in the Operations collection.
1182
+ # @param [String] fields
1183
+ # Selector specifying which fields to include in a partial response.
1184
+ # @param [String] quota_user
1185
+ # Available to use for quota purposes for server-side applications. Can be any
1186
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1187
+ # @param [Google::Apis::RequestOptions] options
1188
+ # Request-specific options
1189
+ #
1190
+ # @yield [result, err] Result & error if block supplied
1191
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePolicy] parsed result object
1192
+ # @yieldparam err [StandardError] error object if request failed
1193
+ #
1194
+ # @return [Google::Apis::DnsV2::ResponsePolicy]
1195
+ #
1196
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1197
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1198
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1199
+ def create_response_policy(project, location, response_policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1200
+ command = make_simple_command(:post, 'dns/v2/projects/{project}/locations/{location}/responsePolicies', options)
1201
+ command.request_representation = Google::Apis::DnsV2::ResponsePolicy::Representation
1202
+ command.request_object = response_policy_object
1203
+ command.response_representation = Google::Apis::DnsV2::ResponsePolicy::Representation
1204
+ command.response_class = Google::Apis::DnsV2::ResponsePolicy
1205
+ command.params['project'] = project unless project.nil?
1206
+ command.params['location'] = location unless location.nil?
1207
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1208
+ command.query['fields'] = fields unless fields.nil?
1209
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1210
+ execute_or_queue_command(command, &block)
1211
+ end
1212
+
1213
+ # Deletes a previously created Response Policy. Fails if the response policy is
1214
+ # non-empty or still being referenced by a network.
1215
+ # @param [String] project
1216
+ # Identifies the project addressed by this request.
1217
+ # @param [String] location
1218
+ # Specifies the location of the resource. This information will be used for
1219
+ # routing and will be part of the resource name.
1220
+ # @param [String] response_policy
1221
+ # User assigned name of the Response Policy addressed by this request.
1222
+ # @param [String] client_operation_id
1223
+ # For mutating operation requests only. An optional identifier specified by the
1224
+ # client. Must be unique for operation resources in the Operations collection.
1225
+ # @param [String] fields
1226
+ # Selector specifying which fields to include in a partial response.
1227
+ # @param [String] quota_user
1228
+ # Available to use for quota purposes for server-side applications. Can be any
1229
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1230
+ # @param [Google::Apis::RequestOptions] options
1231
+ # Request-specific options
1232
+ #
1233
+ # @yield [result, err] Result & error if block supplied
1234
+ # @yieldparam result [NilClass] No result returned for this method
1235
+ # @yieldparam err [StandardError] error object if request failed
1236
+ #
1237
+ # @return [void]
1238
+ #
1239
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1240
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1241
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1242
+ def delete_response_policy(project, location, response_policy, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1243
+ command = make_simple_command(:delete, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}', options)
1244
+ command.params['project'] = project unless project.nil?
1245
+ command.params['location'] = location unless location.nil?
1246
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1247
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1248
+ command.query['fields'] = fields unless fields.nil?
1249
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1250
+ execute_or_queue_command(command, &block)
1251
+ end
1252
+
1253
+ # Fetches the representation of an existing Response Policy.
1254
+ # @param [String] project
1255
+ # Identifies the project addressed by this request.
1256
+ # @param [String] location
1257
+ # Specifies the location of the resource. This information will be used for
1258
+ # routing and will be part of the resource name.
1259
+ # @param [String] response_policy
1260
+ # User assigned name of the Response Policy addressed by this request.
1261
+ # @param [String] client_operation_id
1262
+ # For mutating operation requests only. An optional identifier specified by the
1263
+ # client. Must be unique for operation resources in the Operations collection.
1264
+ # @param [String] fields
1265
+ # Selector specifying which fields to include in a partial response.
1266
+ # @param [String] quota_user
1267
+ # Available to use for quota purposes for server-side applications. Can be any
1268
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1269
+ # @param [Google::Apis::RequestOptions] options
1270
+ # Request-specific options
1271
+ #
1272
+ # @yield [result, err] Result & error if block supplied
1273
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePolicy] parsed result object
1274
+ # @yieldparam err [StandardError] error object if request failed
1275
+ #
1276
+ # @return [Google::Apis::DnsV2::ResponsePolicy]
1277
+ #
1278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1281
+ def get_response_policy(project, location, response_policy, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1282
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}', options)
1283
+ command.response_representation = Google::Apis::DnsV2::ResponsePolicy::Representation
1284
+ command.response_class = Google::Apis::DnsV2::ResponsePolicy
1285
+ command.params['project'] = project unless project.nil?
1286
+ command.params['location'] = location unless location.nil?
1287
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1288
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1289
+ command.query['fields'] = fields unless fields.nil?
1290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1291
+ execute_or_queue_command(command, &block)
1292
+ end
1293
+
1294
+ # Enumerates all Response Policies associated with a project.
1295
+ # @param [String] project
1296
+ # Identifies the project addressed by this request.
1297
+ # @param [String] location
1298
+ # Specifies the location of the resource. This information will be used for
1299
+ # routing and will be part of the resource name.
1300
+ # @param [Fixnum] max_results
1301
+ # Optional. Maximum number of results to be returned. If unspecified, the server
1302
+ # decides how many results to return.
1303
+ # @param [String] page_token
1304
+ # Optional. A tag returned by a previous list request that was truncated. Use
1305
+ # this parameter to continue a previous list request.
1306
+ # @param [String] fields
1307
+ # Selector specifying which fields to include in a partial response.
1308
+ # @param [String] quota_user
1309
+ # Available to use for quota purposes for server-side applications. Can be any
1310
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1311
+ # @param [Google::Apis::RequestOptions] options
1312
+ # Request-specific options
1313
+ #
1314
+ # @yield [result, err] Result & error if block supplied
1315
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePoliciesListResponse] parsed result object
1316
+ # @yieldparam err [StandardError] error object if request failed
1317
+ #
1318
+ # @return [Google::Apis::DnsV2::ResponsePoliciesListResponse]
1319
+ #
1320
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1321
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1322
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1323
+ def list_response_policies(project, location, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1324
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/responsePolicies', options)
1325
+ command.response_representation = Google::Apis::DnsV2::ResponsePoliciesListResponse::Representation
1326
+ command.response_class = Google::Apis::DnsV2::ResponsePoliciesListResponse
1327
+ command.params['project'] = project unless project.nil?
1328
+ command.params['location'] = location unless location.nil?
1329
+ command.query['maxResults'] = max_results unless max_results.nil?
1330
+ command.query['pageToken'] = page_token unless page_token.nil?
1331
+ command.query['fields'] = fields unless fields.nil?
1332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1333
+ execute_or_queue_command(command, &block)
1334
+ end
1335
+
1336
+ # Applies a partial update to an existing Response Policy.
1337
+ # @param [String] project
1338
+ # Identifies the project addressed by this request.
1339
+ # @param [String] location
1340
+ # Specifies the location of the resource. This information will be used for
1341
+ # routing and will be part of the resource name.
1342
+ # @param [String] response_policy
1343
+ # User assigned name of the Respones Policy addressed by this request.
1344
+ # @param [Google::Apis::DnsV2::ResponsePolicy] response_policy_object
1345
+ # @param [String] client_operation_id
1346
+ # For mutating operation requests only. An optional identifier specified by the
1347
+ # client. Must be unique for operation resources in the Operations collection.
1348
+ # @param [String] fields
1349
+ # Selector specifying which fields to include in a partial response.
1350
+ # @param [String] quota_user
1351
+ # Available to use for quota purposes for server-side applications. Can be any
1352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1353
+ # @param [Google::Apis::RequestOptions] options
1354
+ # Request-specific options
1355
+ #
1356
+ # @yield [result, err] Result & error if block supplied
1357
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePoliciesPatchResponse] parsed result object
1358
+ # @yieldparam err [StandardError] error object if request failed
1359
+ #
1360
+ # @return [Google::Apis::DnsV2::ResponsePoliciesPatchResponse]
1361
+ #
1362
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1363
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1364
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1365
+ def patch_response_policy(project, location, response_policy, response_policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1366
+ command = make_simple_command(:patch, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}', options)
1367
+ command.request_representation = Google::Apis::DnsV2::ResponsePolicy::Representation
1368
+ command.request_object = response_policy_object
1369
+ command.response_representation = Google::Apis::DnsV2::ResponsePoliciesPatchResponse::Representation
1370
+ command.response_class = Google::Apis::DnsV2::ResponsePoliciesPatchResponse
1371
+ command.params['project'] = project unless project.nil?
1372
+ command.params['location'] = location unless location.nil?
1373
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1374
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1375
+ command.query['fields'] = fields unless fields.nil?
1376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1377
+ execute_or_queue_command(command, &block)
1378
+ end
1379
+
1380
+ # Updates an existing Response Policy.
1381
+ # @param [String] project
1382
+ # Identifies the project addressed by this request.
1383
+ # @param [String] location
1384
+ # Specifies the location of the resource. This information will be used for
1385
+ # routing and will be part of the resource name.
1386
+ # @param [String] response_policy
1387
+ # User assigned name of the Response Policy addressed by this request.
1388
+ # @param [Google::Apis::DnsV2::ResponsePolicy] response_policy_object
1389
+ # @param [String] client_operation_id
1390
+ # For mutating operation requests only. An optional identifier specified by the
1391
+ # client. Must be unique for operation resources in the Operations collection.
1392
+ # @param [String] fields
1393
+ # Selector specifying which fields to include in a partial response.
1394
+ # @param [String] quota_user
1395
+ # Available to use for quota purposes for server-side applications. Can be any
1396
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1397
+ # @param [Google::Apis::RequestOptions] options
1398
+ # Request-specific options
1399
+ #
1400
+ # @yield [result, err] Result & error if block supplied
1401
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePoliciesUpdateResponse] parsed result object
1402
+ # @yieldparam err [StandardError] error object if request failed
1403
+ #
1404
+ # @return [Google::Apis::DnsV2::ResponsePoliciesUpdateResponse]
1405
+ #
1406
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1407
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1408
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1409
+ def update_response_policy(project, location, response_policy, response_policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1410
+ command = make_simple_command(:put, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}', options)
1411
+ command.request_representation = Google::Apis::DnsV2::ResponsePolicy::Representation
1412
+ command.request_object = response_policy_object
1413
+ command.response_representation = Google::Apis::DnsV2::ResponsePoliciesUpdateResponse::Representation
1414
+ command.response_class = Google::Apis::DnsV2::ResponsePoliciesUpdateResponse
1415
+ command.params['project'] = project unless project.nil?
1416
+ command.params['location'] = location unless location.nil?
1417
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1418
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1419
+ command.query['fields'] = fields unless fields.nil?
1420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1421
+ execute_or_queue_command(command, &block)
1422
+ end
1423
+
1424
+ # Creates a new Response Policy Rule.
1425
+ # @param [String] project
1426
+ # Identifies the project addressed by this request.
1427
+ # @param [String] location
1428
+ # Specifies the location of the resource. This information will be used for
1429
+ # routing and will be part of the resource name.
1430
+ # @param [String] response_policy
1431
+ # User assigned name of the Response Policy containing the Response Policy Rule.
1432
+ # @param [Google::Apis::DnsV2::ResponsePolicyRule] response_policy_rule_object
1433
+ # @param [String] client_operation_id
1434
+ # For mutating operation requests only. An optional identifier specified by the
1435
+ # client. Must be unique for operation resources in the Operations collection.
1436
+ # @param [String] fields
1437
+ # Selector specifying which fields to include in a partial response.
1438
+ # @param [String] quota_user
1439
+ # Available to use for quota purposes for server-side applications. Can be any
1440
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1441
+ # @param [Google::Apis::RequestOptions] options
1442
+ # Request-specific options
1443
+ #
1444
+ # @yield [result, err] Result & error if block supplied
1445
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePolicyRule] parsed result object
1446
+ # @yieldparam err [StandardError] error object if request failed
1447
+ #
1448
+ # @return [Google::Apis::DnsV2::ResponsePolicyRule]
1449
+ #
1450
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1451
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1452
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1453
+ def create_response_policy_rule(project, location, response_policy, response_policy_rule_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1454
+ command = make_simple_command(:post, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules', options)
1455
+ command.request_representation = Google::Apis::DnsV2::ResponsePolicyRule::Representation
1456
+ command.request_object = response_policy_rule_object
1457
+ command.response_representation = Google::Apis::DnsV2::ResponsePolicyRule::Representation
1458
+ command.response_class = Google::Apis::DnsV2::ResponsePolicyRule
1459
+ command.params['project'] = project unless project.nil?
1460
+ command.params['location'] = location unless location.nil?
1461
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1462
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1463
+ command.query['fields'] = fields unless fields.nil?
1464
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1465
+ execute_or_queue_command(command, &block)
1466
+ end
1467
+
1468
+ # Deletes a previously created Response Policy Rule.
1469
+ # @param [String] project
1470
+ # Identifies the project addressed by this request.
1471
+ # @param [String] location
1472
+ # Specifies the location of the resource. This information will be used for
1473
+ # routing and will be part of the resource name.
1474
+ # @param [String] response_policy
1475
+ # User assigned name of the Response Policy containing the Response Policy Rule.
1476
+ # @param [String] response_policy_rule
1477
+ # User assigned name of the Response Policy Rule addressed by this request.
1478
+ # @param [String] client_operation_id
1479
+ # For mutating operation requests only. An optional identifier specified by the
1480
+ # client. Must be unique for operation resources in the Operations collection.
1481
+ # @param [String] fields
1482
+ # Selector specifying which fields to include in a partial response.
1483
+ # @param [String] quota_user
1484
+ # Available to use for quota purposes for server-side applications. Can be any
1485
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1486
+ # @param [Google::Apis::RequestOptions] options
1487
+ # Request-specific options
1488
+ #
1489
+ # @yield [result, err] Result & error if block supplied
1490
+ # @yieldparam result [NilClass] No result returned for this method
1491
+ # @yieldparam err [StandardError] error object if request failed
1492
+ #
1493
+ # @return [void]
1494
+ #
1495
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1496
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1497
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1498
+ def delete_response_policy_rule(project, location, response_policy, response_policy_rule, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1499
+ command = make_simple_command(:delete, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}', options)
1500
+ command.params['project'] = project unless project.nil?
1501
+ command.params['location'] = location unless location.nil?
1502
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1503
+ command.params['responsePolicyRule'] = response_policy_rule unless response_policy_rule.nil?
1504
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1505
+ command.query['fields'] = fields unless fields.nil?
1506
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1507
+ execute_or_queue_command(command, &block)
1508
+ end
1509
+
1510
+ # Fetches the representation of an existing Response Policy Rule.
1511
+ # @param [String] project
1512
+ # Identifies the project addressed by this request.
1513
+ # @param [String] location
1514
+ # Specifies the location of the resource. This information will be used for
1515
+ # routing and will be part of the resource name.
1516
+ # @param [String] response_policy
1517
+ # User assigned name of the Response Policy containing the Response Policy Rule.
1518
+ # @param [String] response_policy_rule
1519
+ # User assigned name of the Response Policy Rule addressed by this request.
1520
+ # @param [String] client_operation_id
1521
+ # For mutating operation requests only. An optional identifier specified by the
1522
+ # client. Must be unique for operation resources in the Operations collection.
1523
+ # @param [String] fields
1524
+ # Selector specifying which fields to include in a partial response.
1525
+ # @param [String] quota_user
1526
+ # Available to use for quota purposes for server-side applications. Can be any
1527
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1528
+ # @param [Google::Apis::RequestOptions] options
1529
+ # Request-specific options
1530
+ #
1531
+ # @yield [result, err] Result & error if block supplied
1532
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePolicyRule] parsed result object
1533
+ # @yieldparam err [StandardError] error object if request failed
1534
+ #
1535
+ # @return [Google::Apis::DnsV2::ResponsePolicyRule]
1536
+ #
1537
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1538
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1539
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1540
+ def get_response_policy_rule(project, location, response_policy, response_policy_rule, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1541
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}', options)
1542
+ command.response_representation = Google::Apis::DnsV2::ResponsePolicyRule::Representation
1543
+ command.response_class = Google::Apis::DnsV2::ResponsePolicyRule
1544
+ command.params['project'] = project unless project.nil?
1545
+ command.params['location'] = location unless location.nil?
1546
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1547
+ command.params['responsePolicyRule'] = response_policy_rule unless response_policy_rule.nil?
1548
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1549
+ command.query['fields'] = fields unless fields.nil?
1550
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1551
+ execute_or_queue_command(command, &block)
1552
+ end
1553
+
1554
+ # Enumerates all Response Policy Rules associated with a project.
1555
+ # @param [String] project
1556
+ # Identifies the project addressed by this request.
1557
+ # @param [String] location
1558
+ # Specifies the location of the resource. This information will be used for
1559
+ # routing and will be part of the resource name.
1560
+ # @param [String] response_policy
1561
+ # User assigned name of the Response Policy to list.
1562
+ # @param [Fixnum] max_results
1563
+ # Optional. Maximum number of results to be returned. If unspecified, the server
1564
+ # decides how many results to return.
1565
+ # @param [String] page_token
1566
+ # Optional. A tag returned by a previous list request that was truncated. Use
1567
+ # this parameter to continue a previous list request.
1568
+ # @param [String] fields
1569
+ # Selector specifying which fields to include in a partial response.
1570
+ # @param [String] quota_user
1571
+ # Available to use for quota purposes for server-side applications. Can be any
1572
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1573
+ # @param [Google::Apis::RequestOptions] options
1574
+ # Request-specific options
1575
+ #
1576
+ # @yield [result, err] Result & error if block supplied
1577
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePolicyRulesListResponse] parsed result object
1578
+ # @yieldparam err [StandardError] error object if request failed
1579
+ #
1580
+ # @return [Google::Apis::DnsV2::ResponsePolicyRulesListResponse]
1581
+ #
1582
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1583
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1584
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1585
+ def list_response_policy_rules(project, location, response_policy, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1586
+ command = make_simple_command(:get, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules', options)
1587
+ command.response_representation = Google::Apis::DnsV2::ResponsePolicyRulesListResponse::Representation
1588
+ command.response_class = Google::Apis::DnsV2::ResponsePolicyRulesListResponse
1589
+ command.params['project'] = project unless project.nil?
1590
+ command.params['location'] = location unless location.nil?
1591
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1592
+ command.query['maxResults'] = max_results unless max_results.nil?
1593
+ command.query['pageToken'] = page_token unless page_token.nil?
1594
+ command.query['fields'] = fields unless fields.nil?
1595
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1596
+ execute_or_queue_command(command, &block)
1597
+ end
1598
+
1599
+ # Applies a partial update to an existing Response Policy Rule.
1600
+ # @param [String] project
1601
+ # Identifies the project addressed by this request.
1602
+ # @param [String] location
1603
+ # Specifies the location of the resource. This information will be used for
1604
+ # routing and will be part of the resource name.
1605
+ # @param [String] response_policy
1606
+ # User assigned name of the Response Policy containing the Response Policy Rule.
1607
+ # @param [String] response_policy_rule
1608
+ # User assigned name of the Response Policy Rule addressed by this request.
1609
+ # @param [Google::Apis::DnsV2::ResponsePolicyRule] response_policy_rule_object
1610
+ # @param [String] client_operation_id
1611
+ # For mutating operation requests only. An optional identifier specified by the
1612
+ # client. Must be unique for operation resources in the Operations collection.
1613
+ # @param [String] fields
1614
+ # Selector specifying which fields to include in a partial response.
1615
+ # @param [String] quota_user
1616
+ # Available to use for quota purposes for server-side applications. Can be any
1617
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1618
+ # @param [Google::Apis::RequestOptions] options
1619
+ # Request-specific options
1620
+ #
1621
+ # @yield [result, err] Result & error if block supplied
1622
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePolicyRulesPatchResponse] parsed result object
1623
+ # @yieldparam err [StandardError] error object if request failed
1624
+ #
1625
+ # @return [Google::Apis::DnsV2::ResponsePolicyRulesPatchResponse]
1626
+ #
1627
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1628
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1629
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1630
+ def patch_response_policy_rule(project, location, response_policy, response_policy_rule, response_policy_rule_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1631
+ command = make_simple_command(:patch, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}', options)
1632
+ command.request_representation = Google::Apis::DnsV2::ResponsePolicyRule::Representation
1633
+ command.request_object = response_policy_rule_object
1634
+ command.response_representation = Google::Apis::DnsV2::ResponsePolicyRulesPatchResponse::Representation
1635
+ command.response_class = Google::Apis::DnsV2::ResponsePolicyRulesPatchResponse
1636
+ command.params['project'] = project unless project.nil?
1637
+ command.params['location'] = location unless location.nil?
1638
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1639
+ command.params['responsePolicyRule'] = response_policy_rule unless response_policy_rule.nil?
1640
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1641
+ command.query['fields'] = fields unless fields.nil?
1642
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1643
+ execute_or_queue_command(command, &block)
1644
+ end
1645
+
1646
+ # Updates an existing Response Policy Rule.
1647
+ # @param [String] project
1648
+ # Identifies the project addressed by this request.
1649
+ # @param [String] location
1650
+ # Specifies the location of the resource. This information will be used for
1651
+ # routing and will be part of the resource name.
1652
+ # @param [String] response_policy
1653
+ # User assigned name of the Response Policy containing the Response Policy Rule.
1654
+ # @param [String] response_policy_rule
1655
+ # User assigned name of the Response Policy Rule addressed by this request.
1656
+ # @param [Google::Apis::DnsV2::ResponsePolicyRule] response_policy_rule_object
1657
+ # @param [String] client_operation_id
1658
+ # For mutating operation requests only. An optional identifier specified by the
1659
+ # client. Must be unique for operation resources in the Operations collection.
1660
+ # @param [String] fields
1661
+ # Selector specifying which fields to include in a partial response.
1662
+ # @param [String] quota_user
1663
+ # Available to use for quota purposes for server-side applications. Can be any
1664
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1665
+ # @param [Google::Apis::RequestOptions] options
1666
+ # Request-specific options
1667
+ #
1668
+ # @yield [result, err] Result & error if block supplied
1669
+ # @yieldparam result [Google::Apis::DnsV2::ResponsePolicyRulesUpdateResponse] parsed result object
1670
+ # @yieldparam err [StandardError] error object if request failed
1671
+ #
1672
+ # @return [Google::Apis::DnsV2::ResponsePolicyRulesUpdateResponse]
1673
+ #
1674
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1675
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1676
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1677
+ def update_response_policy_rule(project, location, response_policy, response_policy_rule, response_policy_rule_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1678
+ command = make_simple_command(:put, 'dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}', options)
1679
+ command.request_representation = Google::Apis::DnsV2::ResponsePolicyRule::Representation
1680
+ command.request_object = response_policy_rule_object
1681
+ command.response_representation = Google::Apis::DnsV2::ResponsePolicyRulesUpdateResponse::Representation
1682
+ command.response_class = Google::Apis::DnsV2::ResponsePolicyRulesUpdateResponse
1683
+ command.params['project'] = project unless project.nil?
1684
+ command.params['location'] = location unless location.nil?
1685
+ command.params['responsePolicy'] = response_policy unless response_policy.nil?
1686
+ command.params['responsePolicyRule'] = response_policy_rule unless response_policy_rule.nil?
1687
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1688
+ command.query['fields'] = fields unless fields.nil?
1689
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1690
+ execute_or_queue_command(command, &block)
1691
+ end
1692
+
1693
+ protected
1694
+
1695
+ def apply_command_defaults(command)
1696
+ command.query['key'] = key unless key.nil?
1697
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1698
+ end
1699
+ end
1700
+ end
1701
+ end
1702
+ end