google-apis-networkmanagement_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,646 @@
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 NetworkmanagementV1beta1
23
+ # Network Management API
24
+ #
25
+ # The Network Management API provides a collection of network performance
26
+ # monitoring and diagnostic capabilities.
27
+ #
28
+ # @example
29
+ # require 'google/apis/networkmanagement_v1beta1'
30
+ #
31
+ # Networkmanagement = Google::Apis::NetworkmanagementV1beta1 # Alias the module
32
+ # service = Networkmanagement::NetworkManagementService.new
33
+ #
34
+ # @see https://cloud.google.com/
35
+ class NetworkManagementService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://networkmanagement.googleapis.com/', '',
48
+ client_name: 'google-apis-networkmanagement_v1beta1',
49
+ client_version: Google::Apis::NetworkmanagementV1beta1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::NetworkmanagementV1beta1::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
75
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Location::Representation
76
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::NetworkmanagementV1beta1::ListLocationsResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Creates a new Connectivity Test. After you create a test, the reachability
123
+ # analysis is performed as part of the long running operation, which completes
124
+ # when the analysis completes. If the endpoint specifications in `
125
+ # ConnectivityTest` are invalid (for example, containing non-existent resources
126
+ # in the network, or you don't have read permissions to the network
127
+ # configurations of listed projects), then the reachability result returns a
128
+ # value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are
129
+ # incomplete, the reachability result returns a value of AMBIGUOUS. For more
130
+ # information, see the Connectivity Test documentation.
131
+ # @param [String] parent
132
+ # Required. The parent resource of the Connectivity Test to create: `projects/`
133
+ # project_id`/locations/global`
134
+ # @param [Google::Apis::NetworkmanagementV1beta1::ConnectivityTest] connectivity_test_object
135
+ # @param [String] test_id
136
+ # Required. The logical name of the Connectivity Test in your project with the
137
+ # following restrictions: * Must contain only lowercase letters, numbers, and
138
+ # hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must
139
+ # end with a number or a letter. * Must be unique within the customer project
140
+ # @param [String] fields
141
+ # Selector specifying which fields to include in a partial response.
142
+ # @param [String] quota_user
143
+ # Available to use for quota purposes for server-side applications. Can be any
144
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
145
+ # @param [Google::Apis::RequestOptions] options
146
+ # Request-specific options
147
+ #
148
+ # @yield [result, err] Result & error if block supplied
149
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Operation] parsed result object
150
+ # @yieldparam err [StandardError] error object if request failed
151
+ #
152
+ # @return [Google::Apis::NetworkmanagementV1beta1::Operation]
153
+ #
154
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
155
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
156
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
157
+ def create_project_location_global_connectivity_test(parent, connectivity_test_object = nil, test_id: nil, fields: nil, quota_user: nil, options: nil, &block)
158
+ command = make_simple_command(:post, 'v1beta1/{+parent}/connectivityTests', options)
159
+ command.request_representation = Google::Apis::NetworkmanagementV1beta1::ConnectivityTest::Representation
160
+ command.request_object = connectivity_test_object
161
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Operation::Representation
162
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Operation
163
+ command.params['parent'] = parent unless parent.nil?
164
+ command.query['testId'] = test_id unless test_id.nil?
165
+ command.query['fields'] = fields unless fields.nil?
166
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
167
+ execute_or_queue_command(command, &block)
168
+ end
169
+
170
+ # Deletes a specific `ConnectivityTest`.
171
+ # @param [String] name
172
+ # Required. Connectivity Test resource name using the form: `projects/`
173
+ # project_id`/locations/global/connectivityTests/`test_id``
174
+ # @param [String] fields
175
+ # Selector specifying which fields to include in a partial response.
176
+ # @param [String] quota_user
177
+ # Available to use for quota purposes for server-side applications. Can be any
178
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
179
+ # @param [Google::Apis::RequestOptions] options
180
+ # Request-specific options
181
+ #
182
+ # @yield [result, err] Result & error if block supplied
183
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Operation] parsed result object
184
+ # @yieldparam err [StandardError] error object if request failed
185
+ #
186
+ # @return [Google::Apis::NetworkmanagementV1beta1::Operation]
187
+ #
188
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
189
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
190
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
191
+ def delete_project_location_global_connectivity_test(name, fields: nil, quota_user: nil, options: nil, &block)
192
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
193
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Operation::Representation
194
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Operation
195
+ command.params['name'] = name unless name.nil?
196
+ command.query['fields'] = fields unless fields.nil?
197
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
198
+ execute_or_queue_command(command, &block)
199
+ end
200
+
201
+ # Gets the details of a specific Connectivity Test.
202
+ # @param [String] name
203
+ # Required. `ConnectivityTest` resource name using the form: `projects/`
204
+ # project_id`/locations/global/connectivityTests/`test_id``
205
+ # @param [String] fields
206
+ # Selector specifying which fields to include in a partial response.
207
+ # @param [String] quota_user
208
+ # Available to use for quota purposes for server-side applications. Can be any
209
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
210
+ # @param [Google::Apis::RequestOptions] options
211
+ # Request-specific options
212
+ #
213
+ # @yield [result, err] Result & error if block supplied
214
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::ConnectivityTest] parsed result object
215
+ # @yieldparam err [StandardError] error object if request failed
216
+ #
217
+ # @return [Google::Apis::NetworkmanagementV1beta1::ConnectivityTest]
218
+ #
219
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
220
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
221
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
222
+ def get_project_location_global_connectivity_test(name, fields: nil, quota_user: nil, options: nil, &block)
223
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
224
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::ConnectivityTest::Representation
225
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::ConnectivityTest
226
+ command.params['name'] = name unless name.nil?
227
+ command.query['fields'] = fields unless fields.nil?
228
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
229
+ execute_or_queue_command(command, &block)
230
+ end
231
+
232
+ # Gets the access control policy for a resource. Returns an empty policy if the
233
+ # resource exists and does not have a policy set.
234
+ # @param [String] resource
235
+ # REQUIRED: The resource for which the policy is being requested. See the
236
+ # operation documentation for the appropriate value for this field.
237
+ # @param [Fixnum] options_requested_policy_version
238
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
239
+ # 3. Requests specifying an invalid value will be rejected. Requests for
240
+ # policies with any conditional bindings must specify version 3. Policies
241
+ # without any conditional bindings may specify any valid value or leave the
242
+ # field unset. To learn which resources support conditions in their IAM policies,
243
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
244
+ # resource-policies).
245
+ # @param [String] fields
246
+ # Selector specifying which fields to include in a partial response.
247
+ # @param [String] quota_user
248
+ # Available to use for quota purposes for server-side applications. Can be any
249
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
250
+ # @param [Google::Apis::RequestOptions] options
251
+ # Request-specific options
252
+ #
253
+ # @yield [result, err] Result & error if block supplied
254
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Policy] parsed result object
255
+ # @yieldparam err [StandardError] error object if request failed
256
+ #
257
+ # @return [Google::Apis::NetworkmanagementV1beta1::Policy]
258
+ #
259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
262
+ def get_project_location_global_connectivity_test_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
263
+ command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options)
264
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Policy::Representation
265
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Policy
266
+ command.params['resource'] = resource unless resource.nil?
267
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
268
+ command.query['fields'] = fields unless fields.nil?
269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
270
+ execute_or_queue_command(command, &block)
271
+ end
272
+
273
+ # Lists all Connectivity Tests owned by a project.
274
+ # @param [String] parent
275
+ # Required. The parent resource of the Connectivity Tests: `projects/`project_id`
276
+ # /locations/global`
277
+ # @param [String] filter
278
+ # Lists the `ConnectivityTests` that match the filter expression. A filter
279
+ # expression filters the resources listed in the response. The expression must
280
+ # be of the form ` ` where operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are
281
+ # supported (colon `:` represents a HAS operator which is roughly synonymous
282
+ # with equality). can refer to a proto or JSON field, or a synthetic field.
283
+ # Field names can be camelCase or snake_case. Examples: - Filter by name: name =
284
+ # "projects/proj-1/locations/global/connectivityTests/test-1 - Filter by labels:
285
+ # - Resources that have a key called `foo` labels.foo:* - Resources that have a
286
+ # key called `foo` whose value is `bar` labels.foo = bar
287
+ # @param [String] order_by
288
+ # Field to use to sort the list.
289
+ # @param [Fixnum] page_size
290
+ # Number of `ConnectivityTests` to return.
291
+ # @param [String] page_token
292
+ # Page token from an earlier query, as returned in `next_page_token`.
293
+ # @param [String] fields
294
+ # Selector specifying which fields to include in a partial response.
295
+ # @param [String] quota_user
296
+ # Available to use for quota purposes for server-side applications. Can be any
297
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
298
+ # @param [Google::Apis::RequestOptions] options
299
+ # Request-specific options
300
+ #
301
+ # @yield [result, err] Result & error if block supplied
302
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::ListConnectivityTestsResponse] parsed result object
303
+ # @yieldparam err [StandardError] error object if request failed
304
+ #
305
+ # @return [Google::Apis::NetworkmanagementV1beta1::ListConnectivityTestsResponse]
306
+ #
307
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
308
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
309
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
310
+ def list_project_location_global_connectivity_tests(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
311
+ command = make_simple_command(:get, 'v1beta1/{+parent}/connectivityTests', options)
312
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::ListConnectivityTestsResponse::Representation
313
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::ListConnectivityTestsResponse
314
+ command.params['parent'] = parent unless parent.nil?
315
+ command.query['filter'] = filter unless filter.nil?
316
+ command.query['orderBy'] = order_by unless order_by.nil?
317
+ command.query['pageSize'] = page_size unless page_size.nil?
318
+ command.query['pageToken'] = page_token unless page_token.nil?
319
+ command.query['fields'] = fields unless fields.nil?
320
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
321
+ execute_or_queue_command(command, &block)
322
+ end
323
+
324
+ # Updates the configuration of an existing `ConnectivityTest`. After you update
325
+ # a test, the reachability analysis is performed as part of the long running
326
+ # operation, which completes when the analysis completes. The Reachability state
327
+ # in the test resource is updated with the new result. If the endpoint
328
+ # specifications in `ConnectivityTest` are invalid (for example, they contain
329
+ # non-existent resources in the network, or the user does not have read
330
+ # permissions to the network configurations of listed projects), then the
331
+ # reachability result returns a value of UNKNOWN. If the endpoint specifications
332
+ # in `ConnectivityTest` are incomplete, the reachability result returns a value
333
+ # of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more
334
+ # details.
335
+ # @param [String] name
336
+ # Required. Unique name of the resource using the form: `projects/`project_id`/
337
+ # locations/global/connectivityTests/`test``
338
+ # @param [Google::Apis::NetworkmanagementV1beta1::ConnectivityTest] connectivity_test_object
339
+ # @param [String] update_mask
340
+ # Required. Mask of fields to update. At least one path must be supplied in this
341
+ # field.
342
+ # @param [String] fields
343
+ # Selector specifying which fields to include in a partial response.
344
+ # @param [String] quota_user
345
+ # Available to use for quota purposes for server-side applications. Can be any
346
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
347
+ # @param [Google::Apis::RequestOptions] options
348
+ # Request-specific options
349
+ #
350
+ # @yield [result, err] Result & error if block supplied
351
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Operation] parsed result object
352
+ # @yieldparam err [StandardError] error object if request failed
353
+ #
354
+ # @return [Google::Apis::NetworkmanagementV1beta1::Operation]
355
+ #
356
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
357
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
358
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
359
+ def patch_project_location_global_connectivity_test(name, connectivity_test_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
360
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
361
+ command.request_representation = Google::Apis::NetworkmanagementV1beta1::ConnectivityTest::Representation
362
+ command.request_object = connectivity_test_object
363
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Operation::Representation
364
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Operation
365
+ command.params['name'] = name unless name.nil?
366
+ command.query['updateMask'] = update_mask unless update_mask.nil?
367
+ command.query['fields'] = fields unless fields.nil?
368
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
369
+ execute_or_queue_command(command, &block)
370
+ end
371
+
372
+ # Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the
373
+ # reachability analysis is performed as part of the long running operation,
374
+ # which completes when the analysis completes. Even though the test
375
+ # configuration remains the same, the reachability result may change due to
376
+ # underlying network configuration changes. If the endpoint specifications in `
377
+ # ConnectivityTest` become invalid (for example, specified resources are deleted
378
+ # in the network, or you lost read permissions to the network configurations of
379
+ # listed projects), then the reachability result returns a value of `UNKNOWN`.
380
+ # @param [String] name
381
+ # Required. Connectivity Test resource name using the form: `projects/`
382
+ # project_id`/locations/global/connectivityTests/`test_id``
383
+ # @param [Google::Apis::NetworkmanagementV1beta1::RerunConnectivityTestRequest] rerun_connectivity_test_request_object
384
+ # @param [String] fields
385
+ # Selector specifying which fields to include in a partial response.
386
+ # @param [String] quota_user
387
+ # Available to use for quota purposes for server-side applications. Can be any
388
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
389
+ # @param [Google::Apis::RequestOptions] options
390
+ # Request-specific options
391
+ #
392
+ # @yield [result, err] Result & error if block supplied
393
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Operation] parsed result object
394
+ # @yieldparam err [StandardError] error object if request failed
395
+ #
396
+ # @return [Google::Apis::NetworkmanagementV1beta1::Operation]
397
+ #
398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
401
+ def rerun_connectivity_test(name, rerun_connectivity_test_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
402
+ command = make_simple_command(:post, 'v1beta1/{+name}:rerun', options)
403
+ command.request_representation = Google::Apis::NetworkmanagementV1beta1::RerunConnectivityTestRequest::Representation
404
+ command.request_object = rerun_connectivity_test_request_object
405
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Operation::Representation
406
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Operation
407
+ command.params['name'] = name unless name.nil?
408
+ command.query['fields'] = fields unless fields.nil?
409
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
410
+ execute_or_queue_command(command, &block)
411
+ end
412
+
413
+ # Sets the access control policy on the specified resource. Replaces any
414
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
415
+ # PERMISSION_DENIED` errors.
416
+ # @param [String] resource
417
+ # REQUIRED: The resource for which the policy is being specified. See the
418
+ # operation documentation for the appropriate value for this field.
419
+ # @param [Google::Apis::NetworkmanagementV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
420
+ # @param [String] fields
421
+ # Selector specifying which fields to include in a partial response.
422
+ # @param [String] quota_user
423
+ # Available to use for quota purposes for server-side applications. Can be any
424
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
425
+ # @param [Google::Apis::RequestOptions] options
426
+ # Request-specific options
427
+ #
428
+ # @yield [result, err] Result & error if block supplied
429
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Policy] parsed result object
430
+ # @yieldparam err [StandardError] error object if request failed
431
+ #
432
+ # @return [Google::Apis::NetworkmanagementV1beta1::Policy]
433
+ #
434
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
435
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
436
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
437
+ def set_connectivity_test_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
438
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
439
+ command.request_representation = Google::Apis::NetworkmanagementV1beta1::SetIamPolicyRequest::Representation
440
+ command.request_object = set_iam_policy_request_object
441
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Policy::Representation
442
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Policy
443
+ command.params['resource'] = resource unless resource.nil?
444
+ command.query['fields'] = fields unless fields.nil?
445
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
446
+ execute_or_queue_command(command, &block)
447
+ end
448
+
449
+ # Returns permissions that a caller has on the specified resource. If the
450
+ # resource does not exist, this will return an empty set of permissions, not a `
451
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
452
+ # permission-aware UIs and command-line tools, not for authorization checking.
453
+ # This operation may "fail open" without warning.
454
+ # @param [String] resource
455
+ # REQUIRED: The resource for which the policy detail is being requested. See the
456
+ # operation documentation for the appropriate value for this field.
457
+ # @param [Google::Apis::NetworkmanagementV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
458
+ # @param [String] fields
459
+ # Selector specifying which fields to include in a partial response.
460
+ # @param [String] quota_user
461
+ # Available to use for quota purposes for server-side applications. Can be any
462
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
463
+ # @param [Google::Apis::RequestOptions] options
464
+ # Request-specific options
465
+ #
466
+ # @yield [result, err] Result & error if block supplied
467
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::TestIamPermissionsResponse] parsed result object
468
+ # @yieldparam err [StandardError] error object if request failed
469
+ #
470
+ # @return [Google::Apis::NetworkmanagementV1beta1::TestIamPermissionsResponse]
471
+ #
472
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
473
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
474
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
475
+ def test_connectivity_test_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
476
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
477
+ command.request_representation = Google::Apis::NetworkmanagementV1beta1::TestIamPermissionsRequest::Representation
478
+ command.request_object = test_iam_permissions_request_object
479
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::TestIamPermissionsResponse::Representation
480
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::TestIamPermissionsResponse
481
+ command.params['resource'] = resource unless resource.nil?
482
+ command.query['fields'] = fields unless fields.nil?
483
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
484
+ execute_or_queue_command(command, &block)
485
+ end
486
+
487
+ # Starts asynchronous cancellation on a long-running operation. The server makes
488
+ # a best effort to cancel the operation, but success is not guaranteed. If the
489
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
490
+ # Clients can use Operations.GetOperation or other methods to check whether the
491
+ # cancellation succeeded or whether the operation completed despite cancellation.
492
+ # On successful cancellation, the operation is not deleted; instead, it becomes
493
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
494
+ # corresponding to `Code.CANCELLED`.
495
+ # @param [String] name
496
+ # The name of the operation resource to be cancelled.
497
+ # @param [Google::Apis::NetworkmanagementV1beta1::CancelOperationRequest] cancel_operation_request_object
498
+ # @param [String] fields
499
+ # Selector specifying which fields to include in a partial response.
500
+ # @param [String] quota_user
501
+ # Available to use for quota purposes for server-side applications. Can be any
502
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
503
+ # @param [Google::Apis::RequestOptions] options
504
+ # Request-specific options
505
+ #
506
+ # @yield [result, err] Result & error if block supplied
507
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Empty] parsed result object
508
+ # @yieldparam err [StandardError] error object if request failed
509
+ #
510
+ # @return [Google::Apis::NetworkmanagementV1beta1::Empty]
511
+ #
512
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
513
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
514
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
515
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
516
+ command = make_simple_command(:post, 'v1beta1/{+name}:cancel', options)
517
+ command.request_representation = Google::Apis::NetworkmanagementV1beta1::CancelOperationRequest::Representation
518
+ command.request_object = cancel_operation_request_object
519
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Empty::Representation
520
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Empty
521
+ command.params['name'] = name unless name.nil?
522
+ command.query['fields'] = fields unless fields.nil?
523
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
524
+ execute_or_queue_command(command, &block)
525
+ end
526
+
527
+ # Deletes a long-running operation. This method indicates that the client is no
528
+ # longer interested in the operation result. It does not cancel the operation.
529
+ # If the server doesn't support this method, it returns `google.rpc.Code.
530
+ # UNIMPLEMENTED`.
531
+ # @param [String] name
532
+ # The name of the operation resource to be deleted.
533
+ # @param [String] fields
534
+ # Selector specifying which fields to include in a partial response.
535
+ # @param [String] quota_user
536
+ # Available to use for quota purposes for server-side applications. Can be any
537
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
538
+ # @param [Google::Apis::RequestOptions] options
539
+ # Request-specific options
540
+ #
541
+ # @yield [result, err] Result & error if block supplied
542
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Empty] parsed result object
543
+ # @yieldparam err [StandardError] error object if request failed
544
+ #
545
+ # @return [Google::Apis::NetworkmanagementV1beta1::Empty]
546
+ #
547
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
548
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
549
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
550
+ def delete_project_location_global_operation(name, fields: nil, quota_user: nil, options: nil, &block)
551
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
552
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Empty::Representation
553
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Empty
554
+ command.params['name'] = name unless name.nil?
555
+ command.query['fields'] = fields unless fields.nil?
556
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
557
+ execute_or_queue_command(command, &block)
558
+ end
559
+
560
+ # Gets the latest state of a long-running operation. Clients can use this method
561
+ # to poll the operation result at intervals as recommended by the API service.
562
+ # @param [String] name
563
+ # The name of the operation resource.
564
+ # @param [String] fields
565
+ # Selector specifying which fields to include in a partial response.
566
+ # @param [String] quota_user
567
+ # Available to use for quota purposes for server-side applications. Can be any
568
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
569
+ # @param [Google::Apis::RequestOptions] options
570
+ # Request-specific options
571
+ #
572
+ # @yield [result, err] Result & error if block supplied
573
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::Operation] parsed result object
574
+ # @yieldparam err [StandardError] error object if request failed
575
+ #
576
+ # @return [Google::Apis::NetworkmanagementV1beta1::Operation]
577
+ #
578
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
579
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
580
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
581
+ def get_project_location_global_operation(name, fields: nil, quota_user: nil, options: nil, &block)
582
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
583
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::Operation::Representation
584
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::Operation
585
+ command.params['name'] = name unless name.nil?
586
+ command.query['fields'] = fields unless fields.nil?
587
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
588
+ execute_or_queue_command(command, &block)
589
+ end
590
+
591
+ # Lists operations that match the specified filter in the request. If the server
592
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
593
+ # binding allows API services to override the binding to use different resource
594
+ # name schemes, such as `users/*/operations`. To override the binding, API
595
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
596
+ # service configuration. For backwards compatibility, the default name includes
597
+ # the operations collection id, however overriding users must ensure the name
598
+ # binding is the parent resource, without the operations collection id.
599
+ # @param [String] name
600
+ # The name of the operation's parent resource.
601
+ # @param [String] filter
602
+ # The standard list filter.
603
+ # @param [Fixnum] page_size
604
+ # The standard list page size.
605
+ # @param [String] page_token
606
+ # The standard list page token.
607
+ # @param [String] fields
608
+ # Selector specifying which fields to include in a partial response.
609
+ # @param [String] quota_user
610
+ # Available to use for quota purposes for server-side applications. Can be any
611
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
612
+ # @param [Google::Apis::RequestOptions] options
613
+ # Request-specific options
614
+ #
615
+ # @yield [result, err] Result & error if block supplied
616
+ # @yieldparam result [Google::Apis::NetworkmanagementV1beta1::ListOperationsResponse] parsed result object
617
+ # @yieldparam err [StandardError] error object if request failed
618
+ #
619
+ # @return [Google::Apis::NetworkmanagementV1beta1::ListOperationsResponse]
620
+ #
621
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
622
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
623
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
624
+ def list_project_location_global_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
625
+ command = make_simple_command(:get, 'v1beta1/{+name}/operations', options)
626
+ command.response_representation = Google::Apis::NetworkmanagementV1beta1::ListOperationsResponse::Representation
627
+ command.response_class = Google::Apis::NetworkmanagementV1beta1::ListOperationsResponse
628
+ command.params['name'] = name unless name.nil?
629
+ command.query['filter'] = filter unless filter.nil?
630
+ command.query['pageSize'] = page_size unless page_size.nil?
631
+ command.query['pageToken'] = page_token unless page_token.nil?
632
+ command.query['fields'] = fields unless fields.nil?
633
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
634
+ execute_or_queue_command(command, &block)
635
+ end
636
+
637
+ protected
638
+
639
+ def apply_command_defaults(command)
640
+ command.query['key'] = key unless key.nil?
641
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
642
+ end
643
+ end
644
+ end
645
+ end
646
+ end