google-apis-securitycenter_v1beta1 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-securitycenter_v1beta1.rb +15 -0
- data/lib/google/apis/securitycenter_v1beta1.rb +37 -0
- data/lib/google/apis/securitycenter_v1beta1/classes.rb +1942 -0
- data/lib/google/apis/securitycenter_v1beta1/gem_version.rb +28 -0
- data/lib/google/apis/securitycenter_v1beta1/representations.rb +753 -0
- data/lib/google/apis/securitycenter_v1beta1/service.rb +998 -0
- metadata +76 -0
@@ -0,0 +1,998 @@
|
|
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 SecuritycenterV1beta1
|
23
|
+
# Security Command Center API
|
24
|
+
#
|
25
|
+
# Security Command Center API provides access to temporal views of assets and
|
26
|
+
# findings within an organization.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/securitycenter_v1beta1'
|
30
|
+
#
|
31
|
+
# Securitycenter = Google::Apis::SecuritycenterV1beta1 # Alias the module
|
32
|
+
# service = Securitycenter::SecurityCommandCenterService.new
|
33
|
+
#
|
34
|
+
# @see https://cloud.google.com/security-command-center
|
35
|
+
class SecurityCommandCenterService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://securitycenter.googleapis.com/', '',
|
48
|
+
client_name: 'google-apis-securitycenter_v1beta1',
|
49
|
+
client_version: Google::Apis::SecuritycenterV1beta1::GEM_VERSION)
|
50
|
+
@batch_path = 'batch'
|
51
|
+
end
|
52
|
+
|
53
|
+
# Gets the settings for an organization.
|
54
|
+
# @param [String] name
|
55
|
+
# Required. Name of the organization to get organization settings for. Its
|
56
|
+
# format is "organizations/[organization_id]/organizationSettings".
|
57
|
+
# @param [String] fields
|
58
|
+
# Selector specifying which fields to include in a partial response.
|
59
|
+
# @param [String] quota_user
|
60
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
61
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
62
|
+
# @param [Google::Apis::RequestOptions] options
|
63
|
+
# Request-specific options
|
64
|
+
#
|
65
|
+
# @yield [result, err] Result & error if block supplied
|
66
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::OrganizationSettings] parsed result object
|
67
|
+
# @yieldparam err [StandardError] error object if request failed
|
68
|
+
#
|
69
|
+
# @return [Google::Apis::SecuritycenterV1beta1::OrganizationSettings]
|
70
|
+
#
|
71
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
72
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
73
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
74
|
+
def get_organization_organization_settings(name, fields: nil, quota_user: nil, options: nil, &block)
|
75
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
76
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::OrganizationSettings::Representation
|
77
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::OrganizationSettings
|
78
|
+
command.params['name'] = name unless name.nil?
|
79
|
+
command.query['fields'] = fields unless fields.nil?
|
80
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
81
|
+
execute_or_queue_command(command, &block)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Updates an organization's settings.
|
85
|
+
# @param [String] name
|
86
|
+
# The relative resource name of the settings. See: https://cloud.google.com/apis/
|
87
|
+
# design/resource_names#relative_resource_name Example: "organizations/`
|
88
|
+
# organization_id`/organizationSettings".
|
89
|
+
# @param [Google::Apis::SecuritycenterV1beta1::OrganizationSettings] organization_settings_object
|
90
|
+
# @param [String] update_mask
|
91
|
+
# The FieldMask to use when updating the settings resource.
|
92
|
+
# @param [String] fields
|
93
|
+
# Selector specifying which fields to include in a partial response.
|
94
|
+
# @param [String] quota_user
|
95
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
96
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
97
|
+
# @param [Google::Apis::RequestOptions] options
|
98
|
+
# Request-specific options
|
99
|
+
#
|
100
|
+
# @yield [result, err] Result & error if block supplied
|
101
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::OrganizationSettings] parsed result object
|
102
|
+
# @yieldparam err [StandardError] error object if request failed
|
103
|
+
#
|
104
|
+
# @return [Google::Apis::SecuritycenterV1beta1::OrganizationSettings]
|
105
|
+
#
|
106
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
107
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
108
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
109
|
+
def update_organization_organization_settings(name, organization_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
110
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
111
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::OrganizationSettings::Representation
|
112
|
+
command.request_object = organization_settings_object
|
113
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::OrganizationSettings::Representation
|
114
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::OrganizationSettings
|
115
|
+
command.params['name'] = name unless name.nil?
|
116
|
+
command.query['updateMask'] = update_mask unless update_mask.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
|
+
# Filters an organization's assets and groups them by their specified properties.
|
123
|
+
# @param [String] parent
|
124
|
+
# Required. Name of the organization to groupBy. Its format is "organizations/[
|
125
|
+
# organization_id]".
|
126
|
+
# @param [Google::Apis::SecuritycenterV1beta1::GroupAssetsRequest] group_assets_request_object
|
127
|
+
# @param [String] fields
|
128
|
+
# Selector specifying which fields to include in a partial response.
|
129
|
+
# @param [String] quota_user
|
130
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
131
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
132
|
+
# @param [Google::Apis::RequestOptions] options
|
133
|
+
# Request-specific options
|
134
|
+
#
|
135
|
+
# @yield [result, err] Result & error if block supplied
|
136
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::GroupAssetsResponse] parsed result object
|
137
|
+
# @yieldparam err [StandardError] error object if request failed
|
138
|
+
#
|
139
|
+
# @return [Google::Apis::SecuritycenterV1beta1::GroupAssetsResponse]
|
140
|
+
#
|
141
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
142
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
143
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
144
|
+
def group_assets(parent, group_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
145
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/assets:group', options)
|
146
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::GroupAssetsRequest::Representation
|
147
|
+
command.request_object = group_assets_request_object
|
148
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::GroupAssetsResponse::Representation
|
149
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::GroupAssetsResponse
|
150
|
+
command.params['parent'] = parent unless parent.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
|
+
# Lists an organization's assets.
|
157
|
+
# @param [String] parent
|
158
|
+
# Required. Name of the organization assets should belong to. Its format is "
|
159
|
+
# organizations/[organization_id]".
|
160
|
+
# @param [String] compare_duration
|
161
|
+
# When compare_duration is set, the ListAssetResult's "state" attribute is
|
162
|
+
# updated to indicate whether the asset was added, removed, or remained present
|
163
|
+
# during the compare_duration period of time that precedes the read_time. This
|
164
|
+
# is the time between (read_time - compare_duration) and read_time. The state
|
165
|
+
# value is derived based on the presence of the asset at the two points in time.
|
166
|
+
# Intermediate state changes between the two times don't affect the result. For
|
167
|
+
# example, the results aren't affected if the asset is removed and re-created
|
168
|
+
# again. Possible "state" values when compare_duration is specified: * "ADDED":
|
169
|
+
# indicates that the asset was not present before compare_duration, but present
|
170
|
+
# at read_time. * "REMOVED": indicates that the asset was present at the start
|
171
|
+
# of compare_duration, but not present at read_time. * "ACTIVE": indicates that
|
172
|
+
# the asset was present at both the start and the end of the time period defined
|
173
|
+
# by compare_duration and read_time. If compare_duration is not specified, then
|
174
|
+
# the only possible state is "UNUSED", which indicates that the asset is present
|
175
|
+
# at read_time.
|
176
|
+
# @param [String] field_mask
|
177
|
+
# Optional. A field mask to specify the ListAssetsResult fields to be listed in
|
178
|
+
# the response. An empty field mask will list all fields.
|
179
|
+
# @param [String] filter
|
180
|
+
# Expression that defines the filter to apply across assets. The expression is a
|
181
|
+
# list of zero or more restrictions combined via logical operators `AND` and `OR`
|
182
|
+
# . Parentheses are not supported, and `OR` has higher precedence than `AND`.
|
183
|
+
# Restrictions have the form ` ` and may have a `-` character in front of them
|
184
|
+
# to indicate negation. The fields map to those defined in the Asset resource.
|
185
|
+
# Examples include: * name * security_center_properties.resource_name *
|
186
|
+
# resource_properties.a_property * security_marks.marks.marka The supported
|
187
|
+
# operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer
|
188
|
+
# values. * `:`, meaning substring matching, for strings. The supported value
|
189
|
+
# types are: * string literals in quotes. * integer literals without quotes. *
|
190
|
+
# boolean literals `true` and `false` without quotes. For example, `
|
191
|
+
# resource_properties.size = 100` is a valid filter string.
|
192
|
+
# @param [String] order_by
|
193
|
+
# Expression that defines what fields and order to use for sorting. The string
|
194
|
+
# value should follow SQL syntax: comma separated list of fields. For example: "
|
195
|
+
# name,resource_properties.a_property". The default sorting order is ascending.
|
196
|
+
# To specify descending order for a field, a suffix " desc" should be appended
|
197
|
+
# to the field name. For example: "name desc,resource_properties.a_property".
|
198
|
+
# Redundant space characters in the syntax are insignificant. "name desc,
|
199
|
+
# resource_properties.a_property" and " name desc , resource_properties.
|
200
|
+
# a_property " are equivalent.
|
201
|
+
# @param [Fixnum] page_size
|
202
|
+
# The maximum number of results to return in a single response. Default is 10,
|
203
|
+
# minimum is 1, maximum is 1000.
|
204
|
+
# @param [String] page_token
|
205
|
+
# The value returned by the last `ListAssetsResponse`; indicates that this is a
|
206
|
+
# continuation of a prior `ListAssets` call, and that the system should return
|
207
|
+
# the next page of data.
|
208
|
+
# @param [String] read_time
|
209
|
+
# Time used as a reference point when filtering assets. The filter is limited to
|
210
|
+
# assets existing at the supplied time and their values are those at that
|
211
|
+
# specific time. Absence of this field will default to the API's version of NOW.
|
212
|
+
# @param [String] fields
|
213
|
+
# Selector specifying which fields to include in a partial response.
|
214
|
+
# @param [String] quota_user
|
215
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
216
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
217
|
+
# @param [Google::Apis::RequestOptions] options
|
218
|
+
# Request-specific options
|
219
|
+
#
|
220
|
+
# @yield [result, err] Result & error if block supplied
|
221
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::ListAssetsResponse] parsed result object
|
222
|
+
# @yieldparam err [StandardError] error object if request failed
|
223
|
+
#
|
224
|
+
# @return [Google::Apis::SecuritycenterV1beta1::ListAssetsResponse]
|
225
|
+
#
|
226
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
227
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
228
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
229
|
+
def list_organization_assets(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
230
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/assets', options)
|
231
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::ListAssetsResponse::Representation
|
232
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::ListAssetsResponse
|
233
|
+
command.params['parent'] = parent unless parent.nil?
|
234
|
+
command.query['compareDuration'] = compare_duration unless compare_duration.nil?
|
235
|
+
command.query['fieldMask'] = field_mask unless field_mask.nil?
|
236
|
+
command.query['filter'] = filter unless filter.nil?
|
237
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
238
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
239
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
240
|
+
command.query['readTime'] = read_time unless read_time.nil?
|
241
|
+
command.query['fields'] = fields unless fields.nil?
|
242
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
243
|
+
execute_or_queue_command(command, &block)
|
244
|
+
end
|
245
|
+
|
246
|
+
# Runs asset discovery. The discovery is tracked with a long-running operation.
|
247
|
+
# This API can only be called with limited frequency for an organization. If it
|
248
|
+
# is called too frequently the caller will receive a TOO_MANY_REQUESTS error.
|
249
|
+
# @param [String] parent
|
250
|
+
# Required. Name of the organization to run asset discovery for. Its format is "
|
251
|
+
# organizations/[organization_id]".
|
252
|
+
# @param [Google::Apis::SecuritycenterV1beta1::RunAssetDiscoveryRequest] run_asset_discovery_request_object
|
253
|
+
# @param [String] fields
|
254
|
+
# Selector specifying which fields to include in a partial response.
|
255
|
+
# @param [String] quota_user
|
256
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
257
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
258
|
+
# @param [Google::Apis::RequestOptions] options
|
259
|
+
# Request-specific options
|
260
|
+
#
|
261
|
+
# @yield [result, err] Result & error if block supplied
|
262
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Operation] parsed result object
|
263
|
+
# @yieldparam err [StandardError] error object if request failed
|
264
|
+
#
|
265
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Operation]
|
266
|
+
#
|
267
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
268
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
269
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
270
|
+
def run_organization_asset_discovery(parent, run_asset_discovery_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
271
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/assets:runDiscovery', options)
|
272
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::RunAssetDiscoveryRequest::Representation
|
273
|
+
command.request_object = run_asset_discovery_request_object
|
274
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Operation::Representation
|
275
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Operation
|
276
|
+
command.params['parent'] = parent unless parent.nil?
|
277
|
+
command.query['fields'] = fields unless fields.nil?
|
278
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
279
|
+
execute_or_queue_command(command, &block)
|
280
|
+
end
|
281
|
+
|
282
|
+
# Updates security marks.
|
283
|
+
# @param [String] name
|
284
|
+
# The relative resource name of the SecurityMarks. See: https://cloud.google.com/
|
285
|
+
# apis/design/resource_names#relative_resource_name Examples: "organizations/`
|
286
|
+
# organization_id`/assets/`asset_id`/securityMarks" "organizations/`
|
287
|
+
# organization_id`/sources/`source_id`/findings/`finding_id`/securityMarks".
|
288
|
+
# @param [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks] google_cloud_securitycenter_v1beta1_security_marks_object
|
289
|
+
# @param [String] start_time
|
290
|
+
# The time at which the updated SecurityMarks take effect.
|
291
|
+
# @param [String] update_mask
|
292
|
+
# The FieldMask to use when updating the security marks resource.
|
293
|
+
# @param [String] fields
|
294
|
+
# Selector specifying which fields to include in a partial response.
|
295
|
+
# @param [String] quota_user
|
296
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
297
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
298
|
+
# @param [Google::Apis::RequestOptions] options
|
299
|
+
# Request-specific options
|
300
|
+
#
|
301
|
+
# @yield [result, err] Result & error if block supplied
|
302
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks] parsed result object
|
303
|
+
# @yieldparam err [StandardError] error object if request failed
|
304
|
+
#
|
305
|
+
# @return [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks]
|
306
|
+
#
|
307
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
308
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
309
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
310
|
+
def update_organization_asset_security_marks(name, google_cloud_securitycenter_v1beta1_security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
311
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
312
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks::Representation
|
313
|
+
command.request_object = google_cloud_securitycenter_v1beta1_security_marks_object
|
314
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks::Representation
|
315
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks
|
316
|
+
command.params['name'] = name unless name.nil?
|
317
|
+
command.query['startTime'] = start_time unless start_time.nil?
|
318
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
319
|
+
command.query['fields'] = fields unless fields.nil?
|
320
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
321
|
+
execute_or_queue_command(command, &block)
|
322
|
+
end
|
323
|
+
|
324
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
325
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
326
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
327
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
328
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
329
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
330
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
331
|
+
# corresponding to `Code.CANCELLED`.
|
332
|
+
# @param [String] name
|
333
|
+
# The name of the operation resource to be cancelled.
|
334
|
+
# @param [Google::Apis::SecuritycenterV1beta1::CancelOperationRequest] cancel_operation_request_object
|
335
|
+
# @param [String] fields
|
336
|
+
# Selector specifying which fields to include in a partial response.
|
337
|
+
# @param [String] quota_user
|
338
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
339
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
340
|
+
# @param [Google::Apis::RequestOptions] options
|
341
|
+
# Request-specific options
|
342
|
+
#
|
343
|
+
# @yield [result, err] Result & error if block supplied
|
344
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Empty] parsed result object
|
345
|
+
# @yieldparam err [StandardError] error object if request failed
|
346
|
+
#
|
347
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Empty]
|
348
|
+
#
|
349
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
350
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
351
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
352
|
+
def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
353
|
+
command = make_simple_command(:post, 'v1beta1/{+name}:cancel', options)
|
354
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::CancelOperationRequest::Representation
|
355
|
+
command.request_object = cancel_operation_request_object
|
356
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Empty::Representation
|
357
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Empty
|
358
|
+
command.params['name'] = name unless name.nil?
|
359
|
+
command.query['fields'] = fields unless fields.nil?
|
360
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
361
|
+
execute_or_queue_command(command, &block)
|
362
|
+
end
|
363
|
+
|
364
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
365
|
+
# longer interested in the operation result. It does not cancel the operation.
|
366
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
367
|
+
# UNIMPLEMENTED`.
|
368
|
+
# @param [String] name
|
369
|
+
# The name of the operation resource to be deleted.
|
370
|
+
# @param [String] fields
|
371
|
+
# Selector specifying which fields to include in a partial response.
|
372
|
+
# @param [String] quota_user
|
373
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
374
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
375
|
+
# @param [Google::Apis::RequestOptions] options
|
376
|
+
# Request-specific options
|
377
|
+
#
|
378
|
+
# @yield [result, err] Result & error if block supplied
|
379
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Empty] parsed result object
|
380
|
+
# @yieldparam err [StandardError] error object if request failed
|
381
|
+
#
|
382
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Empty]
|
383
|
+
#
|
384
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
385
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
386
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
387
|
+
def delete_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
388
|
+
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
|
389
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Empty::Representation
|
390
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Empty
|
391
|
+
command.params['name'] = name unless name.nil?
|
392
|
+
command.query['fields'] = fields unless fields.nil?
|
393
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
394
|
+
execute_or_queue_command(command, &block)
|
395
|
+
end
|
396
|
+
|
397
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
398
|
+
# to poll the operation result at intervals as recommended by the API service.
|
399
|
+
# @param [String] name
|
400
|
+
# The name of the operation resource.
|
401
|
+
# @param [String] fields
|
402
|
+
# Selector specifying which fields to include in a partial response.
|
403
|
+
# @param [String] quota_user
|
404
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
405
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
406
|
+
# @param [Google::Apis::RequestOptions] options
|
407
|
+
# Request-specific options
|
408
|
+
#
|
409
|
+
# @yield [result, err] Result & error if block supplied
|
410
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Operation] parsed result object
|
411
|
+
# @yieldparam err [StandardError] error object if request failed
|
412
|
+
#
|
413
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Operation]
|
414
|
+
#
|
415
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
416
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
417
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
418
|
+
def get_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
419
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
420
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Operation::Representation
|
421
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Operation
|
422
|
+
command.params['name'] = name unless name.nil?
|
423
|
+
command.query['fields'] = fields unless fields.nil?
|
424
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
425
|
+
execute_or_queue_command(command, &block)
|
426
|
+
end
|
427
|
+
|
428
|
+
# Lists operations that match the specified filter in the request. If the server
|
429
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
430
|
+
# binding allows API services to override the binding to use different resource
|
431
|
+
# name schemes, such as `users/*/operations`. To override the binding, API
|
432
|
+
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
433
|
+
# service configuration. For backwards compatibility, the default name includes
|
434
|
+
# the operations collection id, however overriding users must ensure the name
|
435
|
+
# binding is the parent resource, without the operations collection id.
|
436
|
+
# @param [String] name
|
437
|
+
# The name of the operation's parent resource.
|
438
|
+
# @param [String] filter
|
439
|
+
# The standard list filter.
|
440
|
+
# @param [Fixnum] page_size
|
441
|
+
# The standard list page size.
|
442
|
+
# @param [String] page_token
|
443
|
+
# The standard list page token.
|
444
|
+
# @param [String] fields
|
445
|
+
# Selector specifying which fields to include in a partial response.
|
446
|
+
# @param [String] quota_user
|
447
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
448
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
449
|
+
# @param [Google::Apis::RequestOptions] options
|
450
|
+
# Request-specific options
|
451
|
+
#
|
452
|
+
# @yield [result, err] Result & error if block supplied
|
453
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::ListOperationsResponse] parsed result object
|
454
|
+
# @yieldparam err [StandardError] error object if request failed
|
455
|
+
#
|
456
|
+
# @return [Google::Apis::SecuritycenterV1beta1::ListOperationsResponse]
|
457
|
+
#
|
458
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
459
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
460
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
461
|
+
def list_organization_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
462
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
463
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::ListOperationsResponse::Representation
|
464
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::ListOperationsResponse
|
465
|
+
command.params['name'] = name unless name.nil?
|
466
|
+
command.query['filter'] = filter unless filter.nil?
|
467
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
468
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
469
|
+
command.query['fields'] = fields unless fields.nil?
|
470
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
471
|
+
execute_or_queue_command(command, &block)
|
472
|
+
end
|
473
|
+
|
474
|
+
# Creates a source.
|
475
|
+
# @param [String] parent
|
476
|
+
# Required. Resource name of the new source's parent. Its format should be "
|
477
|
+
# organizations/[organization_id]".
|
478
|
+
# @param [Google::Apis::SecuritycenterV1beta1::Source] source_object
|
479
|
+
# @param [String] fields
|
480
|
+
# Selector specifying which fields to include in a partial response.
|
481
|
+
# @param [String] quota_user
|
482
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
483
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
484
|
+
# @param [Google::Apis::RequestOptions] options
|
485
|
+
# Request-specific options
|
486
|
+
#
|
487
|
+
# @yield [result, err] Result & error if block supplied
|
488
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Source] parsed result object
|
489
|
+
# @yieldparam err [StandardError] error object if request failed
|
490
|
+
#
|
491
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Source]
|
492
|
+
#
|
493
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
494
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
495
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
496
|
+
def create_organization_source(parent, source_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
497
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/sources', options)
|
498
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::Source::Representation
|
499
|
+
command.request_object = source_object
|
500
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Source::Representation
|
501
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Source
|
502
|
+
command.params['parent'] = parent unless parent.nil?
|
503
|
+
command.query['fields'] = fields unless fields.nil?
|
504
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
505
|
+
execute_or_queue_command(command, &block)
|
506
|
+
end
|
507
|
+
|
508
|
+
# Gets a source.
|
509
|
+
# @param [String] name
|
510
|
+
# Required. Relative resource name of the source. Its format is "organizations/[
|
511
|
+
# organization_id]/source/[source_id]".
|
512
|
+
# @param [String] fields
|
513
|
+
# Selector specifying which fields to include in a partial response.
|
514
|
+
# @param [String] quota_user
|
515
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
516
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
517
|
+
# @param [Google::Apis::RequestOptions] options
|
518
|
+
# Request-specific options
|
519
|
+
#
|
520
|
+
# @yield [result, err] Result & error if block supplied
|
521
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Source] parsed result object
|
522
|
+
# @yieldparam err [StandardError] error object if request failed
|
523
|
+
#
|
524
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Source]
|
525
|
+
#
|
526
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
527
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
528
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
529
|
+
def get_organization_source(name, fields: nil, quota_user: nil, options: nil, &block)
|
530
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
531
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Source::Representation
|
532
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Source
|
533
|
+
command.params['name'] = name unless name.nil?
|
534
|
+
command.query['fields'] = fields unless fields.nil?
|
535
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
536
|
+
execute_or_queue_command(command, &block)
|
537
|
+
end
|
538
|
+
|
539
|
+
# Gets the access control policy on the specified Source.
|
540
|
+
# @param [String] resource
|
541
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
542
|
+
# operation documentation for the appropriate value for this field.
|
543
|
+
# @param [Google::Apis::SecuritycenterV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
|
544
|
+
# @param [String] fields
|
545
|
+
# Selector specifying which fields to include in a partial response.
|
546
|
+
# @param [String] quota_user
|
547
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
548
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
549
|
+
# @param [Google::Apis::RequestOptions] options
|
550
|
+
# Request-specific options
|
551
|
+
#
|
552
|
+
# @yield [result, err] Result & error if block supplied
|
553
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Policy] parsed result object
|
554
|
+
# @yieldparam err [StandardError] error object if request failed
|
555
|
+
#
|
556
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Policy]
|
557
|
+
#
|
558
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
559
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
560
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
561
|
+
def get_source_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
562
|
+
command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
|
563
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::GetIamPolicyRequest::Representation
|
564
|
+
command.request_object = get_iam_policy_request_object
|
565
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Policy::Representation
|
566
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Policy
|
567
|
+
command.params['resource'] = resource unless resource.nil?
|
568
|
+
command.query['fields'] = fields unless fields.nil?
|
569
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
570
|
+
execute_or_queue_command(command, &block)
|
571
|
+
end
|
572
|
+
|
573
|
+
# Lists all sources belonging to an organization.
|
574
|
+
# @param [String] parent
|
575
|
+
# Required. Resource name of the parent of sources to list. Its format should be
|
576
|
+
# "organizations/[organization_id]".
|
577
|
+
# @param [Fixnum] page_size
|
578
|
+
# The maximum number of results to return in a single response. Default is 10,
|
579
|
+
# minimum is 1, maximum is 1000.
|
580
|
+
# @param [String] page_token
|
581
|
+
# The value returned by the last `ListSourcesResponse`; indicates that this is a
|
582
|
+
# continuation of a prior `ListSources` call, and that the system should return
|
583
|
+
# the next page of data.
|
584
|
+
# @param [String] fields
|
585
|
+
# Selector specifying which fields to include in a partial response.
|
586
|
+
# @param [String] quota_user
|
587
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
588
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
589
|
+
# @param [Google::Apis::RequestOptions] options
|
590
|
+
# Request-specific options
|
591
|
+
#
|
592
|
+
# @yield [result, err] Result & error if block supplied
|
593
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::ListSourcesResponse] parsed result object
|
594
|
+
# @yieldparam err [StandardError] error object if request failed
|
595
|
+
#
|
596
|
+
# @return [Google::Apis::SecuritycenterV1beta1::ListSourcesResponse]
|
597
|
+
#
|
598
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
599
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
600
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
601
|
+
def list_organization_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
602
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/sources', options)
|
603
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::ListSourcesResponse::Representation
|
604
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::ListSourcesResponse
|
605
|
+
command.params['parent'] = parent unless parent.nil?
|
606
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
607
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
608
|
+
command.query['fields'] = fields unless fields.nil?
|
609
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
610
|
+
execute_or_queue_command(command, &block)
|
611
|
+
end
|
612
|
+
|
613
|
+
# Updates a source.
|
614
|
+
# @param [String] name
|
615
|
+
# The relative resource name of this source. See: https://cloud.google.com/apis/
|
616
|
+
# design/resource_names#relative_resource_name Example: "organizations/`
|
617
|
+
# organization_id`/sources/`source_id`"
|
618
|
+
# @param [Google::Apis::SecuritycenterV1beta1::Source] source_object
|
619
|
+
# @param [String] update_mask
|
620
|
+
# The FieldMask to use when updating the source resource.
|
621
|
+
# @param [String] fields
|
622
|
+
# Selector specifying which fields to include in a partial response.
|
623
|
+
# @param [String] quota_user
|
624
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
625
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
626
|
+
# @param [Google::Apis::RequestOptions] options
|
627
|
+
# Request-specific options
|
628
|
+
#
|
629
|
+
# @yield [result, err] Result & error if block supplied
|
630
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Source] parsed result object
|
631
|
+
# @yieldparam err [StandardError] error object if request failed
|
632
|
+
#
|
633
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Source]
|
634
|
+
#
|
635
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
636
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
637
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
638
|
+
def patch_organization_source(name, source_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
639
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
640
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::Source::Representation
|
641
|
+
command.request_object = source_object
|
642
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Source::Representation
|
643
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Source
|
644
|
+
command.params['name'] = name unless name.nil?
|
645
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
646
|
+
command.query['fields'] = fields unless fields.nil?
|
647
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
648
|
+
execute_or_queue_command(command, &block)
|
649
|
+
end
|
650
|
+
|
651
|
+
# Sets the access control policy on the specified Source.
|
652
|
+
# @param [String] resource
|
653
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
654
|
+
# operation documentation for the appropriate value for this field.
|
655
|
+
# @param [Google::Apis::SecuritycenterV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
|
656
|
+
# @param [String] fields
|
657
|
+
# Selector specifying which fields to include in a partial response.
|
658
|
+
# @param [String] quota_user
|
659
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
660
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
661
|
+
# @param [Google::Apis::RequestOptions] options
|
662
|
+
# Request-specific options
|
663
|
+
#
|
664
|
+
# @yield [result, err] Result & error if block supplied
|
665
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::Policy] parsed result object
|
666
|
+
# @yieldparam err [StandardError] error object if request failed
|
667
|
+
#
|
668
|
+
# @return [Google::Apis::SecuritycenterV1beta1::Policy]
|
669
|
+
#
|
670
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
671
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
672
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
673
|
+
def set_source_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
674
|
+
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
|
675
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::SetIamPolicyRequest::Representation
|
676
|
+
command.request_object = set_iam_policy_request_object
|
677
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::Policy::Representation
|
678
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::Policy
|
679
|
+
command.params['resource'] = resource unless resource.nil?
|
680
|
+
command.query['fields'] = fields unless fields.nil?
|
681
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
682
|
+
execute_or_queue_command(command, &block)
|
683
|
+
end
|
684
|
+
|
685
|
+
# Returns the permissions that a caller has on the specified source.
|
686
|
+
# @param [String] resource
|
687
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
688
|
+
# operation documentation for the appropriate value for this field.
|
689
|
+
# @param [Google::Apis::SecuritycenterV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
690
|
+
# @param [String] fields
|
691
|
+
# Selector specifying which fields to include in a partial response.
|
692
|
+
# @param [String] quota_user
|
693
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
694
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
695
|
+
# @param [Google::Apis::RequestOptions] options
|
696
|
+
# Request-specific options
|
697
|
+
#
|
698
|
+
# @yield [result, err] Result & error if block supplied
|
699
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::TestIamPermissionsResponse] parsed result object
|
700
|
+
# @yieldparam err [StandardError] error object if request failed
|
701
|
+
#
|
702
|
+
# @return [Google::Apis::SecuritycenterV1beta1::TestIamPermissionsResponse]
|
703
|
+
#
|
704
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
705
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
706
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
707
|
+
def test_source_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
708
|
+
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
|
709
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::TestIamPermissionsRequest::Representation
|
710
|
+
command.request_object = test_iam_permissions_request_object
|
711
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::TestIamPermissionsResponse::Representation
|
712
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::TestIamPermissionsResponse
|
713
|
+
command.params['resource'] = resource unless resource.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
|
+
# Creates a finding. The corresponding source must exist for finding creation to
|
720
|
+
# succeed.
|
721
|
+
# @param [String] parent
|
722
|
+
# Required. Resource name of the new finding's parent. Its format should be "
|
723
|
+
# organizations/[organization_id]/sources/[source_id]".
|
724
|
+
# @param [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding] google_cloud_securitycenter_v1beta1_finding_object
|
725
|
+
# @param [String] finding_id
|
726
|
+
# Required. Unique identifier provided by the client within the parent scope. It
|
727
|
+
# must be alphanumeric and less than or equal to 32 characters and greater than
|
728
|
+
# 0 characters in length.
|
729
|
+
# @param [String] fields
|
730
|
+
# Selector specifying which fields to include in a partial response.
|
731
|
+
# @param [String] quota_user
|
732
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
733
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
734
|
+
# @param [Google::Apis::RequestOptions] options
|
735
|
+
# Request-specific options
|
736
|
+
#
|
737
|
+
# @yield [result, err] Result & error if block supplied
|
738
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding] parsed result object
|
739
|
+
# @yieldparam err [StandardError] error object if request failed
|
740
|
+
#
|
741
|
+
# @return [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding]
|
742
|
+
#
|
743
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
744
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
745
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
746
|
+
def create_organization_source_finding(parent, google_cloud_securitycenter_v1beta1_finding_object = nil, finding_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
747
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/findings', options)
|
748
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding::Representation
|
749
|
+
command.request_object = google_cloud_securitycenter_v1beta1_finding_object
|
750
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding::Representation
|
751
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding
|
752
|
+
command.params['parent'] = parent unless parent.nil?
|
753
|
+
command.query['findingId'] = finding_id unless finding_id.nil?
|
754
|
+
command.query['fields'] = fields unless fields.nil?
|
755
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
756
|
+
execute_or_queue_command(command, &block)
|
757
|
+
end
|
758
|
+
|
759
|
+
# Filters an organization or source's findings and groups them by their
|
760
|
+
# specified properties. To group across all sources provide a `-` as the source
|
761
|
+
# id. Example: /v1beta1/organizations/`organization_id`/sources/-/findings
|
762
|
+
# @param [String] parent
|
763
|
+
# Required. Name of the source to groupBy. Its format is "organizations/[
|
764
|
+
# organization_id]/sources/[source_id]". To groupBy across all sources provide a
|
765
|
+
# source_id of `-`. For example: organizations/`organization_id`/sources/-
|
766
|
+
# @param [Google::Apis::SecuritycenterV1beta1::GroupFindingsRequest] group_findings_request_object
|
767
|
+
# @param [String] fields
|
768
|
+
# Selector specifying which fields to include in a partial response.
|
769
|
+
# @param [String] quota_user
|
770
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
771
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
772
|
+
# @param [Google::Apis::RequestOptions] options
|
773
|
+
# Request-specific options
|
774
|
+
#
|
775
|
+
# @yield [result, err] Result & error if block supplied
|
776
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::GroupFindingsResponse] parsed result object
|
777
|
+
# @yieldparam err [StandardError] error object if request failed
|
778
|
+
#
|
779
|
+
# @return [Google::Apis::SecuritycenterV1beta1::GroupFindingsResponse]
|
780
|
+
#
|
781
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
782
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
783
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
784
|
+
def group_findings(parent, group_findings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
785
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/findings:group', options)
|
786
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::GroupFindingsRequest::Representation
|
787
|
+
command.request_object = group_findings_request_object
|
788
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::GroupFindingsResponse::Representation
|
789
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::GroupFindingsResponse
|
790
|
+
command.params['parent'] = parent unless parent.nil?
|
791
|
+
command.query['fields'] = fields unless fields.nil?
|
792
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
793
|
+
execute_or_queue_command(command, &block)
|
794
|
+
end
|
795
|
+
|
796
|
+
# Lists an organization or source's findings. To list across all sources provide
|
797
|
+
# a `-` as the source id. Example: /v1beta1/organizations/`organization_id`/
|
798
|
+
# sources/-/findings
|
799
|
+
# @param [String] parent
|
800
|
+
# Required. Name of the source the findings belong to. Its format is "
|
801
|
+
# organizations/[organization_id]/sources/[source_id]". To list across all
|
802
|
+
# sources provide a source_id of `-`. For example: organizations/`
|
803
|
+
# organization_id`/sources/-
|
804
|
+
# @param [String] field_mask
|
805
|
+
# Optional. A field mask to specify the Finding fields to be listed in the
|
806
|
+
# response. An empty field mask will list all fields.
|
807
|
+
# @param [String] filter
|
808
|
+
# Expression that defines the filter to apply across findings. The expression is
|
809
|
+
# a list of one or more restrictions combined via logical operators `AND` and `
|
810
|
+
# OR`. Parentheses are not supported, and `OR` has higher precedence than `AND`.
|
811
|
+
# Restrictions have the form ` ` and may have a `-` character in front of them
|
812
|
+
# to indicate negation. Examples include: * name * source_properties.a_property *
|
813
|
+
# security_marks.marks.marka The supported operators are: * `=` for all value
|
814
|
+
# types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring
|
815
|
+
# matching, for strings. The supported value types are: * string literals in
|
816
|
+
# quotes. * integer literals without quotes. * boolean literals `true` and `
|
817
|
+
# false` without quotes. For example, `source_properties.size = 100` is a valid
|
818
|
+
# filter string.
|
819
|
+
# @param [String] order_by
|
820
|
+
# Expression that defines what fields and order to use for sorting. The string
|
821
|
+
# value should follow SQL syntax: comma separated list of fields. For example: "
|
822
|
+
# name,resource_properties.a_property". The default sorting order is ascending.
|
823
|
+
# To specify descending order for a field, a suffix " desc" should be appended
|
824
|
+
# to the field name. For example: "name desc,source_properties.a_property".
|
825
|
+
# Redundant space characters in the syntax are insignificant. "name desc,
|
826
|
+
# source_properties.a_property" and " name desc , source_properties.a_property "
|
827
|
+
# are equivalent.
|
828
|
+
# @param [Fixnum] page_size
|
829
|
+
# The maximum number of results to return in a single response. Default is 10,
|
830
|
+
# minimum is 1, maximum is 1000.
|
831
|
+
# @param [String] page_token
|
832
|
+
# The value returned by the last `ListFindingsResponse`; indicates that this is
|
833
|
+
# a continuation of a prior `ListFindings` call, and that the system should
|
834
|
+
# return the next page of data.
|
835
|
+
# @param [String] read_time
|
836
|
+
# Time used as a reference point when filtering findings. The filter is limited
|
837
|
+
# to findings existing at the supplied time and their values are those at that
|
838
|
+
# specific time. Absence of this field will default to the API's version of NOW.
|
839
|
+
# @param [String] fields
|
840
|
+
# Selector specifying which fields to include in a partial response.
|
841
|
+
# @param [String] quota_user
|
842
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
843
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
844
|
+
# @param [Google::Apis::RequestOptions] options
|
845
|
+
# Request-specific options
|
846
|
+
#
|
847
|
+
# @yield [result, err] Result & error if block supplied
|
848
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::ListFindingsResponse] parsed result object
|
849
|
+
# @yieldparam err [StandardError] error object if request failed
|
850
|
+
#
|
851
|
+
# @return [Google::Apis::SecuritycenterV1beta1::ListFindingsResponse]
|
852
|
+
#
|
853
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
854
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
855
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
856
|
+
def list_organization_source_findings(parent, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
857
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/findings', options)
|
858
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::ListFindingsResponse::Representation
|
859
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::ListFindingsResponse
|
860
|
+
command.params['parent'] = parent unless parent.nil?
|
861
|
+
command.query['fieldMask'] = field_mask unless field_mask.nil?
|
862
|
+
command.query['filter'] = filter unless filter.nil?
|
863
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
864
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
865
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
866
|
+
command.query['readTime'] = read_time unless read_time.nil?
|
867
|
+
command.query['fields'] = fields unless fields.nil?
|
868
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
869
|
+
execute_or_queue_command(command, &block)
|
870
|
+
end
|
871
|
+
|
872
|
+
# Creates or updates a finding. The corresponding source must exist for a
|
873
|
+
# finding creation to succeed.
|
874
|
+
# @param [String] name
|
875
|
+
# The relative resource name of this finding. See: https://cloud.google.com/apis/
|
876
|
+
# design/resource_names#relative_resource_name Example: "organizations/`
|
877
|
+
# organization_id`/sources/`source_id`/findings/`finding_id`"
|
878
|
+
# @param [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding] google_cloud_securitycenter_v1beta1_finding_object
|
879
|
+
# @param [String] update_mask
|
880
|
+
# The FieldMask to use when updating the finding resource. This field should not
|
881
|
+
# be specified when creating a finding.
|
882
|
+
# @param [String] fields
|
883
|
+
# Selector specifying which fields to include in a partial response.
|
884
|
+
# @param [String] quota_user
|
885
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
886
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
887
|
+
# @param [Google::Apis::RequestOptions] options
|
888
|
+
# Request-specific options
|
889
|
+
#
|
890
|
+
# @yield [result, err] Result & error if block supplied
|
891
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding] parsed result object
|
892
|
+
# @yieldparam err [StandardError] error object if request failed
|
893
|
+
#
|
894
|
+
# @return [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding]
|
895
|
+
#
|
896
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
897
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
898
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
899
|
+
def patch_organization_source_finding(name, google_cloud_securitycenter_v1beta1_finding_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
900
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
901
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding::Representation
|
902
|
+
command.request_object = google_cloud_securitycenter_v1beta1_finding_object
|
903
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding::Representation
|
904
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding
|
905
|
+
command.params['name'] = name unless name.nil?
|
906
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
907
|
+
command.query['fields'] = fields unless fields.nil?
|
908
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
909
|
+
execute_or_queue_command(command, &block)
|
910
|
+
end
|
911
|
+
|
912
|
+
# Updates the state of a finding.
|
913
|
+
# @param [String] name
|
914
|
+
# Required. The relative resource name of the finding. See: https://cloud.google.
|
915
|
+
# com/apis/design/resource_names#relative_resource_name Example: "organizations/`
|
916
|
+
# organization_id`/sources/`source_id`/finding/`finding_id`".
|
917
|
+
# @param [Google::Apis::SecuritycenterV1beta1::SetFindingStateRequest] set_finding_state_request_object
|
918
|
+
# @param [String] fields
|
919
|
+
# Selector specifying which fields to include in a partial response.
|
920
|
+
# @param [String] quota_user
|
921
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
922
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
923
|
+
# @param [Google::Apis::RequestOptions] options
|
924
|
+
# Request-specific options
|
925
|
+
#
|
926
|
+
# @yield [result, err] Result & error if block supplied
|
927
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding] parsed result object
|
928
|
+
# @yieldparam err [StandardError] error object if request failed
|
929
|
+
#
|
930
|
+
# @return [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding]
|
931
|
+
#
|
932
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
933
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
934
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
935
|
+
def set_organization_source_finding_state(name, set_finding_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
936
|
+
command = make_simple_command(:post, 'v1beta1/{+name}:setState', options)
|
937
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::SetFindingStateRequest::Representation
|
938
|
+
command.request_object = set_finding_state_request_object
|
939
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding::Representation
|
940
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1Finding
|
941
|
+
command.params['name'] = name unless name.nil?
|
942
|
+
command.query['fields'] = fields unless fields.nil?
|
943
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
944
|
+
execute_or_queue_command(command, &block)
|
945
|
+
end
|
946
|
+
|
947
|
+
# Updates security marks.
|
948
|
+
# @param [String] name
|
949
|
+
# The relative resource name of the SecurityMarks. See: https://cloud.google.com/
|
950
|
+
# apis/design/resource_names#relative_resource_name Examples: "organizations/`
|
951
|
+
# organization_id`/assets/`asset_id`/securityMarks" "organizations/`
|
952
|
+
# organization_id`/sources/`source_id`/findings/`finding_id`/securityMarks".
|
953
|
+
# @param [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks] google_cloud_securitycenter_v1beta1_security_marks_object
|
954
|
+
# @param [String] start_time
|
955
|
+
# The time at which the updated SecurityMarks take effect.
|
956
|
+
# @param [String] update_mask
|
957
|
+
# The FieldMask to use when updating the security marks resource.
|
958
|
+
# @param [String] fields
|
959
|
+
# Selector specifying which fields to include in a partial response.
|
960
|
+
# @param [String] quota_user
|
961
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
962
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
963
|
+
# @param [Google::Apis::RequestOptions] options
|
964
|
+
# Request-specific options
|
965
|
+
#
|
966
|
+
# @yield [result, err] Result & error if block supplied
|
967
|
+
# @yieldparam result [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks] parsed result object
|
968
|
+
# @yieldparam err [StandardError] error object if request failed
|
969
|
+
#
|
970
|
+
# @return [Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks]
|
971
|
+
#
|
972
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
973
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
974
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
975
|
+
def update_organization_source_finding_security_marks(name, google_cloud_securitycenter_v1beta1_security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
976
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
977
|
+
command.request_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks::Representation
|
978
|
+
command.request_object = google_cloud_securitycenter_v1beta1_security_marks_object
|
979
|
+
command.response_representation = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks::Representation
|
980
|
+
command.response_class = Google::Apis::SecuritycenterV1beta1::GoogleCloudSecuritycenterV1beta1SecurityMarks
|
981
|
+
command.params['name'] = name unless name.nil?
|
982
|
+
command.query['startTime'] = start_time unless start_time.nil?
|
983
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
984
|
+
command.query['fields'] = fields unless fields.nil?
|
985
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
986
|
+
execute_or_queue_command(command, &block)
|
987
|
+
end
|
988
|
+
|
989
|
+
protected
|
990
|
+
|
991
|
+
def apply_command_defaults(command)
|
992
|
+
command.query['key'] = key unless key.nil?
|
993
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
994
|
+
end
|
995
|
+
end
|
996
|
+
end
|
997
|
+
end
|
998
|
+
end
|