google-apis-ids_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,577 @@
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 IdsV1
23
+ # Cloud IDS API
24
+ #
25
+ # Cloud IDS (Cloud Intrusion Detection System) detects malware, spyware, command-
26
+ # and-control attacks, and other network-based threats. Its security efficacy is
27
+ # industry leading, built with Palo Alto Networks technologies. When you use
28
+ # this product, your organization name and consumption levels will be shared
29
+ # with Palo Alto Networks.
30
+ #
31
+ # @example
32
+ # require 'google/apis/ids_v1'
33
+ #
34
+ # Ids = Google::Apis::IdsV1 # Alias the module
35
+ # service = Ids::IDSService.new
36
+ #
37
+ # @see https://cloud.google.com/
38
+ class IDSService < Google::Apis::Core::BaseService
39
+ # @return [String]
40
+ # API key. Your API key identifies your project and provides you with API access,
41
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
42
+ attr_accessor :key
43
+
44
+ # @return [String]
45
+ # Available to use for quota purposes for server-side applications. Can be any
46
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
47
+ attr_accessor :quota_user
48
+
49
+ def initialize
50
+ super('https://ids.googleapis.com/', '',
51
+ client_name: 'google-apis-ids_v1',
52
+ client_version: Google::Apis::IdsV1::GEM_VERSION)
53
+ @batch_path = 'batch'
54
+ end
55
+
56
+ # Gets information about a location.
57
+ # @param [String] name
58
+ # Resource name for the location.
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::IdsV1::Location] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::IdsV1::Location]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:get, 'v1/{+name}', options)
78
+ command.response_representation = Google::Apis::IdsV1::Location::Representation
79
+ command.response_class = Google::Apis::IdsV1::Location
80
+ command.params['name'] = name unless name.nil?
81
+ command.query['fields'] = fields unless fields.nil?
82
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
83
+ execute_or_queue_command(command, &block)
84
+ end
85
+
86
+ # Lists information about the supported locations for this service.
87
+ # @param [String] name
88
+ # The resource that owns the locations collection, if applicable.
89
+ # @param [String] filter
90
+ # A filter to narrow down results to a preferred subset. The filtering language
91
+ # accepts strings like "displayName=tokyo", and is documented in more detail in [
92
+ # AIP-160](https://google.aip.dev/160).
93
+ # @param [Fixnum] page_size
94
+ # The maximum number of results to return. If not set, the service selects a
95
+ # default.
96
+ # @param [String] page_token
97
+ # A page token received from the `next_page_token` field in the response. Send
98
+ # that page token to receive the subsequent page.
99
+ # @param [String] fields
100
+ # Selector specifying which fields to include in a partial response.
101
+ # @param [String] quota_user
102
+ # Available to use for quota purposes for server-side applications. Can be any
103
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
104
+ # @param [Google::Apis::RequestOptions] options
105
+ # Request-specific options
106
+ #
107
+ # @yield [result, err] Result & error if block supplied
108
+ # @yieldparam result [Google::Apis::IdsV1::ListLocationsResponse] parsed result object
109
+ # @yieldparam err [StandardError] error object if request failed
110
+ #
111
+ # @return [Google::Apis::IdsV1::ListLocationsResponse]
112
+ #
113
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
114
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
115
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
116
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
117
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
118
+ command.response_representation = Google::Apis::IdsV1::ListLocationsResponse::Representation
119
+ command.response_class = Google::Apis::IdsV1::ListLocationsResponse
120
+ command.params['name'] = name unless name.nil?
121
+ command.query['filter'] = filter unless filter.nil?
122
+ command.query['pageSize'] = page_size unless page_size.nil?
123
+ command.query['pageToken'] = page_token unless page_token.nil?
124
+ command.query['fields'] = fields unless fields.nil?
125
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
126
+ execute_or_queue_command(command, &block)
127
+ end
128
+
129
+ # Creates a new Endpoint in a given project and location.
130
+ # @param [String] parent
131
+ # Required. The endpoint's parent.
132
+ # @param [Google::Apis::IdsV1::Endpoint] endpoint_object
133
+ # @param [String] endpoint_id
134
+ # Required. The endpoint identifier. This will be part of the endpoint's
135
+ # resource name. This value must start with a lowercase letter followed by up to
136
+ # 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
137
+ # Values that do not match this pattern will trigger an INVALID_ARGUMENT error.
138
+ # @param [String] request_id
139
+ # An optional request ID to identify requests. Specify a unique request ID so
140
+ # that if you must retry your request, the server will know to ignore the
141
+ # request if it has already been completed. The server will guarantee that for
142
+ # at least 60 minutes since the first request. For example, consider a situation
143
+ # where you make an initial request and t he request times out. If you make the
144
+ # request again with the same request ID, the server can check if original
145
+ # operation with the same request ID was received, and if so, will ignore the
146
+ # second request. This prevents clients from accidentally creating duplicate
147
+ # commitments. The request ID must be a valid UUID with the exception that zero
148
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
149
+ # @param [String] fields
150
+ # Selector specifying which fields to include in a partial response.
151
+ # @param [String] quota_user
152
+ # Available to use for quota purposes for server-side applications. Can be any
153
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
154
+ # @param [Google::Apis::RequestOptions] options
155
+ # Request-specific options
156
+ #
157
+ # @yield [result, err] Result & error if block supplied
158
+ # @yieldparam result [Google::Apis::IdsV1::Operation] parsed result object
159
+ # @yieldparam err [StandardError] error object if request failed
160
+ #
161
+ # @return [Google::Apis::IdsV1::Operation]
162
+ #
163
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
164
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
165
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
166
+ def create_project_location_endpoint(parent, endpoint_object = nil, endpoint_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
167
+ command = make_simple_command(:post, 'v1/{+parent}/endpoints', options)
168
+ command.request_representation = Google::Apis::IdsV1::Endpoint::Representation
169
+ command.request_object = endpoint_object
170
+ command.response_representation = Google::Apis::IdsV1::Operation::Representation
171
+ command.response_class = Google::Apis::IdsV1::Operation
172
+ command.params['parent'] = parent unless parent.nil?
173
+ command.query['endpointId'] = endpoint_id unless endpoint_id.nil?
174
+ command.query['requestId'] = request_id unless request_id.nil?
175
+ command.query['fields'] = fields unless fields.nil?
176
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
177
+ execute_or_queue_command(command, &block)
178
+ end
179
+
180
+ # Deletes a single Endpoint.
181
+ # @param [String] name
182
+ # Required. The name of the endpoint to delete.
183
+ # @param [String] request_id
184
+ # An optional request ID to identify requests. Specify a unique request ID so
185
+ # that if you must retry your request, the server will know to ignore the
186
+ # request if it has already been completed. The server will guarantee that for
187
+ # at least 60 minutes after the first request. For example, consider a situation
188
+ # where you make an initial request and t he request times out. If you make the
189
+ # request again with the same request ID, the server can check if original
190
+ # operation with the same request ID was received, and if so, will ignore the
191
+ # second request. This prevents clients from accidentally creating duplicate
192
+ # commitments. The request ID must be a valid UUID with the exception that zero
193
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
194
+ # @param [String] fields
195
+ # Selector specifying which fields to include in a partial response.
196
+ # @param [String] quota_user
197
+ # Available to use for quota purposes for server-side applications. Can be any
198
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
199
+ # @param [Google::Apis::RequestOptions] options
200
+ # Request-specific options
201
+ #
202
+ # @yield [result, err] Result & error if block supplied
203
+ # @yieldparam result [Google::Apis::IdsV1::Operation] parsed result object
204
+ # @yieldparam err [StandardError] error object if request failed
205
+ #
206
+ # @return [Google::Apis::IdsV1::Operation]
207
+ #
208
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
209
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
210
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
211
+ def delete_project_location_endpoint(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
212
+ command = make_simple_command(:delete, 'v1/{+name}', options)
213
+ command.response_representation = Google::Apis::IdsV1::Operation::Representation
214
+ command.response_class = Google::Apis::IdsV1::Operation
215
+ command.params['name'] = name unless name.nil?
216
+ command.query['requestId'] = request_id unless request_id.nil?
217
+ command.query['fields'] = fields unless fields.nil?
218
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
219
+ execute_or_queue_command(command, &block)
220
+ end
221
+
222
+ # Gets details of a single Endpoint.
223
+ # @param [String] name
224
+ # Required. The name of the endpoint to retrieve. Format: projects/`project`/
225
+ # locations/`location`/endpoints/`endpoint`
226
+ # @param [String] fields
227
+ # Selector specifying which fields to include in a partial response.
228
+ # @param [String] quota_user
229
+ # Available to use for quota purposes for server-side applications. Can be any
230
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
231
+ # @param [Google::Apis::RequestOptions] options
232
+ # Request-specific options
233
+ #
234
+ # @yield [result, err] Result & error if block supplied
235
+ # @yieldparam result [Google::Apis::IdsV1::Endpoint] parsed result object
236
+ # @yieldparam err [StandardError] error object if request failed
237
+ #
238
+ # @return [Google::Apis::IdsV1::Endpoint]
239
+ #
240
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
241
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
242
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
243
+ def get_project_location_endpoint(name, fields: nil, quota_user: nil, options: nil, &block)
244
+ command = make_simple_command(:get, 'v1/{+name}', options)
245
+ command.response_representation = Google::Apis::IdsV1::Endpoint::Representation
246
+ command.response_class = Google::Apis::IdsV1::Endpoint
247
+ command.params['name'] = name unless name.nil?
248
+ command.query['fields'] = fields unless fields.nil?
249
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
250
+ execute_or_queue_command(command, &block)
251
+ end
252
+
253
+ # Gets the access control policy for a resource. Returns an empty policy if the
254
+ # resource exists and does not have a policy set.
255
+ # @param [String] resource
256
+ # REQUIRED: The resource for which the policy is being requested. See the
257
+ # operation documentation for the appropriate value for this field.
258
+ # @param [Fixnum] options_requested_policy_version
259
+ # Optional. The maximum policy version that will be used to format the policy.
260
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
261
+ # rejected. Requests for policies with any conditional role bindings must
262
+ # specify version 3. Policies with no conditional role bindings may specify any
263
+ # valid value or leave the field unset. The policy in the response might use the
264
+ # policy version that you specified, or it might use a lower policy version. For
265
+ # example, if you specify version 3, but the policy has no conditional role
266
+ # bindings, the response uses version 1. To learn which resources support
267
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
268
+ # google.com/iam/help/conditions/resource-policies).
269
+ # @param [String] fields
270
+ # Selector specifying which fields to include in a partial response.
271
+ # @param [String] quota_user
272
+ # Available to use for quota purposes for server-side applications. Can be any
273
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
274
+ # @param [Google::Apis::RequestOptions] options
275
+ # Request-specific options
276
+ #
277
+ # @yield [result, err] Result & error if block supplied
278
+ # @yieldparam result [Google::Apis::IdsV1::Policy] parsed result object
279
+ # @yieldparam err [StandardError] error object if request failed
280
+ #
281
+ # @return [Google::Apis::IdsV1::Policy]
282
+ #
283
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
284
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
285
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
286
+ def get_project_location_endpoint_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
287
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
288
+ command.response_representation = Google::Apis::IdsV1::Policy::Representation
289
+ command.response_class = Google::Apis::IdsV1::Policy
290
+ command.params['resource'] = resource unless resource.nil?
291
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
292
+ command.query['fields'] = fields unless fields.nil?
293
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
294
+ execute_or_queue_command(command, &block)
295
+ end
296
+
297
+ # Lists Endpoints in a given project and location.
298
+ # @param [String] parent
299
+ # Required. The parent, which owns this collection of endpoints.
300
+ # @param [String] filter
301
+ # Optional. The filter expression, following the syntax outlined in https://
302
+ # google.aip.dev/160.
303
+ # @param [String] order_by
304
+ # Optional. One or more fields to compare and use to sort the output. See https:/
305
+ # /google.aip.dev/132#ordering.
306
+ # @param [Fixnum] page_size
307
+ # Optional. The maximum number of endpoints to return. The service may return
308
+ # fewer than this value.
309
+ # @param [String] page_token
310
+ # Optional. A page token, received from a previous `ListEndpoints` call. Provide
311
+ # this to retrieve the subsequent page. When paginating, all other parameters
312
+ # provided to `ListEndpoints` must match the call that provided the page token.
313
+ # @param [String] fields
314
+ # Selector specifying which fields to include in a partial response.
315
+ # @param [String] quota_user
316
+ # Available to use for quota purposes for server-side applications. Can be any
317
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
318
+ # @param [Google::Apis::RequestOptions] options
319
+ # Request-specific options
320
+ #
321
+ # @yield [result, err] Result & error if block supplied
322
+ # @yieldparam result [Google::Apis::IdsV1::ListEndpointsResponse] parsed result object
323
+ # @yieldparam err [StandardError] error object if request failed
324
+ #
325
+ # @return [Google::Apis::IdsV1::ListEndpointsResponse]
326
+ #
327
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
328
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
329
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
330
+ def list_project_location_endpoints(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
331
+ command = make_simple_command(:get, 'v1/{+parent}/endpoints', options)
332
+ command.response_representation = Google::Apis::IdsV1::ListEndpointsResponse::Representation
333
+ command.response_class = Google::Apis::IdsV1::ListEndpointsResponse
334
+ command.params['parent'] = parent unless parent.nil?
335
+ command.query['filter'] = filter unless filter.nil?
336
+ command.query['orderBy'] = order_by unless order_by.nil?
337
+ command.query['pageSize'] = page_size unless page_size.nil?
338
+ command.query['pageToken'] = page_token unless page_token.nil?
339
+ command.query['fields'] = fields unless fields.nil?
340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
341
+ execute_or_queue_command(command, &block)
342
+ end
343
+
344
+ # Sets the access control policy on the specified resource. Replaces any
345
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
346
+ # PERMISSION_DENIED` errors.
347
+ # @param [String] resource
348
+ # REQUIRED: The resource for which the policy is being specified. See the
349
+ # operation documentation for the appropriate value for this field.
350
+ # @param [Google::Apis::IdsV1::SetIamPolicyRequest] set_iam_policy_request_object
351
+ # @param [String] fields
352
+ # Selector specifying which fields to include in a partial response.
353
+ # @param [String] quota_user
354
+ # Available to use for quota purposes for server-side applications. Can be any
355
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
356
+ # @param [Google::Apis::RequestOptions] options
357
+ # Request-specific options
358
+ #
359
+ # @yield [result, err] Result & error if block supplied
360
+ # @yieldparam result [Google::Apis::IdsV1::Policy] parsed result object
361
+ # @yieldparam err [StandardError] error object if request failed
362
+ #
363
+ # @return [Google::Apis::IdsV1::Policy]
364
+ #
365
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
366
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
367
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
368
+ def set_endpoint_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
369
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
370
+ command.request_representation = Google::Apis::IdsV1::SetIamPolicyRequest::Representation
371
+ command.request_object = set_iam_policy_request_object
372
+ command.response_representation = Google::Apis::IdsV1::Policy::Representation
373
+ command.response_class = Google::Apis::IdsV1::Policy
374
+ command.params['resource'] = resource unless resource.nil?
375
+ command.query['fields'] = fields unless fields.nil?
376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
377
+ execute_or_queue_command(command, &block)
378
+ end
379
+
380
+ # Returns permissions that a caller has on the specified resource. If the
381
+ # resource does not exist, this will return an empty set of permissions, not a `
382
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
383
+ # permission-aware UIs and command-line tools, not for authorization checking.
384
+ # This operation may "fail open" without warning.
385
+ # @param [String] resource
386
+ # REQUIRED: The resource for which the policy detail is being requested. See the
387
+ # operation documentation for the appropriate value for this field.
388
+ # @param [Google::Apis::IdsV1::TestIamPermissionsRequest] test_iam_permissions_request_object
389
+ # @param [String] fields
390
+ # Selector specifying which fields to include in a partial response.
391
+ # @param [String] quota_user
392
+ # Available to use for quota purposes for server-side applications. Can be any
393
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
394
+ # @param [Google::Apis::RequestOptions] options
395
+ # Request-specific options
396
+ #
397
+ # @yield [result, err] Result & error if block supplied
398
+ # @yieldparam result [Google::Apis::IdsV1::TestIamPermissionsResponse] parsed result object
399
+ # @yieldparam err [StandardError] error object if request failed
400
+ #
401
+ # @return [Google::Apis::IdsV1::TestIamPermissionsResponse]
402
+ #
403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
406
+ def test_endpoint_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
407
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
408
+ command.request_representation = Google::Apis::IdsV1::TestIamPermissionsRequest::Representation
409
+ command.request_object = test_iam_permissions_request_object
410
+ command.response_representation = Google::Apis::IdsV1::TestIamPermissionsResponse::Representation
411
+ command.response_class = Google::Apis::IdsV1::TestIamPermissionsResponse
412
+ command.params['resource'] = resource unless resource.nil?
413
+ command.query['fields'] = fields unless fields.nil?
414
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
415
+ execute_or_queue_command(command, &block)
416
+ end
417
+
418
+ # Starts asynchronous cancellation on a long-running operation. The server makes
419
+ # a best effort to cancel the operation, but success is not guaranteed. If the
420
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
421
+ # Clients can use Operations.GetOperation or other methods to check whether the
422
+ # cancellation succeeded or whether the operation completed despite cancellation.
423
+ # On successful cancellation, the operation is not deleted; instead, it becomes
424
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
425
+ # corresponding to `Code.CANCELLED`.
426
+ # @param [String] name
427
+ # The name of the operation resource to be cancelled.
428
+ # @param [Google::Apis::IdsV1::CancelOperationRequest] cancel_operation_request_object
429
+ # @param [String] fields
430
+ # Selector specifying which fields to include in a partial response.
431
+ # @param [String] quota_user
432
+ # Available to use for quota purposes for server-side applications. Can be any
433
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
434
+ # @param [Google::Apis::RequestOptions] options
435
+ # Request-specific options
436
+ #
437
+ # @yield [result, err] Result & error if block supplied
438
+ # @yieldparam result [Google::Apis::IdsV1::Empty] parsed result object
439
+ # @yieldparam err [StandardError] error object if request failed
440
+ #
441
+ # @return [Google::Apis::IdsV1::Empty]
442
+ #
443
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
444
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
445
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
446
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
447
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
448
+ command.request_representation = Google::Apis::IdsV1::CancelOperationRequest::Representation
449
+ command.request_object = cancel_operation_request_object
450
+ command.response_representation = Google::Apis::IdsV1::Empty::Representation
451
+ command.response_class = Google::Apis::IdsV1::Empty
452
+ command.params['name'] = name unless name.nil?
453
+ command.query['fields'] = fields unless fields.nil?
454
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
455
+ execute_or_queue_command(command, &block)
456
+ end
457
+
458
+ # Deletes a long-running operation. This method indicates that the client is no
459
+ # longer interested in the operation result. It does not cancel the operation.
460
+ # If the server doesn't support this method, it returns `google.rpc.Code.
461
+ # UNIMPLEMENTED`.
462
+ # @param [String] name
463
+ # The name of the operation resource to be deleted.
464
+ # @param [String] fields
465
+ # Selector specifying which fields to include in a partial response.
466
+ # @param [String] quota_user
467
+ # Available to use for quota purposes for server-side applications. Can be any
468
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
469
+ # @param [Google::Apis::RequestOptions] options
470
+ # Request-specific options
471
+ #
472
+ # @yield [result, err] Result & error if block supplied
473
+ # @yieldparam result [Google::Apis::IdsV1::Empty] parsed result object
474
+ # @yieldparam err [StandardError] error object if request failed
475
+ #
476
+ # @return [Google::Apis::IdsV1::Empty]
477
+ #
478
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
479
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
480
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
481
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
482
+ command = make_simple_command(:delete, 'v1/{+name}', options)
483
+ command.response_representation = Google::Apis::IdsV1::Empty::Representation
484
+ command.response_class = Google::Apis::IdsV1::Empty
485
+ command.params['name'] = name unless name.nil?
486
+ command.query['fields'] = fields unless fields.nil?
487
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
488
+ execute_or_queue_command(command, &block)
489
+ end
490
+
491
+ # Gets the latest state of a long-running operation. Clients can use this method
492
+ # to poll the operation result at intervals as recommended by the API service.
493
+ # @param [String] name
494
+ # The name of the operation resource.
495
+ # @param [String] fields
496
+ # Selector specifying which fields to include in a partial response.
497
+ # @param [String] quota_user
498
+ # Available to use for quota purposes for server-side applications. Can be any
499
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
500
+ # @param [Google::Apis::RequestOptions] options
501
+ # Request-specific options
502
+ #
503
+ # @yield [result, err] Result & error if block supplied
504
+ # @yieldparam result [Google::Apis::IdsV1::Operation] parsed result object
505
+ # @yieldparam err [StandardError] error object if request failed
506
+ #
507
+ # @return [Google::Apis::IdsV1::Operation]
508
+ #
509
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
510
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
511
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
512
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
513
+ command = make_simple_command(:get, 'v1/{+name}', options)
514
+ command.response_representation = Google::Apis::IdsV1::Operation::Representation
515
+ command.response_class = Google::Apis::IdsV1::Operation
516
+ command.params['name'] = name unless name.nil?
517
+ command.query['fields'] = fields unless fields.nil?
518
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
519
+ execute_or_queue_command(command, &block)
520
+ end
521
+
522
+ # Lists operations that match the specified filter in the request. If the server
523
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
524
+ # binding allows API services to override the binding to use different resource
525
+ # name schemes, such as `users/*/operations`. To override the binding, API
526
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
527
+ # service configuration. For backwards compatibility, the default name includes
528
+ # the operations collection id, however overriding users must ensure the name
529
+ # binding is the parent resource, without the operations collection id.
530
+ # @param [String] name
531
+ # The name of the operation's parent resource.
532
+ # @param [String] filter
533
+ # The standard list filter.
534
+ # @param [Fixnum] page_size
535
+ # The standard list page size.
536
+ # @param [String] page_token
537
+ # The standard list page token.
538
+ # @param [String] fields
539
+ # Selector specifying which fields to include in a partial response.
540
+ # @param [String] quota_user
541
+ # Available to use for quota purposes for server-side applications. Can be any
542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
543
+ # @param [Google::Apis::RequestOptions] options
544
+ # Request-specific options
545
+ #
546
+ # @yield [result, err] Result & error if block supplied
547
+ # @yieldparam result [Google::Apis::IdsV1::ListOperationsResponse] parsed result object
548
+ # @yieldparam err [StandardError] error object if request failed
549
+ #
550
+ # @return [Google::Apis::IdsV1::ListOperationsResponse]
551
+ #
552
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
553
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
554
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
555
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
556
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
557
+ command.response_representation = Google::Apis::IdsV1::ListOperationsResponse::Representation
558
+ command.response_class = Google::Apis::IdsV1::ListOperationsResponse
559
+ command.params['name'] = name unless name.nil?
560
+ command.query['filter'] = filter unless filter.nil?
561
+ command.query['pageSize'] = page_size unless page_size.nil?
562
+ command.query['pageToken'] = page_token unless page_token.nil?
563
+ command.query['fields'] = fields unless fields.nil?
564
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
565
+ execute_or_queue_command(command, &block)
566
+ end
567
+
568
+ protected
569
+
570
+ def apply_command_defaults(command)
571
+ command.query['key'] = key unless key.nil?
572
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
573
+ end
574
+ end
575
+ end
576
+ end
577
+ end
@@ -0,0 +1,40 @@
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/ids_v1/service.rb'
16
+ require 'google/apis/ids_v1/classes.rb'
17
+ require 'google/apis/ids_v1/representations.rb'
18
+ require 'google/apis/ids_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud IDS API
23
+ #
24
+ # Cloud IDS (Cloud Intrusion Detection System) detects malware, spyware, command-
25
+ # and-control attacks, and other network-based threats. Its security efficacy is
26
+ # industry leading, built with Palo Alto Networks technologies. When you use
27
+ # this product, your organization name and consumption levels will be shared
28
+ # with Palo Alto Networks.
29
+ #
30
+ # @see https://cloud.google.com/
31
+ module IdsV1
32
+ # Version of the Cloud IDS API this client connects to.
33
+ # This is NOT the gem version.
34
+ VERSION = 'V1'
35
+
36
+ # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
37
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,15 @@
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/ids_v1"