google-apis-containeranalysis_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/containeranalysis_v1/classes.rb +3734 -0
- data/lib/google/apis/containeranalysis_v1/gem_version.rb +28 -0
- data/lib/google/apis/containeranalysis_v1/representations.rb +1558 -0
- data/lib/google/apis/containeranalysis_v1/service.rb +970 -0
- data/lib/google/apis/containeranalysis_v1.rb +37 -0
- data/lib/google-apis-containeranalysis_v1.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,970 @@
|
|
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 ContaineranalysisV1
|
23
|
+
# Container Analysis API
|
24
|
+
#
|
25
|
+
# An implementation of the Grafeas API, which stores, and enables querying and
|
26
|
+
# retrieval of critical metadata about all of your software artifacts.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/containeranalysis_v1'
|
30
|
+
#
|
31
|
+
# Containeranalysis = Google::Apis::ContaineranalysisV1 # Alias the module
|
32
|
+
# service = Containeranalysis::ContainerAnalysisService.new
|
33
|
+
#
|
34
|
+
# @see https://cloud.google.com/container-analysis/api/reference/rest/
|
35
|
+
class ContainerAnalysisService < 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://containeranalysis.googleapis.com/', '',
|
48
|
+
client_name: 'google-apis-containeranalysis_v1',
|
49
|
+
client_version: Google::Apis::ContaineranalysisV1::GEM_VERSION)
|
50
|
+
@batch_path = 'batch'
|
51
|
+
end
|
52
|
+
|
53
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
54
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
55
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
56
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
57
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
58
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
59
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
60
|
+
# corresponding to `Code.CANCELLED`.
|
61
|
+
# @param [String] name
|
62
|
+
# The name of the operation resource to be cancelled.
|
63
|
+
# @param [Google::Apis::ContaineranalysisV1::CancelOperationRequest] cancel_operation_request_object
|
64
|
+
# @param [String] fields
|
65
|
+
# Selector specifying which fields to include in a partial response.
|
66
|
+
# @param [String] quota_user
|
67
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
68
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
69
|
+
# @param [Google::Apis::RequestOptions] options
|
70
|
+
# Request-specific options
|
71
|
+
#
|
72
|
+
# @yield [result, err] Result & error if block supplied
|
73
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Empty] parsed result object
|
74
|
+
# @yieldparam err [StandardError] error object if request failed
|
75
|
+
#
|
76
|
+
# @return [Google::Apis::ContaineranalysisV1::Empty]
|
77
|
+
#
|
78
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
79
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
80
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
81
|
+
def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
82
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
83
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::CancelOperationRequest::Representation
|
84
|
+
command.request_object = cancel_operation_request_object
|
85
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Empty::Representation
|
86
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Empty
|
87
|
+
command.params['name'] = name unless name.nil?
|
88
|
+
command.query['fields'] = fields unless fields.nil?
|
89
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
90
|
+
execute_or_queue_command(command, &block)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
94
|
+
# longer interested in the operation result. It does not cancel the operation.
|
95
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
96
|
+
# UNIMPLEMENTED`.
|
97
|
+
# @param [String] name
|
98
|
+
# The name of the operation resource to be deleted.
|
99
|
+
# @param [String] fields
|
100
|
+
# Selector specifying which fields to include in a partial response.
|
101
|
+
# @param [String] quota_user
|
102
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
103
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
104
|
+
# @param [Google::Apis::RequestOptions] options
|
105
|
+
# Request-specific options
|
106
|
+
#
|
107
|
+
# @yield [result, err] Result & error if block supplied
|
108
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Empty] parsed result object
|
109
|
+
# @yieldparam err [StandardError] error object if request failed
|
110
|
+
#
|
111
|
+
# @return [Google::Apis::ContaineranalysisV1::Empty]
|
112
|
+
#
|
113
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
+
def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
117
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
118
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Empty::Representation
|
119
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Empty
|
120
|
+
command.params['name'] = name unless name.nil?
|
121
|
+
command.query['fields'] = fields unless fields.nil?
|
122
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
123
|
+
execute_or_queue_command(command, &block)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
127
|
+
# to poll the operation result at intervals as recommended by the API service.
|
128
|
+
# @param [String] name
|
129
|
+
# The name of the operation resource.
|
130
|
+
# @param [String] fields
|
131
|
+
# Selector specifying which fields to include in a partial response.
|
132
|
+
# @param [String] quota_user
|
133
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
134
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
135
|
+
# @param [Google::Apis::RequestOptions] options
|
136
|
+
# Request-specific options
|
137
|
+
#
|
138
|
+
# @yield [result, err] Result & error if block supplied
|
139
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Operation] parsed result object
|
140
|
+
# @yieldparam err [StandardError] error object if request failed
|
141
|
+
#
|
142
|
+
# @return [Google::Apis::ContaineranalysisV1::Operation]
|
143
|
+
#
|
144
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
145
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
146
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
147
|
+
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
148
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
149
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Operation::Representation
|
150
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Operation
|
151
|
+
command.params['name'] = name unless name.nil?
|
152
|
+
command.query['fields'] = fields unless fields.nil?
|
153
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
154
|
+
execute_or_queue_command(command, &block)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Lists operations that match the specified filter in the request. If the server
|
158
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
159
|
+
# binding allows API services to override the binding to use different resource
|
160
|
+
# name schemes, such as `users/*/operations`. To override the binding, API
|
161
|
+
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
162
|
+
# service configuration. For backwards compatibility, the default name includes
|
163
|
+
# the operations collection id, however overriding users must ensure the name
|
164
|
+
# binding is the parent resource, without the operations collection id.
|
165
|
+
# @param [String] name
|
166
|
+
# The name of the operation's parent resource.
|
167
|
+
# @param [String] filter
|
168
|
+
# The standard list filter.
|
169
|
+
# @param [Fixnum] page_size
|
170
|
+
# The standard list page size.
|
171
|
+
# @param [String] page_token
|
172
|
+
# The standard list page token.
|
173
|
+
# @param [String] fields
|
174
|
+
# Selector specifying which fields to include in a partial response.
|
175
|
+
# @param [String] quota_user
|
176
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
177
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
178
|
+
# @param [Google::Apis::RequestOptions] options
|
179
|
+
# Request-specific options
|
180
|
+
#
|
181
|
+
# @yield [result, err] Result & error if block supplied
|
182
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::ListOperationsResponse] parsed result object
|
183
|
+
# @yieldparam err [StandardError] error object if request failed
|
184
|
+
#
|
185
|
+
# @return [Google::Apis::ContaineranalysisV1::ListOperationsResponse]
|
186
|
+
#
|
187
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
188
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
189
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
190
|
+
def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
191
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
192
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::ListOperationsResponse::Representation
|
193
|
+
command.response_class = Google::Apis::ContaineranalysisV1::ListOperationsResponse
|
194
|
+
command.params['name'] = name unless name.nil?
|
195
|
+
command.query['filter'] = filter unless filter.nil?
|
196
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
197
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
198
|
+
command.query['fields'] = fields unless fields.nil?
|
199
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
200
|
+
execute_or_queue_command(command, &block)
|
201
|
+
end
|
202
|
+
|
203
|
+
# Creates new notes in batch.
|
204
|
+
# @param [String] parent
|
205
|
+
# Required. The name of the project in the form of `projects/[PROJECT_ID]`,
|
206
|
+
# under which the notes are to be created.
|
207
|
+
# @param [Google::Apis::ContaineranalysisV1::BatchCreateNotesRequest] batch_create_notes_request_object
|
208
|
+
# @param [String] fields
|
209
|
+
# Selector specifying which fields to include in a partial response.
|
210
|
+
# @param [String] quota_user
|
211
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
212
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
213
|
+
# @param [Google::Apis::RequestOptions] options
|
214
|
+
# Request-specific options
|
215
|
+
#
|
216
|
+
# @yield [result, err] Result & error if block supplied
|
217
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::BatchCreateNotesResponse] parsed result object
|
218
|
+
# @yieldparam err [StandardError] error object if request failed
|
219
|
+
#
|
220
|
+
# @return [Google::Apis::ContaineranalysisV1::BatchCreateNotesResponse]
|
221
|
+
#
|
222
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
223
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
224
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
225
|
+
def batch_create_notes(parent, batch_create_notes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
226
|
+
command = make_simple_command(:post, 'v1/{+parent}/notes:batchCreate', options)
|
227
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::BatchCreateNotesRequest::Representation
|
228
|
+
command.request_object = batch_create_notes_request_object
|
229
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::BatchCreateNotesResponse::Representation
|
230
|
+
command.response_class = Google::Apis::ContaineranalysisV1::BatchCreateNotesResponse
|
231
|
+
command.params['parent'] = parent unless parent.nil?
|
232
|
+
command.query['fields'] = fields unless fields.nil?
|
233
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
234
|
+
execute_or_queue_command(command, &block)
|
235
|
+
end
|
236
|
+
|
237
|
+
# Creates a new note.
|
238
|
+
# @param [String] parent
|
239
|
+
# Required. The name of the project in the form of `projects/[PROJECT_ID]`,
|
240
|
+
# under which the note is to be created.
|
241
|
+
# @param [Google::Apis::ContaineranalysisV1::Note] note_object
|
242
|
+
# @param [String] note_id
|
243
|
+
# Required. The ID to use for this note.
|
244
|
+
# @param [String] fields
|
245
|
+
# Selector specifying which fields to include in a partial response.
|
246
|
+
# @param [String] quota_user
|
247
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
248
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
249
|
+
# @param [Google::Apis::RequestOptions] options
|
250
|
+
# Request-specific options
|
251
|
+
#
|
252
|
+
# @yield [result, err] Result & error if block supplied
|
253
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Note] parsed result object
|
254
|
+
# @yieldparam err [StandardError] error object if request failed
|
255
|
+
#
|
256
|
+
# @return [Google::Apis::ContaineranalysisV1::Note]
|
257
|
+
#
|
258
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
259
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
260
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
261
|
+
def create_project_note(parent, note_object = nil, note_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
262
|
+
command = make_simple_command(:post, 'v1/{+parent}/notes', options)
|
263
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::Note::Representation
|
264
|
+
command.request_object = note_object
|
265
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Note::Representation
|
266
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Note
|
267
|
+
command.params['parent'] = parent unless parent.nil?
|
268
|
+
command.query['noteId'] = note_id unless note_id.nil?
|
269
|
+
command.query['fields'] = fields unless fields.nil?
|
270
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
271
|
+
execute_or_queue_command(command, &block)
|
272
|
+
end
|
273
|
+
|
274
|
+
# Deletes the specified note.
|
275
|
+
# @param [String] name
|
276
|
+
# Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[
|
277
|
+
# NOTE_ID]`.
|
278
|
+
# @param [String] fields
|
279
|
+
# Selector specifying which fields to include in a partial response.
|
280
|
+
# @param [String] quota_user
|
281
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
282
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
283
|
+
# @param [Google::Apis::RequestOptions] options
|
284
|
+
# Request-specific options
|
285
|
+
#
|
286
|
+
# @yield [result, err] Result & error if block supplied
|
287
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Empty] parsed result object
|
288
|
+
# @yieldparam err [StandardError] error object if request failed
|
289
|
+
#
|
290
|
+
# @return [Google::Apis::ContaineranalysisV1::Empty]
|
291
|
+
#
|
292
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
293
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
294
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
295
|
+
def delete_project_note(name, fields: nil, quota_user: nil, options: nil, &block)
|
296
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
297
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Empty::Representation
|
298
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Empty
|
299
|
+
command.params['name'] = name unless name.nil?
|
300
|
+
command.query['fields'] = fields unless fields.nil?
|
301
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
302
|
+
execute_or_queue_command(command, &block)
|
303
|
+
end
|
304
|
+
|
305
|
+
# Gets the specified note.
|
306
|
+
# @param [String] name
|
307
|
+
# Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[
|
308
|
+
# NOTE_ID]`.
|
309
|
+
# @param [String] fields
|
310
|
+
# Selector specifying which fields to include in a partial response.
|
311
|
+
# @param [String] quota_user
|
312
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
313
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
314
|
+
# @param [Google::Apis::RequestOptions] options
|
315
|
+
# Request-specific options
|
316
|
+
#
|
317
|
+
# @yield [result, err] Result & error if block supplied
|
318
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Note] parsed result object
|
319
|
+
# @yieldparam err [StandardError] error object if request failed
|
320
|
+
#
|
321
|
+
# @return [Google::Apis::ContaineranalysisV1::Note]
|
322
|
+
#
|
323
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
324
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
325
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
326
|
+
def get_project_note(name, fields: nil, quota_user: nil, options: nil, &block)
|
327
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
328
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Note::Representation
|
329
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Note
|
330
|
+
command.params['name'] = name unless name.nil?
|
331
|
+
command.query['fields'] = fields unless fields.nil?
|
332
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
333
|
+
execute_or_queue_command(command, &block)
|
334
|
+
end
|
335
|
+
|
336
|
+
# Gets the access control policy for a note or an occurrence resource. Requires `
|
337
|
+
# containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
|
338
|
+
# setIamPolicy` permission if the resource is a note or occurrence, respectively.
|
339
|
+
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
340
|
+
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
|
341
|
+
# @param [String] resource
|
342
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
343
|
+
# operation documentation for the appropriate value for this field.
|
344
|
+
# @param [Google::Apis::ContaineranalysisV1::GetIamPolicyRequest] get_iam_policy_request_object
|
345
|
+
# @param [String] fields
|
346
|
+
# Selector specifying which fields to include in a partial response.
|
347
|
+
# @param [String] quota_user
|
348
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
349
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
350
|
+
# @param [Google::Apis::RequestOptions] options
|
351
|
+
# Request-specific options
|
352
|
+
#
|
353
|
+
# @yield [result, err] Result & error if block supplied
|
354
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Policy] parsed result object
|
355
|
+
# @yieldparam err [StandardError] error object if request failed
|
356
|
+
#
|
357
|
+
# @return [Google::Apis::ContaineranalysisV1::Policy]
|
358
|
+
#
|
359
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
360
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
361
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
362
|
+
def get_note_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
363
|
+
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
|
364
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::GetIamPolicyRequest::Representation
|
365
|
+
command.request_object = get_iam_policy_request_object
|
366
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Policy::Representation
|
367
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Policy
|
368
|
+
command.params['resource'] = resource unless resource.nil?
|
369
|
+
command.query['fields'] = fields unless fields.nil?
|
370
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
371
|
+
execute_or_queue_command(command, &block)
|
372
|
+
end
|
373
|
+
|
374
|
+
# Lists notes for the specified project.
|
375
|
+
# @param [String] parent
|
376
|
+
# Required. The name of the project to list notes for in the form of `projects/[
|
377
|
+
# PROJECT_ID]`.
|
378
|
+
# @param [String] filter
|
379
|
+
# The filter expression.
|
380
|
+
# @param [Fixnum] page_size
|
381
|
+
# Number of notes to return in the list. Must be positive. Max allowed page size
|
382
|
+
# is 1000. If not specified, page size defaults to 20.
|
383
|
+
# @param [String] page_token
|
384
|
+
# Token to provide to skip to a particular spot in the list.
|
385
|
+
# @param [String] fields
|
386
|
+
# Selector specifying which fields to include in a partial response.
|
387
|
+
# @param [String] quota_user
|
388
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
389
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
390
|
+
# @param [Google::Apis::RequestOptions] options
|
391
|
+
# Request-specific options
|
392
|
+
#
|
393
|
+
# @yield [result, err] Result & error if block supplied
|
394
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::ListNotesResponse] parsed result object
|
395
|
+
# @yieldparam err [StandardError] error object if request failed
|
396
|
+
#
|
397
|
+
# @return [Google::Apis::ContaineranalysisV1::ListNotesResponse]
|
398
|
+
#
|
399
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
400
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
401
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
402
|
+
def list_project_notes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
403
|
+
command = make_simple_command(:get, 'v1/{+parent}/notes', options)
|
404
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::ListNotesResponse::Representation
|
405
|
+
command.response_class = Google::Apis::ContaineranalysisV1::ListNotesResponse
|
406
|
+
command.params['parent'] = parent unless parent.nil?
|
407
|
+
command.query['filter'] = filter unless filter.nil?
|
408
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
409
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
410
|
+
command.query['fields'] = fields unless fields.nil?
|
411
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
412
|
+
execute_or_queue_command(command, &block)
|
413
|
+
end
|
414
|
+
|
415
|
+
# Updates the specified note.
|
416
|
+
# @param [String] name
|
417
|
+
# Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[
|
418
|
+
# NOTE_ID]`.
|
419
|
+
# @param [Google::Apis::ContaineranalysisV1::Note] note_object
|
420
|
+
# @param [String] update_mask
|
421
|
+
# The fields to update.
|
422
|
+
# @param [String] fields
|
423
|
+
# Selector specifying which fields to include in a partial response.
|
424
|
+
# @param [String] quota_user
|
425
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
426
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
427
|
+
# @param [Google::Apis::RequestOptions] options
|
428
|
+
# Request-specific options
|
429
|
+
#
|
430
|
+
# @yield [result, err] Result & error if block supplied
|
431
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Note] parsed result object
|
432
|
+
# @yieldparam err [StandardError] error object if request failed
|
433
|
+
#
|
434
|
+
# @return [Google::Apis::ContaineranalysisV1::Note]
|
435
|
+
#
|
436
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
437
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
438
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
439
|
+
def patch_project_note(name, note_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
440
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
441
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::Note::Representation
|
442
|
+
command.request_object = note_object
|
443
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Note::Representation
|
444
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Note
|
445
|
+
command.params['name'] = name unless name.nil?
|
446
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
447
|
+
command.query['fields'] = fields unless fields.nil?
|
448
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
449
|
+
execute_or_queue_command(command, &block)
|
450
|
+
end
|
451
|
+
|
452
|
+
# Sets the access control policy on the specified note or occurrence. Requires `
|
453
|
+
# containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
|
454
|
+
# setIamPolicy` permission if the resource is a note or an occurrence,
|
455
|
+
# respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[
|
456
|
+
# NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`
|
457
|
+
# for occurrences.
|
458
|
+
# @param [String] resource
|
459
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
460
|
+
# operation documentation for the appropriate value for this field.
|
461
|
+
# @param [Google::Apis::ContaineranalysisV1::SetIamPolicyRequest] set_iam_policy_request_object
|
462
|
+
# @param [String] fields
|
463
|
+
# Selector specifying which fields to include in a partial response.
|
464
|
+
# @param [String] quota_user
|
465
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
466
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
467
|
+
# @param [Google::Apis::RequestOptions] options
|
468
|
+
# Request-specific options
|
469
|
+
#
|
470
|
+
# @yield [result, err] Result & error if block supplied
|
471
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Policy] parsed result object
|
472
|
+
# @yieldparam err [StandardError] error object if request failed
|
473
|
+
#
|
474
|
+
# @return [Google::Apis::ContaineranalysisV1::Policy]
|
475
|
+
#
|
476
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
477
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
478
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
479
|
+
def set_note_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
480
|
+
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
481
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::SetIamPolicyRequest::Representation
|
482
|
+
command.request_object = set_iam_policy_request_object
|
483
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Policy::Representation
|
484
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Policy
|
485
|
+
command.params['resource'] = resource unless resource.nil?
|
486
|
+
command.query['fields'] = fields unless fields.nil?
|
487
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
488
|
+
execute_or_queue_command(command, &block)
|
489
|
+
end
|
490
|
+
|
491
|
+
# Returns the permissions that a caller has on the specified note or occurrence.
|
492
|
+
# Requires list permission on the project (for example, `containeranalysis.notes.
|
493
|
+
# list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]`
|
494
|
+
# for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
495
|
+
# occurrences.
|
496
|
+
# @param [String] resource
|
497
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
498
|
+
# operation documentation for the appropriate value for this field.
|
499
|
+
# @param [Google::Apis::ContaineranalysisV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
500
|
+
# @param [String] fields
|
501
|
+
# Selector specifying which fields to include in a partial response.
|
502
|
+
# @param [String] quota_user
|
503
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
504
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
505
|
+
# @param [Google::Apis::RequestOptions] options
|
506
|
+
# Request-specific options
|
507
|
+
#
|
508
|
+
# @yield [result, err] Result & error if block supplied
|
509
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse] parsed result object
|
510
|
+
# @yieldparam err [StandardError] error object if request failed
|
511
|
+
#
|
512
|
+
# @return [Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse]
|
513
|
+
#
|
514
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
515
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
516
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
517
|
+
def test_note_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
518
|
+
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
519
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::TestIamPermissionsRequest::Representation
|
520
|
+
command.request_object = test_iam_permissions_request_object
|
521
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse::Representation
|
522
|
+
command.response_class = Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse
|
523
|
+
command.params['resource'] = resource unless resource.nil?
|
524
|
+
command.query['fields'] = fields unless fields.nil?
|
525
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
526
|
+
execute_or_queue_command(command, &block)
|
527
|
+
end
|
528
|
+
|
529
|
+
# Lists occurrences referencing the specified note. Provider projects can use
|
530
|
+
# this method to get all occurrences across consumer projects referencing the
|
531
|
+
# specified note.
|
532
|
+
# @param [String] name
|
533
|
+
# Required. The name of the note to list occurrences for in the form of `
|
534
|
+
# projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
|
535
|
+
# @param [String] filter
|
536
|
+
# The filter expression.
|
537
|
+
# @param [Fixnum] page_size
|
538
|
+
# Number of occurrences to return in the list.
|
539
|
+
# @param [String] page_token
|
540
|
+
# Token to provide to skip to a particular spot in the list.
|
541
|
+
# @param [String] fields
|
542
|
+
# Selector specifying which fields to include in a partial response.
|
543
|
+
# @param [String] quota_user
|
544
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
545
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
546
|
+
# @param [Google::Apis::RequestOptions] options
|
547
|
+
# Request-specific options
|
548
|
+
#
|
549
|
+
# @yield [result, err] Result & error if block supplied
|
550
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::ListNoteOccurrencesResponse] parsed result object
|
551
|
+
# @yieldparam err [StandardError] error object if request failed
|
552
|
+
#
|
553
|
+
# @return [Google::Apis::ContaineranalysisV1::ListNoteOccurrencesResponse]
|
554
|
+
#
|
555
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
556
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
557
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
558
|
+
def list_project_note_occurrences(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
559
|
+
command = make_simple_command(:get, 'v1/{+name}/occurrences', options)
|
560
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::ListNoteOccurrencesResponse::Representation
|
561
|
+
command.response_class = Google::Apis::ContaineranalysisV1::ListNoteOccurrencesResponse
|
562
|
+
command.params['name'] = name unless name.nil?
|
563
|
+
command.query['filter'] = filter unless filter.nil?
|
564
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
565
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
566
|
+
command.query['fields'] = fields unless fields.nil?
|
567
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
568
|
+
execute_or_queue_command(command, &block)
|
569
|
+
end
|
570
|
+
|
571
|
+
# Creates new occurrences in batch.
|
572
|
+
# @param [String] parent
|
573
|
+
# Required. The name of the project in the form of `projects/[PROJECT_ID]`,
|
574
|
+
# under which the occurrences are to be created.
|
575
|
+
# @param [Google::Apis::ContaineranalysisV1::BatchCreateOccurrencesRequest] batch_create_occurrences_request_object
|
576
|
+
# @param [String] fields
|
577
|
+
# Selector specifying which fields to include in a partial response.
|
578
|
+
# @param [String] quota_user
|
579
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
580
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
581
|
+
# @param [Google::Apis::RequestOptions] options
|
582
|
+
# Request-specific options
|
583
|
+
#
|
584
|
+
# @yield [result, err] Result & error if block supplied
|
585
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::BatchCreateOccurrencesResponse] parsed result object
|
586
|
+
# @yieldparam err [StandardError] error object if request failed
|
587
|
+
#
|
588
|
+
# @return [Google::Apis::ContaineranalysisV1::BatchCreateOccurrencesResponse]
|
589
|
+
#
|
590
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
591
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
592
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
593
|
+
def batch_create_occurrences(parent, batch_create_occurrences_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
594
|
+
command = make_simple_command(:post, 'v1/{+parent}/occurrences:batchCreate', options)
|
595
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::BatchCreateOccurrencesRequest::Representation
|
596
|
+
command.request_object = batch_create_occurrences_request_object
|
597
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::BatchCreateOccurrencesResponse::Representation
|
598
|
+
command.response_class = Google::Apis::ContaineranalysisV1::BatchCreateOccurrencesResponse
|
599
|
+
command.params['parent'] = parent unless parent.nil?
|
600
|
+
command.query['fields'] = fields unless fields.nil?
|
601
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
602
|
+
execute_or_queue_command(command, &block)
|
603
|
+
end
|
604
|
+
|
605
|
+
# Creates a new occurrence.
|
606
|
+
# @param [String] parent
|
607
|
+
# Required. The name of the project in the form of `projects/[PROJECT_ID]`,
|
608
|
+
# under which the occurrence is to be created.
|
609
|
+
# @param [Google::Apis::ContaineranalysisV1::Occurrence] occurrence_object
|
610
|
+
# @param [String] fields
|
611
|
+
# Selector specifying which fields to include in a partial response.
|
612
|
+
# @param [String] quota_user
|
613
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
614
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
615
|
+
# @param [Google::Apis::RequestOptions] options
|
616
|
+
# Request-specific options
|
617
|
+
#
|
618
|
+
# @yield [result, err] Result & error if block supplied
|
619
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Occurrence] parsed result object
|
620
|
+
# @yieldparam err [StandardError] error object if request failed
|
621
|
+
#
|
622
|
+
# @return [Google::Apis::ContaineranalysisV1::Occurrence]
|
623
|
+
#
|
624
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
625
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
626
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
627
|
+
def create_project_occurrence(parent, occurrence_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
628
|
+
command = make_simple_command(:post, 'v1/{+parent}/occurrences', options)
|
629
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::Occurrence::Representation
|
630
|
+
command.request_object = occurrence_object
|
631
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Occurrence::Representation
|
632
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Occurrence
|
633
|
+
command.params['parent'] = parent unless parent.nil?
|
634
|
+
command.query['fields'] = fields unless fields.nil?
|
635
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
636
|
+
execute_or_queue_command(command, &block)
|
637
|
+
end
|
638
|
+
|
639
|
+
# Deletes the specified occurrence. For example, use this method to delete an
|
640
|
+
# occurrence when the occurrence is no longer applicable for the given resource.
|
641
|
+
# @param [String] name
|
642
|
+
# Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
|
643
|
+
# occurrences/[OCCURRENCE_ID]`.
|
644
|
+
# @param [String] fields
|
645
|
+
# Selector specifying which fields to include in a partial response.
|
646
|
+
# @param [String] quota_user
|
647
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
648
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
649
|
+
# @param [Google::Apis::RequestOptions] options
|
650
|
+
# Request-specific options
|
651
|
+
#
|
652
|
+
# @yield [result, err] Result & error if block supplied
|
653
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Empty] parsed result object
|
654
|
+
# @yieldparam err [StandardError] error object if request failed
|
655
|
+
#
|
656
|
+
# @return [Google::Apis::ContaineranalysisV1::Empty]
|
657
|
+
#
|
658
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
659
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
660
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
661
|
+
def delete_project_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
|
662
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
663
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Empty::Representation
|
664
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Empty
|
665
|
+
command.params['name'] = name unless name.nil?
|
666
|
+
command.query['fields'] = fields unless fields.nil?
|
667
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
668
|
+
execute_or_queue_command(command, &block)
|
669
|
+
end
|
670
|
+
|
671
|
+
# Gets the specified occurrence.
|
672
|
+
# @param [String] name
|
673
|
+
# Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
|
674
|
+
# occurrences/[OCCURRENCE_ID]`.
|
675
|
+
# @param [String] fields
|
676
|
+
# Selector specifying which fields to include in a partial response.
|
677
|
+
# @param [String] quota_user
|
678
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
679
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
680
|
+
# @param [Google::Apis::RequestOptions] options
|
681
|
+
# Request-specific options
|
682
|
+
#
|
683
|
+
# @yield [result, err] Result & error if block supplied
|
684
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Occurrence] parsed result object
|
685
|
+
# @yieldparam err [StandardError] error object if request failed
|
686
|
+
#
|
687
|
+
# @return [Google::Apis::ContaineranalysisV1::Occurrence]
|
688
|
+
#
|
689
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
690
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
691
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
692
|
+
def get_project_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
|
693
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
694
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Occurrence::Representation
|
695
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Occurrence
|
696
|
+
command.params['name'] = name unless name.nil?
|
697
|
+
command.query['fields'] = fields unless fields.nil?
|
698
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
699
|
+
execute_or_queue_command(command, &block)
|
700
|
+
end
|
701
|
+
|
702
|
+
# Gets the access control policy for a note or an occurrence resource. Requires `
|
703
|
+
# containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
|
704
|
+
# setIamPolicy` permission if the resource is a note or occurrence, respectively.
|
705
|
+
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
706
|
+
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
|
707
|
+
# @param [String] resource
|
708
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
709
|
+
# operation documentation for the appropriate value for this field.
|
710
|
+
# @param [Google::Apis::ContaineranalysisV1::GetIamPolicyRequest] get_iam_policy_request_object
|
711
|
+
# @param [String] fields
|
712
|
+
# Selector specifying which fields to include in a partial response.
|
713
|
+
# @param [String] quota_user
|
714
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
715
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
716
|
+
# @param [Google::Apis::RequestOptions] options
|
717
|
+
# Request-specific options
|
718
|
+
#
|
719
|
+
# @yield [result, err] Result & error if block supplied
|
720
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Policy] parsed result object
|
721
|
+
# @yieldparam err [StandardError] error object if request failed
|
722
|
+
#
|
723
|
+
# @return [Google::Apis::ContaineranalysisV1::Policy]
|
724
|
+
#
|
725
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
726
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
727
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
728
|
+
def get_occurrence_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
729
|
+
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
|
730
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::GetIamPolicyRequest::Representation
|
731
|
+
command.request_object = get_iam_policy_request_object
|
732
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Policy::Representation
|
733
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Policy
|
734
|
+
command.params['resource'] = resource unless resource.nil?
|
735
|
+
command.query['fields'] = fields unless fields.nil?
|
736
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
737
|
+
execute_or_queue_command(command, &block)
|
738
|
+
end
|
739
|
+
|
740
|
+
# Gets the note attached to the specified occurrence. Consumer projects can use
|
741
|
+
# this method to get a note that belongs to a provider project.
|
742
|
+
# @param [String] name
|
743
|
+
# Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
|
744
|
+
# occurrences/[OCCURRENCE_ID]`.
|
745
|
+
# @param [String] fields
|
746
|
+
# Selector specifying which fields to include in a partial response.
|
747
|
+
# @param [String] quota_user
|
748
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
749
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
750
|
+
# @param [Google::Apis::RequestOptions] options
|
751
|
+
# Request-specific options
|
752
|
+
#
|
753
|
+
# @yield [result, err] Result & error if block supplied
|
754
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Note] parsed result object
|
755
|
+
# @yieldparam err [StandardError] error object if request failed
|
756
|
+
#
|
757
|
+
# @return [Google::Apis::ContaineranalysisV1::Note]
|
758
|
+
#
|
759
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
760
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
761
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
762
|
+
def get_project_occurrence_notes(name, fields: nil, quota_user: nil, options: nil, &block)
|
763
|
+
command = make_simple_command(:get, 'v1/{+name}/notes', options)
|
764
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Note::Representation
|
765
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Note
|
766
|
+
command.params['name'] = name unless name.nil?
|
767
|
+
command.query['fields'] = fields unless fields.nil?
|
768
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
769
|
+
execute_or_queue_command(command, &block)
|
770
|
+
end
|
771
|
+
|
772
|
+
# Gets a summary of the number and severity of occurrences.
|
773
|
+
# @param [String] parent
|
774
|
+
# Required. The name of the project to get a vulnerability summary for in the
|
775
|
+
# form of `projects/[PROJECT_ID]`.
|
776
|
+
# @param [String] filter
|
777
|
+
# The filter expression.
|
778
|
+
# @param [String] fields
|
779
|
+
# Selector specifying which fields to include in a partial response.
|
780
|
+
# @param [String] quota_user
|
781
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
782
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
783
|
+
# @param [Google::Apis::RequestOptions] options
|
784
|
+
# Request-specific options
|
785
|
+
#
|
786
|
+
# @yield [result, err] Result & error if block supplied
|
787
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::VulnerabilityOccurrencesSummary] parsed result object
|
788
|
+
# @yieldparam err [StandardError] error object if request failed
|
789
|
+
#
|
790
|
+
# @return [Google::Apis::ContaineranalysisV1::VulnerabilityOccurrencesSummary]
|
791
|
+
#
|
792
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
793
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
794
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
795
|
+
def get_project_occurrence_vulnerability_summary(parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
796
|
+
command = make_simple_command(:get, 'v1/{+parent}/occurrences:vulnerabilitySummary', options)
|
797
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::VulnerabilityOccurrencesSummary::Representation
|
798
|
+
command.response_class = Google::Apis::ContaineranalysisV1::VulnerabilityOccurrencesSummary
|
799
|
+
command.params['parent'] = parent unless parent.nil?
|
800
|
+
command.query['filter'] = filter unless filter.nil?
|
801
|
+
command.query['fields'] = fields unless fields.nil?
|
802
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
803
|
+
execute_or_queue_command(command, &block)
|
804
|
+
end
|
805
|
+
|
806
|
+
# Lists occurrences for the specified project.
|
807
|
+
# @param [String] parent
|
808
|
+
# Required. The name of the project to list occurrences for in the form of `
|
809
|
+
# projects/[PROJECT_ID]`.
|
810
|
+
# @param [String] filter
|
811
|
+
# The filter expression.
|
812
|
+
# @param [Fixnum] page_size
|
813
|
+
# Number of occurrences to return in the list. Must be positive. Max allowed
|
814
|
+
# page size is 1000. If not specified, page size defaults to 20.
|
815
|
+
# @param [String] page_token
|
816
|
+
# Token to provide to skip to a particular spot in the list.
|
817
|
+
# @param [String] fields
|
818
|
+
# Selector specifying which fields to include in a partial response.
|
819
|
+
# @param [String] quota_user
|
820
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
821
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
822
|
+
# @param [Google::Apis::RequestOptions] options
|
823
|
+
# Request-specific options
|
824
|
+
#
|
825
|
+
# @yield [result, err] Result & error if block supplied
|
826
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::ListOccurrencesResponse] parsed result object
|
827
|
+
# @yieldparam err [StandardError] error object if request failed
|
828
|
+
#
|
829
|
+
# @return [Google::Apis::ContaineranalysisV1::ListOccurrencesResponse]
|
830
|
+
#
|
831
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
832
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
833
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
834
|
+
def list_project_occurrences(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
835
|
+
command = make_simple_command(:get, 'v1/{+parent}/occurrences', options)
|
836
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::ListOccurrencesResponse::Representation
|
837
|
+
command.response_class = Google::Apis::ContaineranalysisV1::ListOccurrencesResponse
|
838
|
+
command.params['parent'] = parent unless parent.nil?
|
839
|
+
command.query['filter'] = filter unless filter.nil?
|
840
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
841
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
842
|
+
command.query['fields'] = fields unless fields.nil?
|
843
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
844
|
+
execute_or_queue_command(command, &block)
|
845
|
+
end
|
846
|
+
|
847
|
+
# Updates the specified occurrence.
|
848
|
+
# @param [String] name
|
849
|
+
# Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
|
850
|
+
# occurrences/[OCCURRENCE_ID]`.
|
851
|
+
# @param [Google::Apis::ContaineranalysisV1::Occurrence] occurrence_object
|
852
|
+
# @param [String] update_mask
|
853
|
+
# The fields to update.
|
854
|
+
# @param [String] fields
|
855
|
+
# Selector specifying which fields to include in a partial response.
|
856
|
+
# @param [String] quota_user
|
857
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
858
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
859
|
+
# @param [Google::Apis::RequestOptions] options
|
860
|
+
# Request-specific options
|
861
|
+
#
|
862
|
+
# @yield [result, err] Result & error if block supplied
|
863
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Occurrence] parsed result object
|
864
|
+
# @yieldparam err [StandardError] error object if request failed
|
865
|
+
#
|
866
|
+
# @return [Google::Apis::ContaineranalysisV1::Occurrence]
|
867
|
+
#
|
868
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
869
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
870
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
871
|
+
def patch_project_occurrence(name, occurrence_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
872
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
873
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::Occurrence::Representation
|
874
|
+
command.request_object = occurrence_object
|
875
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Occurrence::Representation
|
876
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Occurrence
|
877
|
+
command.params['name'] = name unless name.nil?
|
878
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
879
|
+
command.query['fields'] = fields unless fields.nil?
|
880
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
881
|
+
execute_or_queue_command(command, &block)
|
882
|
+
end
|
883
|
+
|
884
|
+
# Sets the access control policy on the specified note or occurrence. Requires `
|
885
|
+
# containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
|
886
|
+
# setIamPolicy` permission if the resource is a note or an occurrence,
|
887
|
+
# respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[
|
888
|
+
# NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`
|
889
|
+
# for occurrences.
|
890
|
+
# @param [String] resource
|
891
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
892
|
+
# operation documentation for the appropriate value for this field.
|
893
|
+
# @param [Google::Apis::ContaineranalysisV1::SetIamPolicyRequest] set_iam_policy_request_object
|
894
|
+
# @param [String] fields
|
895
|
+
# Selector specifying which fields to include in a partial response.
|
896
|
+
# @param [String] quota_user
|
897
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
898
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
899
|
+
# @param [Google::Apis::RequestOptions] options
|
900
|
+
# Request-specific options
|
901
|
+
#
|
902
|
+
# @yield [result, err] Result & error if block supplied
|
903
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::Policy] parsed result object
|
904
|
+
# @yieldparam err [StandardError] error object if request failed
|
905
|
+
#
|
906
|
+
# @return [Google::Apis::ContaineranalysisV1::Policy]
|
907
|
+
#
|
908
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
909
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
910
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
911
|
+
def set_occurrence_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
912
|
+
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
913
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::SetIamPolicyRequest::Representation
|
914
|
+
command.request_object = set_iam_policy_request_object
|
915
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::Policy::Representation
|
916
|
+
command.response_class = Google::Apis::ContaineranalysisV1::Policy
|
917
|
+
command.params['resource'] = resource unless resource.nil?
|
918
|
+
command.query['fields'] = fields unless fields.nil?
|
919
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
920
|
+
execute_or_queue_command(command, &block)
|
921
|
+
end
|
922
|
+
|
923
|
+
# Returns the permissions that a caller has on the specified note or occurrence.
|
924
|
+
# Requires list permission on the project (for example, `containeranalysis.notes.
|
925
|
+
# list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]`
|
926
|
+
# for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
927
|
+
# occurrences.
|
928
|
+
# @param [String] resource
|
929
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
930
|
+
# operation documentation for the appropriate value for this field.
|
931
|
+
# @param [Google::Apis::ContaineranalysisV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
932
|
+
# @param [String] fields
|
933
|
+
# Selector specifying which fields to include in a partial response.
|
934
|
+
# @param [String] quota_user
|
935
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
936
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
937
|
+
# @param [Google::Apis::RequestOptions] options
|
938
|
+
# Request-specific options
|
939
|
+
#
|
940
|
+
# @yield [result, err] Result & error if block supplied
|
941
|
+
# @yieldparam result [Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse] parsed result object
|
942
|
+
# @yieldparam err [StandardError] error object if request failed
|
943
|
+
#
|
944
|
+
# @return [Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse]
|
945
|
+
#
|
946
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
947
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
948
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
949
|
+
def test_occurrence_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
950
|
+
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
951
|
+
command.request_representation = Google::Apis::ContaineranalysisV1::TestIamPermissionsRequest::Representation
|
952
|
+
command.request_object = test_iam_permissions_request_object
|
953
|
+
command.response_representation = Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse::Representation
|
954
|
+
command.response_class = Google::Apis::ContaineranalysisV1::TestIamPermissionsResponse
|
955
|
+
command.params['resource'] = resource unless resource.nil?
|
956
|
+
command.query['fields'] = fields unless fields.nil?
|
957
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
958
|
+
execute_or_queue_command(command, &block)
|
959
|
+
end
|
960
|
+
|
961
|
+
protected
|
962
|
+
|
963
|
+
def apply_command_defaults(command)
|
964
|
+
command.query['key'] = key unless key.nil?
|
965
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
966
|
+
end
|
967
|
+
end
|
968
|
+
end
|
969
|
+
end
|
970
|
+
end
|