google-apis-threatintelligence_v1beta 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/threatintelligence_v1beta/classes.rb +2945 -0
- data/lib/google/apis/threatintelligence_v1beta/gem_version.rb +28 -0
- data/lib/google/apis/threatintelligence_v1beta/representations.rb +1343 -0
- data/lib/google/apis/threatintelligence_v1beta/service.rb +851 -0
- data/lib/google/apis/threatintelligence_v1beta.rb +36 -0
- data/lib/google-apis-threatintelligence_v1beta.rb +15 -0
- metadata +79 -0
|
@@ -0,0 +1,851 @@
|
|
|
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 ThreatintelligenceV1beta
|
|
23
|
+
# Threat Intelligence API
|
|
24
|
+
#
|
|
25
|
+
# threatintelligence.googleapis.com API.
|
|
26
|
+
#
|
|
27
|
+
# @example
|
|
28
|
+
# require 'google/apis/threatintelligence_v1beta'
|
|
29
|
+
#
|
|
30
|
+
# Threatintelligence = Google::Apis::ThreatintelligenceV1beta # Alias the module
|
|
31
|
+
# service = Threatintelligence::ThreatIntelligenceServiceService.new
|
|
32
|
+
#
|
|
33
|
+
# @see https://www.google.com
|
|
34
|
+
class ThreatIntelligenceServiceService < Google::Apis::Core::BaseService
|
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://threatintelligence.$UNIVERSE_DOMAIN$/"
|
|
36
|
+
|
|
37
|
+
# @return [String]
|
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
40
|
+
attr_accessor :key
|
|
41
|
+
|
|
42
|
+
# @return [String]
|
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
45
|
+
attr_accessor :quota_user
|
|
46
|
+
|
|
47
|
+
def initialize
|
|
48
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, '',
|
|
49
|
+
client_name: 'google-apis-threatintelligence_v1beta',
|
|
50
|
+
client_version: Google::Apis::ThreatintelligenceV1beta::GEM_VERSION)
|
|
51
|
+
@batch_path = 'batch'
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Marks an alert as benign - BENIGN.
|
|
55
|
+
# @param [String] name
|
|
56
|
+
# Required. Name of the alert to mark as a benign. Format: projects/`project`/
|
|
57
|
+
# alerts/`alert`
|
|
58
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsBenignRequest] mark_alert_as_benign_request_object
|
|
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::ThreatintelligenceV1beta::Alert] parsed result object
|
|
69
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
70
|
+
#
|
|
71
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
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 benign_project_alert(name, mark_alert_as_benign_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
77
|
+
command = make_simple_command(:post, 'v1beta/{+name}:benign', options)
|
|
78
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsBenignRequest::Representation
|
|
79
|
+
command.request_object = mark_alert_as_benign_request_object
|
|
80
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
81
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
82
|
+
command.params['name'] = name unless name.nil?
|
|
83
|
+
command.query['fields'] = fields unless fields.nil?
|
|
84
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
85
|
+
execute_or_queue_command(command, &block)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Marks an alert as a duplicate of another alert. - DUPLICATE.
|
|
89
|
+
# @param [String] name
|
|
90
|
+
# Required. Name of the alert to mark as a duplicate. Format: projects/`project`/
|
|
91
|
+
# alerts/`alert`
|
|
92
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsDuplicateRequest] mark_alert_as_duplicate_request_object
|
|
93
|
+
# @param [String] fields
|
|
94
|
+
# Selector specifying which fields to include in a partial response.
|
|
95
|
+
# @param [String] quota_user
|
|
96
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
97
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
98
|
+
# @param [Google::Apis::RequestOptions] options
|
|
99
|
+
# Request-specific options
|
|
100
|
+
#
|
|
101
|
+
# @yield [result, err] Result & error if block supplied
|
|
102
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
103
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
104
|
+
#
|
|
105
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
106
|
+
#
|
|
107
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
108
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
109
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
110
|
+
def duplicate_project_alert(name, mark_alert_as_duplicate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
111
|
+
command = make_simple_command(:post, 'v1beta/{+name}:duplicate', options)
|
|
112
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsDuplicateRequest::Representation
|
|
113
|
+
command.request_object = mark_alert_as_duplicate_request_object
|
|
114
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
115
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
116
|
+
command.params['name'] = name unless name.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
|
+
# EnumerateAlertFacets returns the facets and the number of alerts that meet the
|
|
123
|
+
# filter criteria and have that value for each facet.
|
|
124
|
+
# @param [String] parent
|
|
125
|
+
# Required. Parent of the alerts.
|
|
126
|
+
# @param [String] filter
|
|
127
|
+
# Optional. Filter on what alerts will be enumerated.
|
|
128
|
+
# @param [String] fields
|
|
129
|
+
# Selector specifying which fields to include in a partial response.
|
|
130
|
+
# @param [String] quota_user
|
|
131
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
132
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
133
|
+
# @param [Google::Apis::RequestOptions] options
|
|
134
|
+
# Request-specific options
|
|
135
|
+
#
|
|
136
|
+
# @yield [result, err] Result & error if block supplied
|
|
137
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::EnumerateAlertFacetsResponse] parsed result object
|
|
138
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
139
|
+
#
|
|
140
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::EnumerateAlertFacetsResponse]
|
|
141
|
+
#
|
|
142
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
143
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
144
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
145
|
+
def enumerate_project_alert_facets(parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
146
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/alerts:enumerateFacets', options)
|
|
147
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::EnumerateAlertFacetsResponse::Representation
|
|
148
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::EnumerateAlertFacetsResponse
|
|
149
|
+
command.params['parent'] = parent unless parent.nil?
|
|
150
|
+
command.query['filter'] = filter unless filter.nil?
|
|
151
|
+
command.query['fields'] = fields unless fields.nil?
|
|
152
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
153
|
+
execute_or_queue_command(command, &block)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Marks an alert as escalated - ESCALATED.
|
|
157
|
+
# @param [String] name
|
|
158
|
+
# Required. Name of the alert to mark as escalated. Format: projects/`project`/
|
|
159
|
+
# alerts/`alert`
|
|
160
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsEscalatedRequest] mark_alert_as_escalated_request_object
|
|
161
|
+
# @param [String] fields
|
|
162
|
+
# Selector specifying which fields to include in a partial response.
|
|
163
|
+
# @param [String] quota_user
|
|
164
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
165
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
166
|
+
# @param [Google::Apis::RequestOptions] options
|
|
167
|
+
# Request-specific options
|
|
168
|
+
#
|
|
169
|
+
# @yield [result, err] Result & error if block supplied
|
|
170
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
171
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
172
|
+
#
|
|
173
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
174
|
+
#
|
|
175
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
176
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
177
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
178
|
+
def escalate_project_alert(name, mark_alert_as_escalated_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
179
|
+
command = make_simple_command(:post, 'v1beta/{+name}:escalate', options)
|
|
180
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsEscalatedRequest::Representation
|
|
181
|
+
command.request_object = mark_alert_as_escalated_request_object
|
|
182
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
183
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
184
|
+
command.params['name'] = name unless name.nil?
|
|
185
|
+
command.query['fields'] = fields unless fields.nil?
|
|
186
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
187
|
+
execute_or_queue_command(command, &block)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Marks an alert as a false positive - FALSE_POSITIVE.
|
|
191
|
+
# @param [String] name
|
|
192
|
+
# Required. Name of the alert to mark as a false positive. Format: projects/`
|
|
193
|
+
# project`/alerts/`alert`
|
|
194
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsFalsePositiveRequest] mark_alert_as_false_positive_request_object
|
|
195
|
+
# @param [String] fields
|
|
196
|
+
# Selector specifying which fields to include in a partial response.
|
|
197
|
+
# @param [String] quota_user
|
|
198
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
199
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
200
|
+
# @param [Google::Apis::RequestOptions] options
|
|
201
|
+
# Request-specific options
|
|
202
|
+
#
|
|
203
|
+
# @yield [result, err] Result & error if block supplied
|
|
204
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
205
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
206
|
+
#
|
|
207
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
208
|
+
#
|
|
209
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
210
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
211
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
212
|
+
def false_project_alert_positive(name, mark_alert_as_false_positive_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
213
|
+
command = make_simple_command(:post, 'v1beta/{+name}:falsePositive', options)
|
|
214
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsFalsePositiveRequest::Representation
|
|
215
|
+
command.request_object = mark_alert_as_false_positive_request_object
|
|
216
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
217
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
218
|
+
command.params['name'] = name unless name.nil?
|
|
219
|
+
command.query['fields'] = fields unless fields.nil?
|
|
220
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
221
|
+
execute_or_queue_command(command, &block)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Get an alert by name.
|
|
225
|
+
# @param [String] name
|
|
226
|
+
# Required. Name of the alert to get. Format: projects/`project`/alerts/`alert`
|
|
227
|
+
# @param [String] fields
|
|
228
|
+
# Selector specifying which fields to include in a partial response.
|
|
229
|
+
# @param [String] quota_user
|
|
230
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
231
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
232
|
+
# @param [Google::Apis::RequestOptions] options
|
|
233
|
+
# Request-specific options
|
|
234
|
+
#
|
|
235
|
+
# @yield [result, err] Result & error if block supplied
|
|
236
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
237
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
238
|
+
#
|
|
239
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
240
|
+
#
|
|
241
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
242
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
243
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
244
|
+
def get_project_alert(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
245
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
|
246
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
247
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
248
|
+
command.params['name'] = name unless name.nil?
|
|
249
|
+
command.query['fields'] = fields unless fields.nil?
|
|
250
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
251
|
+
execute_or_queue_command(command, &block)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Get a list of alerts that meet the filter criteria.
|
|
255
|
+
# @param [String] parent
|
|
256
|
+
# Required. Parent of the alerts. Format: projects/`project`
|
|
257
|
+
# @param [String] filter
|
|
258
|
+
# Optional. Filter criteria.
|
|
259
|
+
# @param [String] order_by
|
|
260
|
+
# Optional. Order by criteria in the csv format: "field1,field2 desc" or "field1,
|
|
261
|
+
# field2" or "field1 asc, field2".
|
|
262
|
+
# @param [Fixnum] page_size
|
|
263
|
+
# Optional. Page size.
|
|
264
|
+
# @param [String] page_token
|
|
265
|
+
# Optional. Page token.
|
|
266
|
+
# @param [String] fields
|
|
267
|
+
# Selector specifying which fields to include in a partial response.
|
|
268
|
+
# @param [String] quota_user
|
|
269
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
270
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
271
|
+
# @param [Google::Apis::RequestOptions] options
|
|
272
|
+
# Request-specific options
|
|
273
|
+
#
|
|
274
|
+
# @yield [result, err] Result & error if block supplied
|
|
275
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::ListAlertsResponse] parsed result object
|
|
276
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
277
|
+
#
|
|
278
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::ListAlertsResponse]
|
|
279
|
+
#
|
|
280
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
281
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
282
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
283
|
+
def list_project_alerts(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
284
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/alerts', options)
|
|
285
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::ListAlertsResponse::Representation
|
|
286
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::ListAlertsResponse
|
|
287
|
+
command.params['parent'] = parent unless parent.nil?
|
|
288
|
+
command.query['filter'] = filter unless filter.nil?
|
|
289
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
290
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
291
|
+
command.query['pageToken'] = page_token unless page_token.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
|
+
# Marks an alert as not actionable - NOT_ACTIONABLE.
|
|
298
|
+
# @param [String] name
|
|
299
|
+
# Required. Name of the alert to mark as a not actionable. Format: projects/`
|
|
300
|
+
# project`/alerts/`alert`
|
|
301
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsNotActionableRequest] mark_alert_as_not_actionable_request_object
|
|
302
|
+
# @param [String] fields
|
|
303
|
+
# Selector specifying which fields to include in a partial response.
|
|
304
|
+
# @param [String] quota_user
|
|
305
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
306
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
307
|
+
# @param [Google::Apis::RequestOptions] options
|
|
308
|
+
# Request-specific options
|
|
309
|
+
#
|
|
310
|
+
# @yield [result, err] Result & error if block supplied
|
|
311
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
312
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
313
|
+
#
|
|
314
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
315
|
+
#
|
|
316
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
317
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
318
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
319
|
+
def not_project_alert_actionable(name, mark_alert_as_not_actionable_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
320
|
+
command = make_simple_command(:post, 'v1beta/{+name}:notActionable', options)
|
|
321
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsNotActionableRequest::Representation
|
|
322
|
+
command.request_object = mark_alert_as_not_actionable_request_object
|
|
323
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
324
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
325
|
+
command.params['name'] = name unless name.nil?
|
|
326
|
+
command.query['fields'] = fields unless fields.nil?
|
|
327
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
328
|
+
execute_or_queue_command(command, &block)
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Marks an alert as read - READ.
|
|
332
|
+
# @param [String] name
|
|
333
|
+
# Required. Name of the alert to mark as read. Format: projects/`project`/alerts/
|
|
334
|
+
# `alert`
|
|
335
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsReadRequest] mark_alert_as_read_request_object
|
|
336
|
+
# @param [String] fields
|
|
337
|
+
# Selector specifying which fields to include in a partial response.
|
|
338
|
+
# @param [String] quota_user
|
|
339
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
340
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
341
|
+
# @param [Google::Apis::RequestOptions] options
|
|
342
|
+
# Request-specific options
|
|
343
|
+
#
|
|
344
|
+
# @yield [result, err] Result & error if block supplied
|
|
345
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
346
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
347
|
+
#
|
|
348
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
349
|
+
#
|
|
350
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
351
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
352
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
353
|
+
def read_project_alert(name, mark_alert_as_read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
354
|
+
command = make_simple_command(:post, 'v1beta/{+name}:read', options)
|
|
355
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsReadRequest::Representation
|
|
356
|
+
command.request_object = mark_alert_as_read_request_object
|
|
357
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
358
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
359
|
+
command.params['name'] = name unless name.nil?
|
|
360
|
+
command.query['fields'] = fields unless fields.nil?
|
|
361
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
362
|
+
execute_or_queue_command(command, &block)
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Return the status of a URI submitted to Google WebRisk.
|
|
366
|
+
# @param [String] name
|
|
367
|
+
# Required. Name of alert to refresh status from WebRisk
|
|
368
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::RefreshAlertUriStatusRequest] refresh_alert_uri_status_request_object
|
|
369
|
+
# @param [String] fields
|
|
370
|
+
# Selector specifying which fields to include in a partial response.
|
|
371
|
+
# @param [String] quota_user
|
|
372
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
373
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
374
|
+
# @param [Google::Apis::RequestOptions] options
|
|
375
|
+
# Request-specific options
|
|
376
|
+
#
|
|
377
|
+
# @yield [result, err] Result & error if block supplied
|
|
378
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::RefreshAlertUriStatusResponse] parsed result object
|
|
379
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
380
|
+
#
|
|
381
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::RefreshAlertUriStatusResponse]
|
|
382
|
+
#
|
|
383
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
384
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
385
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
386
|
+
def refresh_project_alert_uri_status(name, refresh_alert_uri_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
387
|
+
command = make_simple_command(:post, 'v1beta/{+name}:refreshUriStatus', options)
|
|
388
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::RefreshAlertUriStatusRequest::Representation
|
|
389
|
+
command.request_object = refresh_alert_uri_status_request_object
|
|
390
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::RefreshAlertUriStatusResponse::Representation
|
|
391
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::RefreshAlertUriStatusResponse
|
|
392
|
+
command.params['name'] = name unless name.nil?
|
|
393
|
+
command.query['fields'] = fields unless fields.nil?
|
|
394
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
395
|
+
execute_or_queue_command(command, &block)
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# Report the URI associated with an alert to Google WebRisk.
|
|
399
|
+
# @param [String] name
|
|
400
|
+
# Required. Name of alert to submit to WebRisk.
|
|
401
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::ReportAlertUriRequest] report_alert_uri_request_object
|
|
402
|
+
# @param [String] fields
|
|
403
|
+
# Selector specifying which fields to include in a partial response.
|
|
404
|
+
# @param [String] quota_user
|
|
405
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
406
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
407
|
+
# @param [Google::Apis::RequestOptions] options
|
|
408
|
+
# Request-specific options
|
|
409
|
+
#
|
|
410
|
+
# @yield [result, err] Result & error if block supplied
|
|
411
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::ReportAlertUriResponse] parsed result object
|
|
412
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
413
|
+
#
|
|
414
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::ReportAlertUriResponse]
|
|
415
|
+
#
|
|
416
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
417
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
418
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
419
|
+
def report_alert_uri(name, report_alert_uri_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
420
|
+
command = make_simple_command(:post, 'v1beta/{+name}:reportAlertUri', options)
|
|
421
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::ReportAlertUriRequest::Representation
|
|
422
|
+
command.request_object = report_alert_uri_request_object
|
|
423
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::ReportAlertUriResponse::Representation
|
|
424
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::ReportAlertUriResponse
|
|
425
|
+
command.params['name'] = name unless name.nil?
|
|
426
|
+
command.query['fields'] = fields unless fields.nil?
|
|
427
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
428
|
+
execute_or_queue_command(command, &block)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# Marks an alert to closed state - RESOLVED.
|
|
432
|
+
# @param [String] name
|
|
433
|
+
# Required. Name of the alert to mark as resolved. Format: projects/`project`/
|
|
434
|
+
# alerts/`alert`
|
|
435
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsResolvedRequest] mark_alert_as_resolved_request_object
|
|
436
|
+
# @param [String] fields
|
|
437
|
+
# Selector specifying which fields to include in a partial response.
|
|
438
|
+
# @param [String] quota_user
|
|
439
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
440
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
441
|
+
# @param [Google::Apis::RequestOptions] options
|
|
442
|
+
# Request-specific options
|
|
443
|
+
#
|
|
444
|
+
# @yield [result, err] Result & error if block supplied
|
|
445
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
446
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
447
|
+
#
|
|
448
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
449
|
+
#
|
|
450
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
451
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
452
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
453
|
+
def resolve_project_alert(name, mark_alert_as_resolved_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
454
|
+
command = make_simple_command(:post, 'v1beta/{+name}:resolve', options)
|
|
455
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsResolvedRequest::Representation
|
|
456
|
+
command.request_object = mark_alert_as_resolved_request_object
|
|
457
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
458
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
459
|
+
command.params['name'] = name unless name.nil?
|
|
460
|
+
command.query['fields'] = fields unless fields.nil?
|
|
461
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
462
|
+
execute_or_queue_command(command, &block)
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
# Marks an alert as tracked externally - TRACKED_EXTERNALLY.
|
|
466
|
+
# @param [String] name
|
|
467
|
+
# Required. Name of the alert to mark as tracked externally. Format: projects/`
|
|
468
|
+
# project`/alerts/`alert`
|
|
469
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsTrackedExternallyRequest] mark_alert_as_tracked_externally_request_object
|
|
470
|
+
# @param [String] fields
|
|
471
|
+
# Selector specifying which fields to include in a partial response.
|
|
472
|
+
# @param [String] quota_user
|
|
473
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
474
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
475
|
+
# @param [Google::Apis::RequestOptions] options
|
|
476
|
+
# Request-specific options
|
|
477
|
+
#
|
|
478
|
+
# @yield [result, err] Result & error if block supplied
|
|
479
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
480
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
481
|
+
#
|
|
482
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
483
|
+
#
|
|
484
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
485
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
486
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
487
|
+
def track_project_alert_externally(name, mark_alert_as_tracked_externally_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
488
|
+
command = make_simple_command(:post, 'v1beta/{+name}:trackExternally', options)
|
|
489
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsTrackedExternallyRequest::Representation
|
|
490
|
+
command.request_object = mark_alert_as_tracked_externally_request_object
|
|
491
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
492
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
493
|
+
command.params['name'] = name unless name.nil?
|
|
494
|
+
command.query['fields'] = fields unless fields.nil?
|
|
495
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
496
|
+
execute_or_queue_command(command, &block)
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# Marks an alert as triaged - TRIAGED.
|
|
500
|
+
# @param [String] name
|
|
501
|
+
# Required. Name of the alert to mark as a triaged. Format: projects/`project`/
|
|
502
|
+
# alerts/`alert`
|
|
503
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::MarkAlertAsTriagedRequest] mark_alert_as_triaged_request_object
|
|
504
|
+
# @param [String] fields
|
|
505
|
+
# Selector specifying which fields to include in a partial response.
|
|
506
|
+
# @param [String] quota_user
|
|
507
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
508
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
509
|
+
# @param [Google::Apis::RequestOptions] options
|
|
510
|
+
# Request-specific options
|
|
511
|
+
#
|
|
512
|
+
# @yield [result, err] Result & error if block supplied
|
|
513
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Alert] parsed result object
|
|
514
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
515
|
+
#
|
|
516
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Alert]
|
|
517
|
+
#
|
|
518
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
519
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
520
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
521
|
+
def triage_project_alert(name, mark_alert_as_triaged_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
522
|
+
command = make_simple_command(:post, 'v1beta/{+name}:triage', options)
|
|
523
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::MarkAlertAsTriagedRequest::Representation
|
|
524
|
+
command.request_object = mark_alert_as_triaged_request_object
|
|
525
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Alert::Representation
|
|
526
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Alert
|
|
527
|
+
command.params['name'] = name unless name.nil?
|
|
528
|
+
command.query['fields'] = fields unless fields.nil?
|
|
529
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
530
|
+
execute_or_queue_command(command, &block)
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
# Gets a specific document associated with an alert.
|
|
534
|
+
# @param [String] name
|
|
535
|
+
# Required. Name of the alert document to get. Format: projects/`project`/alerts/
|
|
536
|
+
# `alert`/documents/`document`
|
|
537
|
+
# @param [String] fields
|
|
538
|
+
# Selector specifying which fields to include in a partial response.
|
|
539
|
+
# @param [String] quota_user
|
|
540
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
541
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
542
|
+
# @param [Google::Apis::RequestOptions] options
|
|
543
|
+
# Request-specific options
|
|
544
|
+
#
|
|
545
|
+
# @yield [result, err] Result & error if block supplied
|
|
546
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::AlertDocument] parsed result object
|
|
547
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
548
|
+
#
|
|
549
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::AlertDocument]
|
|
550
|
+
#
|
|
551
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
552
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
553
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
554
|
+
def get_project_alert_document(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
555
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
|
556
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::AlertDocument::Representation
|
|
557
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::AlertDocument
|
|
558
|
+
command.params['name'] = name unless name.nil?
|
|
559
|
+
command.query['fields'] = fields unless fields.nil?
|
|
560
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
561
|
+
execute_or_queue_command(command, &block)
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
# Get a configuration by name.
|
|
565
|
+
# @param [String] name
|
|
566
|
+
# Required. Name of the configuration to get. Format: vaults/`vault`/
|
|
567
|
+
# configurations/`configuration`
|
|
568
|
+
# @param [String] fields
|
|
569
|
+
# Selector specifying which fields to include in a partial response.
|
|
570
|
+
# @param [String] quota_user
|
|
571
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
572
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
573
|
+
# @param [Google::Apis::RequestOptions] options
|
|
574
|
+
# Request-specific options
|
|
575
|
+
#
|
|
576
|
+
# @yield [result, err] Result & error if block supplied
|
|
577
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Configuration] parsed result object
|
|
578
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
579
|
+
#
|
|
580
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Configuration]
|
|
581
|
+
#
|
|
582
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
583
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
584
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
585
|
+
def get_project_configuration(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
586
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
|
587
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Configuration::Representation
|
|
588
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Configuration
|
|
589
|
+
command.params['name'] = name unless name.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
|
+
# Get a list of configurations that meet the filter criteria.
|
|
596
|
+
# @param [String] parent
|
|
597
|
+
# Required. Parent of the configuration. Format: vaults/`vault`
|
|
598
|
+
# @param [String] filter
|
|
599
|
+
# Optional. Filter criteria.
|
|
600
|
+
# @param [String] order_by
|
|
601
|
+
# Optional. Order by criteria in the csv format: "field1,field2 desc" or "field1,
|
|
602
|
+
# field2" or "field1 asc, field2".
|
|
603
|
+
# @param [Fixnum] page_size
|
|
604
|
+
# Optional. Page size.
|
|
605
|
+
# @param [String] page_token
|
|
606
|
+
# Optional. 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::ThreatintelligenceV1beta::ListConfigurationsResponse] parsed result object
|
|
617
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
618
|
+
#
|
|
619
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::ListConfigurationsResponse]
|
|
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_configurations(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
625
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/configurations', options)
|
|
626
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::ListConfigurationsResponse::Representation
|
|
627
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::ListConfigurationsResponse
|
|
628
|
+
command.params['parent'] = parent unless parent.nil?
|
|
629
|
+
command.query['filter'] = filter unless filter.nil?
|
|
630
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
631
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
632
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
633
|
+
command.query['fields'] = fields unless fields.nil?
|
|
634
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
635
|
+
execute_or_queue_command(command, &block)
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
# Creates or updates a configuration.
|
|
639
|
+
# @param [String] parent
|
|
640
|
+
# Required. Parent of the configuration.
|
|
641
|
+
# @param [Google::Apis::ThreatintelligenceV1beta::Configuration] configuration_object
|
|
642
|
+
# @param [String] publish_time
|
|
643
|
+
# Optional. Time that the configuration should be considered to have been
|
|
644
|
+
# published. This is an advanced feature used when onboarding and bulk loading
|
|
645
|
+
# data from other systems. Do not set this field without consulting with the API
|
|
646
|
+
# team.
|
|
647
|
+
# @param [String] fields
|
|
648
|
+
# Selector specifying which fields to include in a partial response.
|
|
649
|
+
# @param [String] quota_user
|
|
650
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
651
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
652
|
+
# @param [Google::Apis::RequestOptions] options
|
|
653
|
+
# Request-specific options
|
|
654
|
+
#
|
|
655
|
+
# @yield [result, err] Result & error if block supplied
|
|
656
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::UpsertConfigurationResponse] parsed result object
|
|
657
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
658
|
+
#
|
|
659
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::UpsertConfigurationResponse]
|
|
660
|
+
#
|
|
661
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
662
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
663
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
664
|
+
def upsert_project_configuration(parent, configuration_object = nil, publish_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
665
|
+
command = make_simple_command(:post, 'v1beta/{+parent}/configurations:upsert', options)
|
|
666
|
+
command.request_representation = Google::Apis::ThreatintelligenceV1beta::Configuration::Representation
|
|
667
|
+
command.request_object = configuration_object
|
|
668
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::UpsertConfigurationResponse::Representation
|
|
669
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::UpsertConfigurationResponse
|
|
670
|
+
command.params['parent'] = parent unless parent.nil?
|
|
671
|
+
command.query['publishTime'] = publish_time unless publish_time.nil?
|
|
672
|
+
command.query['fields'] = fields unless fields.nil?
|
|
673
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
674
|
+
execute_or_queue_command(command, &block)
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
# List configuration revisions that meet the filter criteria.
|
|
678
|
+
# @param [String] parent
|
|
679
|
+
# Required. The name of the Configuration to retrieve Revisions for
|
|
680
|
+
# @param [String] filter
|
|
681
|
+
# Optional. An AIP-160 filter string
|
|
682
|
+
# @param [String] order_by
|
|
683
|
+
# Optional. Specify ordering of response
|
|
684
|
+
# @param [Fixnum] page_size
|
|
685
|
+
# Optional. Page Size
|
|
686
|
+
# @param [String] page_token
|
|
687
|
+
# Optional. A page token provided by the API
|
|
688
|
+
# @param [String] fields
|
|
689
|
+
# Selector specifying which fields to include in a partial response.
|
|
690
|
+
# @param [String] quota_user
|
|
691
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
692
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
693
|
+
# @param [Google::Apis::RequestOptions] options
|
|
694
|
+
# Request-specific options
|
|
695
|
+
#
|
|
696
|
+
# @yield [result, err] Result & error if block supplied
|
|
697
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::ListConfigurationRevisionsResponse] parsed result object
|
|
698
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
699
|
+
#
|
|
700
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::ListConfigurationRevisionsResponse]
|
|
701
|
+
#
|
|
702
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
703
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
704
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
705
|
+
def list_project_configuration_revisions(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
706
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/revisions', options)
|
|
707
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::ListConfigurationRevisionsResponse::Representation
|
|
708
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::ListConfigurationRevisionsResponse
|
|
709
|
+
command.params['parent'] = parent unless parent.nil?
|
|
710
|
+
command.query['filter'] = filter unless filter.nil?
|
|
711
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
712
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
713
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
714
|
+
command.query['fields'] = fields unless fields.nil?
|
|
715
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
716
|
+
execute_or_queue_command(command, &block)
|
|
717
|
+
end
|
|
718
|
+
|
|
719
|
+
# Get a finding by name.
|
|
720
|
+
# @param [String] name
|
|
721
|
+
# Required. Name of the finding to get.
|
|
722
|
+
# @param [String] fields
|
|
723
|
+
# Selector specifying which fields to include in a partial response.
|
|
724
|
+
# @param [String] quota_user
|
|
725
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
726
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
727
|
+
# @param [Google::Apis::RequestOptions] options
|
|
728
|
+
# Request-specific options
|
|
729
|
+
#
|
|
730
|
+
# @yield [result, err] Result & error if block supplied
|
|
731
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::Finding] parsed result object
|
|
732
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
733
|
+
#
|
|
734
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::Finding]
|
|
735
|
+
#
|
|
736
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
737
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
738
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
739
|
+
def get_project_finding(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
740
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
|
741
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::Finding::Representation
|
|
742
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::Finding
|
|
743
|
+
command.params['name'] = name unless name.nil?
|
|
744
|
+
command.query['fields'] = fields unless fields.nil?
|
|
745
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
746
|
+
execute_or_queue_command(command, &block)
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
# Get a list of findings that meet the filter criteria.
|
|
750
|
+
# @param [String] parent
|
|
751
|
+
# Required. Parent of the findings.
|
|
752
|
+
# @param [String] filter
|
|
753
|
+
# Optional. Filter criteria.
|
|
754
|
+
# @param [String] order_by
|
|
755
|
+
# Optional. Order by criteria in the csv format: "field1,field2 desc" or "field1,
|
|
756
|
+
# field2" or "field1 asc, field2".
|
|
757
|
+
# @param [Fixnum] page_size
|
|
758
|
+
# Optional. Page size.
|
|
759
|
+
# @param [String] page_token
|
|
760
|
+
# Optional. Page token.
|
|
761
|
+
# @param [String] fields
|
|
762
|
+
# Selector specifying which fields to include in a partial response.
|
|
763
|
+
# @param [String] quota_user
|
|
764
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
765
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
766
|
+
# @param [Google::Apis::RequestOptions] options
|
|
767
|
+
# Request-specific options
|
|
768
|
+
#
|
|
769
|
+
# @yield [result, err] Result & error if block supplied
|
|
770
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::ListFindingsResponse] parsed result object
|
|
771
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
772
|
+
#
|
|
773
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::ListFindingsResponse]
|
|
774
|
+
#
|
|
775
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
776
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
777
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
778
|
+
def list_project_findings(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
779
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/findings', options)
|
|
780
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::ListFindingsResponse::Representation
|
|
781
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::ListFindingsResponse
|
|
782
|
+
command.params['parent'] = parent unless parent.nil?
|
|
783
|
+
command.query['filter'] = filter unless filter.nil?
|
|
784
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
785
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
786
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
787
|
+
command.query['fields'] = fields unless fields.nil?
|
|
788
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
789
|
+
execute_or_queue_command(command, &block)
|
|
790
|
+
end
|
|
791
|
+
|
|
792
|
+
# SearchFindings is a more powerful version of ListFindings that supports
|
|
793
|
+
# complex queries like "findings for issues" using functions such as `has_issue`
|
|
794
|
+
# and `has_asset` in the query string. Example to search for findings for a
|
|
795
|
+
# specific issue: `has_issue("name=\"vaults/vault-12345/issues/issue-12345\"")`)
|
|
796
|
+
# @param [String] parent
|
|
797
|
+
# Required. Parent of the findings. Format: vaults/`vault`
|
|
798
|
+
# @param [String] order_by
|
|
799
|
+
# Optional. Order by criteria in the csv format: "field1,field2 desc" or "field1,
|
|
800
|
+
# field2" or "field1 asc, field2".
|
|
801
|
+
# @param [Fixnum] page_size
|
|
802
|
+
# Optional. Page size.
|
|
803
|
+
# @param [String] page_token
|
|
804
|
+
# Optional. Page token.
|
|
805
|
+
# @param [String] query
|
|
806
|
+
# Optional. Query on what findings will be returned. This supports the same
|
|
807
|
+
# filter criteria as FindingService.ListFindings as well as the following
|
|
808
|
+
# relationship queries `has_issue` and `has_asset`. Examples: - has_issue("name=\
|
|
809
|
+
# "vaults/vault-12345/issues/issue-12345\"") - has_asset("name=\"vaults/vault-
|
|
810
|
+
# 12345/assets/asset-12345\"")
|
|
811
|
+
# @param [String] fields
|
|
812
|
+
# Selector specifying which fields to include in a partial response.
|
|
813
|
+
# @param [String] quota_user
|
|
814
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
815
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
816
|
+
# @param [Google::Apis::RequestOptions] options
|
|
817
|
+
# Request-specific options
|
|
818
|
+
#
|
|
819
|
+
# @yield [result, err] Result & error if block supplied
|
|
820
|
+
# @yieldparam result [Google::Apis::ThreatintelligenceV1beta::SearchFindingsResponse] parsed result object
|
|
821
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
822
|
+
#
|
|
823
|
+
# @return [Google::Apis::ThreatintelligenceV1beta::SearchFindingsResponse]
|
|
824
|
+
#
|
|
825
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
826
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
827
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
828
|
+
def search_project_findings(parent, order_by: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
829
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/findings:search', options)
|
|
830
|
+
command.response_representation = Google::Apis::ThreatintelligenceV1beta::SearchFindingsResponse::Representation
|
|
831
|
+
command.response_class = Google::Apis::ThreatintelligenceV1beta::SearchFindingsResponse
|
|
832
|
+
command.params['parent'] = parent unless parent.nil?
|
|
833
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
834
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
835
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
836
|
+
command.query['query'] = query unless query.nil?
|
|
837
|
+
command.query['fields'] = fields unless fields.nil?
|
|
838
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
839
|
+
execute_or_queue_command(command, &block)
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
protected
|
|
843
|
+
|
|
844
|
+
def apply_command_defaults(command)
|
|
845
|
+
command.query['key'] = key unless key.nil?
|
|
846
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
847
|
+
end
|
|
848
|
+
end
|
|
849
|
+
end
|
|
850
|
+
end
|
|
851
|
+
end
|