google-apis-securityposture_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/securityposture_v1/classes.rb +1737 -0
- data/lib/google/apis/securityposture_v1/gem_version.rb +28 -0
- data/lib/google/apis/securityposture_v1/representations.rb +718 -0
- data/lib/google/apis/securityposture_v1/service.rb +952 -0
- data/lib/google/apis/securityposture_v1.rb +39 -0
- data/lib/google-apis-securityposture_v1.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,952 @@
|
|
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 SecuritypostureV1
|
23
|
+
# Security Posture API
|
24
|
+
#
|
25
|
+
# Defines, assesses, and monitors the overall status of your security in Google
|
26
|
+
# Cloud. You can use security postures to evaluate your current cloud security
|
27
|
+
# against defined benchmarks and help maintain the level of security that your
|
28
|
+
# organization requires.
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
# require 'google/apis/securityposture_v1'
|
32
|
+
#
|
33
|
+
# Securityposture = Google::Apis::SecuritypostureV1 # Alias the module
|
34
|
+
# service = Securityposture::SecurityPostureService.new
|
35
|
+
#
|
36
|
+
# @see https://cloud.google.com/security-command-center
|
37
|
+
class SecurityPostureService < Google::Apis::Core::BaseService
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://securityposture.$UNIVERSE_DOMAIN$/"
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# API key. Your API key identifies your project and provides you with API access,
|
42
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
43
|
+
attr_accessor :key
|
44
|
+
|
45
|
+
# @return [String]
|
46
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
47
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
48
|
+
attr_accessor :quota_user
|
49
|
+
|
50
|
+
def initialize
|
51
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, '',
|
52
|
+
client_name: 'google-apis-securityposture_v1',
|
53
|
+
client_version: Google::Apis::SecuritypostureV1::GEM_VERSION)
|
54
|
+
@batch_path = 'batch'
|
55
|
+
end
|
56
|
+
|
57
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
58
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
59
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
60
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
61
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
62
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
63
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of `1`
|
64
|
+
# , corresponding to `Code.CANCELLED`.
|
65
|
+
# @param [String] name
|
66
|
+
# The name of the operation resource to be cancelled.
|
67
|
+
# @param [Google::Apis::SecuritypostureV1::CancelOperationRequest] cancel_operation_request_object
|
68
|
+
# @param [String] fields
|
69
|
+
# Selector specifying which fields to include in a partial response.
|
70
|
+
# @param [String] quota_user
|
71
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
72
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
73
|
+
# @param [Google::Apis::RequestOptions] options
|
74
|
+
# Request-specific options
|
75
|
+
#
|
76
|
+
# @yield [result, err] Result & error if block supplied
|
77
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Empty] parsed result object
|
78
|
+
# @yieldparam err [StandardError] error object if request failed
|
79
|
+
#
|
80
|
+
# @return [Google::Apis::SecuritypostureV1::Empty]
|
81
|
+
#
|
82
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
83
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
84
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
85
|
+
def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
86
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
87
|
+
command.request_representation = Google::Apis::SecuritypostureV1::CancelOperationRequest::Representation
|
88
|
+
command.request_object = cancel_operation_request_object
|
89
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Empty::Representation
|
90
|
+
command.response_class = Google::Apis::SecuritypostureV1::Empty
|
91
|
+
command.params['name'] = name unless name.nil?
|
92
|
+
command.query['fields'] = fields unless fields.nil?
|
93
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
94
|
+
execute_or_queue_command(command, &block)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
98
|
+
# longer interested in the operation result. It does not cancel the operation.
|
99
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
100
|
+
# UNIMPLEMENTED`.
|
101
|
+
# @param [String] name
|
102
|
+
# The name of the operation resource to be deleted.
|
103
|
+
# @param [String] fields
|
104
|
+
# Selector specifying which fields to include in a partial response.
|
105
|
+
# @param [String] quota_user
|
106
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
107
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
108
|
+
# @param [Google::Apis::RequestOptions] options
|
109
|
+
# Request-specific options
|
110
|
+
#
|
111
|
+
# @yield [result, err] Result & error if block supplied
|
112
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Empty] parsed result object
|
113
|
+
# @yieldparam err [StandardError] error object if request failed
|
114
|
+
#
|
115
|
+
# @return [Google::Apis::SecuritypostureV1::Empty]
|
116
|
+
#
|
117
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
118
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
119
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
120
|
+
def delete_organization_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
121
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
122
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Empty::Representation
|
123
|
+
command.response_class = Google::Apis::SecuritypostureV1::Empty
|
124
|
+
command.params['name'] = name unless name.nil?
|
125
|
+
command.query['fields'] = fields unless fields.nil?
|
126
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
127
|
+
execute_or_queue_command(command, &block)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
131
|
+
# to poll the operation result at intervals as recommended by the API service.
|
132
|
+
# @param [String] name
|
133
|
+
# The name of the operation resource.
|
134
|
+
# @param [String] fields
|
135
|
+
# Selector specifying which fields to include in a partial response.
|
136
|
+
# @param [String] quota_user
|
137
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
138
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
139
|
+
# @param [Google::Apis::RequestOptions] options
|
140
|
+
# Request-specific options
|
141
|
+
#
|
142
|
+
# @yield [result, err] Result & error if block supplied
|
143
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
144
|
+
# @yieldparam err [StandardError] error object if request failed
|
145
|
+
#
|
146
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
147
|
+
#
|
148
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
149
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
150
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
151
|
+
def get_organization_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
152
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
153
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
154
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
155
|
+
command.params['name'] = name unless name.nil?
|
156
|
+
command.query['fields'] = fields unless fields.nil?
|
157
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
158
|
+
execute_or_queue_command(command, &block)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Lists operations that match the specified filter in the request. If the server
|
162
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`.
|
163
|
+
# @param [String] name
|
164
|
+
# The name of the operation's parent resource.
|
165
|
+
# @param [String] filter
|
166
|
+
# The standard list filter.
|
167
|
+
# @param [Fixnum] page_size
|
168
|
+
# The standard list page size.
|
169
|
+
# @param [String] page_token
|
170
|
+
# The standard list page token.
|
171
|
+
# @param [String] fields
|
172
|
+
# Selector specifying which fields to include in a partial response.
|
173
|
+
# @param [String] quota_user
|
174
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
175
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
176
|
+
# @param [Google::Apis::RequestOptions] options
|
177
|
+
# Request-specific options
|
178
|
+
#
|
179
|
+
# @yield [result, err] Result & error if block supplied
|
180
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::ListOperationsResponse] parsed result object
|
181
|
+
# @yieldparam err [StandardError] error object if request failed
|
182
|
+
#
|
183
|
+
# @return [Google::Apis::SecuritypostureV1::ListOperationsResponse]
|
184
|
+
#
|
185
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
186
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
187
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
188
|
+
def list_organization_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
189
|
+
command = make_simple_command(:get, 'v1/{+name}/operations', options)
|
190
|
+
command.response_representation = Google::Apis::SecuritypostureV1::ListOperationsResponse::Representation
|
191
|
+
command.response_class = Google::Apis::SecuritypostureV1::ListOperationsResponse
|
192
|
+
command.params['name'] = name unless name.nil?
|
193
|
+
command.query['filter'] = filter unless filter.nil?
|
194
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
195
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
196
|
+
command.query['fields'] = fields unless fields.nil?
|
197
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
198
|
+
execute_or_queue_command(command, &block)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Creates a new PostureDeployment in a given project and location.
|
202
|
+
# @param [String] parent
|
203
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
204
|
+
# /locations/global`.
|
205
|
+
# @param [Google::Apis::SecuritypostureV1::PostureDeployment] posture_deployment_object
|
206
|
+
# @param [String] posture_deployment_id
|
207
|
+
# Required. An identifier for the posture deployment.
|
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::SecuritypostureV1::Operation] parsed result object
|
218
|
+
# @yieldparam err [StandardError] error object if request failed
|
219
|
+
#
|
220
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
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 create_organization_location_posture_deployment(parent, posture_deployment_object = nil, posture_deployment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
226
|
+
command = make_simple_command(:post, 'v1/{+parent}/postureDeployments', options)
|
227
|
+
command.request_representation = Google::Apis::SecuritypostureV1::PostureDeployment::Representation
|
228
|
+
command.request_object = posture_deployment_object
|
229
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
230
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
231
|
+
command.params['parent'] = parent unless parent.nil?
|
232
|
+
command.query['postureDeploymentId'] = posture_deployment_id unless posture_deployment_id.nil?
|
233
|
+
command.query['fields'] = fields unless fields.nil?
|
234
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
235
|
+
execute_or_queue_command(command, &block)
|
236
|
+
end
|
237
|
+
|
238
|
+
# Deletes a PostureDeployment.
|
239
|
+
# @param [String] name
|
240
|
+
# Required. The name of the posture deployment, in the format `organizations/`
|
241
|
+
# organization`/locations/global/postureDeployments/`posture_id``.
|
242
|
+
# @param [String] etag
|
243
|
+
# Optional. An opaque identifier for the current version of the posture
|
244
|
+
# deployment. If you provide this value, then it must match the existing value.
|
245
|
+
# If the values don't match, then the request fails with an ABORTED error. If
|
246
|
+
# you omit this value, then the posture deployment is deleted regardless of its
|
247
|
+
# current `etag` value.
|
248
|
+
# @param [String] fields
|
249
|
+
# Selector specifying which fields to include in a partial response.
|
250
|
+
# @param [String] quota_user
|
251
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
252
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
253
|
+
# @param [Google::Apis::RequestOptions] options
|
254
|
+
# Request-specific options
|
255
|
+
#
|
256
|
+
# @yield [result, err] Result & error if block supplied
|
257
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
258
|
+
# @yieldparam err [StandardError] error object if request failed
|
259
|
+
#
|
260
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
261
|
+
#
|
262
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
263
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
264
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
265
|
+
def delete_organization_location_posture_deployment(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block)
|
266
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
267
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
268
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
269
|
+
command.params['name'] = name unless name.nil?
|
270
|
+
command.query['etag'] = etag unless etag.nil?
|
271
|
+
command.query['fields'] = fields unless fields.nil?
|
272
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
273
|
+
execute_or_queue_command(command, &block)
|
274
|
+
end
|
275
|
+
|
276
|
+
# Gets details for a PostureDeployment.
|
277
|
+
# @param [String] name
|
278
|
+
# Required. The name of the PostureDeployment, in the format `organizations/`
|
279
|
+
# organization`/locations/global/postureDeployments/`posture_deployment_id``.
|
280
|
+
# @param [String] fields
|
281
|
+
# Selector specifying which fields to include in a partial response.
|
282
|
+
# @param [String] quota_user
|
283
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
284
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
285
|
+
# @param [Google::Apis::RequestOptions] options
|
286
|
+
# Request-specific options
|
287
|
+
#
|
288
|
+
# @yield [result, err] Result & error if block supplied
|
289
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::PostureDeployment] parsed result object
|
290
|
+
# @yieldparam err [StandardError] error object if request failed
|
291
|
+
#
|
292
|
+
# @return [Google::Apis::SecuritypostureV1::PostureDeployment]
|
293
|
+
#
|
294
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
295
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
296
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
297
|
+
def get_organization_location_posture_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
|
298
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
299
|
+
command.response_representation = Google::Apis::SecuritypostureV1::PostureDeployment::Representation
|
300
|
+
command.response_class = Google::Apis::SecuritypostureV1::PostureDeployment
|
301
|
+
command.params['name'] = name unless name.nil?
|
302
|
+
command.query['fields'] = fields unless fields.nil?
|
303
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
304
|
+
execute_or_queue_command(command, &block)
|
305
|
+
end
|
306
|
+
|
307
|
+
# Lists every PostureDeployment in a project and location.
|
308
|
+
# @param [String] parent
|
309
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
310
|
+
# /locations/global`.
|
311
|
+
# @param [String] filter
|
312
|
+
# Optional. A filter to apply to the list of postures, in the format defined in [
|
313
|
+
# AIP-160: Filtering](https://google.aip.dev/160).
|
314
|
+
# @param [Fixnum] page_size
|
315
|
+
# Optional. The maximum number of posture deployments to return. The default
|
316
|
+
# value is `500`. If you exceed the maximum value of `1000`, then the service
|
317
|
+
# uses the maximum value.
|
318
|
+
# @param [String] page_token
|
319
|
+
# Optional. A pagination token returned from a previous request to list posture
|
320
|
+
# deployments. Provide this token to retrieve the next page of results.
|
321
|
+
# @param [String] fields
|
322
|
+
# Selector specifying which fields to include in a partial response.
|
323
|
+
# @param [String] quota_user
|
324
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
325
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
326
|
+
# @param [Google::Apis::RequestOptions] options
|
327
|
+
# Request-specific options
|
328
|
+
#
|
329
|
+
# @yield [result, err] Result & error if block supplied
|
330
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::ListPostureDeploymentsResponse] parsed result object
|
331
|
+
# @yieldparam err [StandardError] error object if request failed
|
332
|
+
#
|
333
|
+
# @return [Google::Apis::SecuritypostureV1::ListPostureDeploymentsResponse]
|
334
|
+
#
|
335
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
336
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
337
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
338
|
+
def list_organization_location_posture_deployments(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
339
|
+
command = make_simple_command(:get, 'v1/{+parent}/postureDeployments', options)
|
340
|
+
command.response_representation = Google::Apis::SecuritypostureV1::ListPostureDeploymentsResponse::Representation
|
341
|
+
command.response_class = Google::Apis::SecuritypostureV1::ListPostureDeploymentsResponse
|
342
|
+
command.params['parent'] = parent unless parent.nil?
|
343
|
+
command.query['filter'] = filter unless filter.nil?
|
344
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
345
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
346
|
+
command.query['fields'] = fields unless fields.nil?
|
347
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
348
|
+
execute_or_queue_command(command, &block)
|
349
|
+
end
|
350
|
+
|
351
|
+
# Updates an existing PostureDeployment. To prevent concurrent updates from
|
352
|
+
# overwriting each other, always follow the read-modify-write pattern when you
|
353
|
+
# update a posture deployment: 1. Call GetPostureDeployment to get the current
|
354
|
+
# version of the deployment. 2. Update the fields in the deployment as needed. 3.
|
355
|
+
# Call UpdatePostureDeployment to update the deployment. Ensure that your
|
356
|
+
# request includes the `etag` value from the GetPostureDeployment response. **
|
357
|
+
# Important:** If you omit the `etag` when you call UpdatePostureDeployment,
|
358
|
+
# then the updated deployment unconditionally overwrites the existing deployment.
|
359
|
+
# @param [String] name
|
360
|
+
# Required. Identifier. The name of the posture deployment, in the format `
|
361
|
+
# organizations/`organization`/locations/global/postureDeployments/`
|
362
|
+
# deployment_id``.
|
363
|
+
# @param [Google::Apis::SecuritypostureV1::PostureDeployment] posture_deployment_object
|
364
|
+
# @param [String] update_mask
|
365
|
+
# Required. The fields in the PostureDeployment to update. You can update only
|
366
|
+
# the following fields: * PostureDeployment.posture_id * PostureDeployment.
|
367
|
+
# posture_revision_id
|
368
|
+
# @param [String] fields
|
369
|
+
# Selector specifying which fields to include in a partial response.
|
370
|
+
# @param [String] quota_user
|
371
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
372
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
373
|
+
# @param [Google::Apis::RequestOptions] options
|
374
|
+
# Request-specific options
|
375
|
+
#
|
376
|
+
# @yield [result, err] Result & error if block supplied
|
377
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
378
|
+
# @yieldparam err [StandardError] error object if request failed
|
379
|
+
#
|
380
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
381
|
+
#
|
382
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
383
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
384
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
385
|
+
def patch_organization_location_posture_deployment(name, posture_deployment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
386
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
387
|
+
command.request_representation = Google::Apis::SecuritypostureV1::PostureDeployment::Representation
|
388
|
+
command.request_object = posture_deployment_object
|
389
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
390
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
391
|
+
command.params['name'] = name unless name.nil?
|
392
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
393
|
+
command.query['fields'] = fields unless fields.nil?
|
394
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
395
|
+
execute_or_queue_command(command, &block)
|
396
|
+
end
|
397
|
+
|
398
|
+
# Gets a single revision of a PostureTemplate.
|
399
|
+
# @param [String] name
|
400
|
+
# Required. The name of the PostureTemplate, in the format `organizations/`
|
401
|
+
# organization`/locations/global/postureTemplates/`posture_template``.
|
402
|
+
# @param [String] revision_id
|
403
|
+
# Optional. The posture template revision to retrieve. If not specified, the
|
404
|
+
# most recently updated revision is retrieved.
|
405
|
+
# @param [String] fields
|
406
|
+
# Selector specifying which fields to include in a partial response.
|
407
|
+
# @param [String] quota_user
|
408
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
409
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
410
|
+
# @param [Google::Apis::RequestOptions] options
|
411
|
+
# Request-specific options
|
412
|
+
#
|
413
|
+
# @yield [result, err] Result & error if block supplied
|
414
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::PostureTemplate] parsed result object
|
415
|
+
# @yieldparam err [StandardError] error object if request failed
|
416
|
+
#
|
417
|
+
# @return [Google::Apis::SecuritypostureV1::PostureTemplate]
|
418
|
+
#
|
419
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
420
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
421
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
422
|
+
def get_organization_location_posture_template(name, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
423
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
424
|
+
command.response_representation = Google::Apis::SecuritypostureV1::PostureTemplate::Representation
|
425
|
+
command.response_class = Google::Apis::SecuritypostureV1::PostureTemplate
|
426
|
+
command.params['name'] = name unless name.nil?
|
427
|
+
command.query['revisionId'] = revision_id unless revision_id.nil?
|
428
|
+
command.query['fields'] = fields unless fields.nil?
|
429
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
430
|
+
execute_or_queue_command(command, &block)
|
431
|
+
end
|
432
|
+
|
433
|
+
# Lists every PostureTemplate in a given organization and location.
|
434
|
+
# @param [String] parent
|
435
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
436
|
+
# /locations/global`.
|
437
|
+
# @param [String] filter
|
438
|
+
# Optional. A filter to apply to the list of postures, in the format defined in [
|
439
|
+
# AIP-160: Filtering](https://google.aip.dev/160).
|
440
|
+
# @param [Fixnum] page_size
|
441
|
+
# Optional. The maximum number of posture templates to return. The default value
|
442
|
+
# is `500`. If you exceed the maximum value of `1000`, then the service uses the
|
443
|
+
# maximum value.
|
444
|
+
# @param [String] page_token
|
445
|
+
# Optional. A pagination token returned from a previous request to list posture
|
446
|
+
# templates. Provide this token to retrieve the next page of results.
|
447
|
+
# @param [String] fields
|
448
|
+
# Selector specifying which fields to include in a partial response.
|
449
|
+
# @param [String] quota_user
|
450
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
451
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
452
|
+
# @param [Google::Apis::RequestOptions] options
|
453
|
+
# Request-specific options
|
454
|
+
#
|
455
|
+
# @yield [result, err] Result & error if block supplied
|
456
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::ListPostureTemplatesResponse] parsed result object
|
457
|
+
# @yieldparam err [StandardError] error object if request failed
|
458
|
+
#
|
459
|
+
# @return [Google::Apis::SecuritypostureV1::ListPostureTemplatesResponse]
|
460
|
+
#
|
461
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
462
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
463
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
464
|
+
def list_organization_location_posture_templates(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
465
|
+
command = make_simple_command(:get, 'v1/{+parent}/postureTemplates', options)
|
466
|
+
command.response_representation = Google::Apis::SecuritypostureV1::ListPostureTemplatesResponse::Representation
|
467
|
+
command.response_class = Google::Apis::SecuritypostureV1::ListPostureTemplatesResponse
|
468
|
+
command.params['parent'] = parent unless parent.nil?
|
469
|
+
command.query['filter'] = filter unless filter.nil?
|
470
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
471
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
472
|
+
command.query['fields'] = fields unless fields.nil?
|
473
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
474
|
+
execute_or_queue_command(command, &block)
|
475
|
+
end
|
476
|
+
|
477
|
+
# Creates a new Posture.
|
478
|
+
# @param [String] parent
|
479
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
480
|
+
# /locations/global`.
|
481
|
+
# @param [Google::Apis::SecuritypostureV1::Posture] posture_object
|
482
|
+
# @param [String] posture_id
|
483
|
+
# Required. An identifier for the posture.
|
484
|
+
# @param [String] fields
|
485
|
+
# Selector specifying which fields to include in a partial response.
|
486
|
+
# @param [String] quota_user
|
487
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
488
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
489
|
+
# @param [Google::Apis::RequestOptions] options
|
490
|
+
# Request-specific options
|
491
|
+
#
|
492
|
+
# @yield [result, err] Result & error if block supplied
|
493
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
494
|
+
# @yieldparam err [StandardError] error object if request failed
|
495
|
+
#
|
496
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
497
|
+
#
|
498
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
499
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
500
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
501
|
+
def create_organization_location_posture(parent, posture_object = nil, posture_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
502
|
+
command = make_simple_command(:post, 'v1/{+parent}/postures', options)
|
503
|
+
command.request_representation = Google::Apis::SecuritypostureV1::Posture::Representation
|
504
|
+
command.request_object = posture_object
|
505
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
506
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
507
|
+
command.params['parent'] = parent unless parent.nil?
|
508
|
+
command.query['postureId'] = posture_id unless posture_id.nil?
|
509
|
+
command.query['fields'] = fields unless fields.nil?
|
510
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
511
|
+
execute_or_queue_command(command, &block)
|
512
|
+
end
|
513
|
+
|
514
|
+
# Deletes all revisions of a Posture. You can only delete a posture if none of
|
515
|
+
# its revisions are deployed.
|
516
|
+
# @param [String] name
|
517
|
+
# Required. The name of the Posture, in the format `organizations/`organization`/
|
518
|
+
# locations/global/postures/`posture_id``.
|
519
|
+
# @param [String] etag
|
520
|
+
# Optional. An opaque identifier for the current version of the posture. If you
|
521
|
+
# provide this value, then it must match the existing value. If the values don't
|
522
|
+
# match, then the request fails with an ABORTED error. If you omit this value,
|
523
|
+
# then the posture is deleted regardless of its current `etag` value.
|
524
|
+
# @param [String] fields
|
525
|
+
# Selector specifying which fields to include in a partial response.
|
526
|
+
# @param [String] quota_user
|
527
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
528
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
529
|
+
# @param [Google::Apis::RequestOptions] options
|
530
|
+
# Request-specific options
|
531
|
+
#
|
532
|
+
# @yield [result, err] Result & error if block supplied
|
533
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
534
|
+
# @yieldparam err [StandardError] error object if request failed
|
535
|
+
#
|
536
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
537
|
+
#
|
538
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
539
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
540
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
541
|
+
def delete_organization_location_posture(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block)
|
542
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
543
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
544
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
545
|
+
command.params['name'] = name unless name.nil?
|
546
|
+
command.query['etag'] = etag unless etag.nil?
|
547
|
+
command.query['fields'] = fields unless fields.nil?
|
548
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
549
|
+
execute_or_queue_command(command, &block)
|
550
|
+
end
|
551
|
+
|
552
|
+
# Extracts existing policies from an organization, folder, or project, and
|
553
|
+
# applies them to another organization, folder, or project as a Posture. If the
|
554
|
+
# other organization, folder, or project already has a posture, then the result
|
555
|
+
# of the long-running operation is an ALREADY_EXISTS error.
|
556
|
+
# @param [String] parent
|
557
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
558
|
+
# /locations/global`.
|
559
|
+
# @param [Google::Apis::SecuritypostureV1::ExtractPostureRequest] extract_posture_request_object
|
560
|
+
# @param [String] fields
|
561
|
+
# Selector specifying which fields to include in a partial response.
|
562
|
+
# @param [String] quota_user
|
563
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
564
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
565
|
+
# @param [Google::Apis::RequestOptions] options
|
566
|
+
# Request-specific options
|
567
|
+
#
|
568
|
+
# @yield [result, err] Result & error if block supplied
|
569
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
570
|
+
# @yieldparam err [StandardError] error object if request failed
|
571
|
+
#
|
572
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
573
|
+
#
|
574
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
575
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
576
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
577
|
+
def extract_posture(parent, extract_posture_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
578
|
+
command = make_simple_command(:post, 'v1/{+parent}/postures:extract', options)
|
579
|
+
command.request_representation = Google::Apis::SecuritypostureV1::ExtractPostureRequest::Representation
|
580
|
+
command.request_object = extract_posture_request_object
|
581
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
582
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
583
|
+
command.params['parent'] = parent unless parent.nil?
|
584
|
+
command.query['fields'] = fields unless fields.nil?
|
585
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
586
|
+
execute_or_queue_command(command, &block)
|
587
|
+
end
|
588
|
+
|
589
|
+
# Gets a single revision of a Posture.
|
590
|
+
# @param [String] name
|
591
|
+
# Required. The name of the Posture, in the format `organizations/`organization`/
|
592
|
+
# locations/global/postures/`posture_id``.
|
593
|
+
# @param [String] revision_id
|
594
|
+
# Optional. The posture revision to retrieve. If not specified, the most
|
595
|
+
# recently updated revision is retrieved.
|
596
|
+
# @param [String] fields
|
597
|
+
# Selector specifying which fields to include in a partial response.
|
598
|
+
# @param [String] quota_user
|
599
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
600
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
601
|
+
# @param [Google::Apis::RequestOptions] options
|
602
|
+
# Request-specific options
|
603
|
+
#
|
604
|
+
# @yield [result, err] Result & error if block supplied
|
605
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Posture] parsed result object
|
606
|
+
# @yieldparam err [StandardError] error object if request failed
|
607
|
+
#
|
608
|
+
# @return [Google::Apis::SecuritypostureV1::Posture]
|
609
|
+
#
|
610
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
611
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
612
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
613
|
+
def get_organization_location_posture(name, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
614
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
615
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Posture::Representation
|
616
|
+
command.response_class = Google::Apis::SecuritypostureV1::Posture
|
617
|
+
command.params['name'] = name unless name.nil?
|
618
|
+
command.query['revisionId'] = revision_id unless revision_id.nil?
|
619
|
+
command.query['fields'] = fields unless fields.nil?
|
620
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
621
|
+
execute_or_queue_command(command, &block)
|
622
|
+
end
|
623
|
+
|
624
|
+
# Lists the most recent revisions of all Posture resources in a specified
|
625
|
+
# organization and location.
|
626
|
+
# @param [String] parent
|
627
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
628
|
+
# /locations/global`.
|
629
|
+
# @param [String] filter
|
630
|
+
# Optional. A filter to apply to the list of postures, in the format defined in [
|
631
|
+
# AIP-160: Filtering](https://google.aip.dev/160).
|
632
|
+
# @param [Fixnum] page_size
|
633
|
+
# The maximum number of postures to return. The default value is `500`. If you
|
634
|
+
# exceed the maximum value of `1000`, then the service uses the maximum value.
|
635
|
+
# @param [String] page_token
|
636
|
+
# A pagination token returned from a previous request to list postures. Provide
|
637
|
+
# this token to retrieve the next page of results.
|
638
|
+
# @param [String] fields
|
639
|
+
# Selector specifying which fields to include in a partial response.
|
640
|
+
# @param [String] quota_user
|
641
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
642
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
643
|
+
# @param [Google::Apis::RequestOptions] options
|
644
|
+
# Request-specific options
|
645
|
+
#
|
646
|
+
# @yield [result, err] Result & error if block supplied
|
647
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::ListPosturesResponse] parsed result object
|
648
|
+
# @yieldparam err [StandardError] error object if request failed
|
649
|
+
#
|
650
|
+
# @return [Google::Apis::SecuritypostureV1::ListPosturesResponse]
|
651
|
+
#
|
652
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
653
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
654
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
655
|
+
def list_organization_location_postures(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
656
|
+
command = make_simple_command(:get, 'v1/{+parent}/postures', options)
|
657
|
+
command.response_representation = Google::Apis::SecuritypostureV1::ListPosturesResponse::Representation
|
658
|
+
command.response_class = Google::Apis::SecuritypostureV1::ListPosturesResponse
|
659
|
+
command.params['parent'] = parent unless parent.nil?
|
660
|
+
command.query['filter'] = filter unless filter.nil?
|
661
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
662
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
663
|
+
command.query['fields'] = fields unless fields.nil?
|
664
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
665
|
+
execute_or_queue_command(command, &block)
|
666
|
+
end
|
667
|
+
|
668
|
+
# Lists all revisions of a single Posture.
|
669
|
+
# @param [String] name
|
670
|
+
# Required. The name of the Posture, in the format `organizations/`organization`/
|
671
|
+
# locations/global/postures/`posture_id``.
|
672
|
+
# @param [Fixnum] page_size
|
673
|
+
# Optional. The maximum number of posture revisions to return. The default value
|
674
|
+
# is `500`. If you exceed the maximum value of `1000`, then the service uses the
|
675
|
+
# maximum value.
|
676
|
+
# @param [String] page_token
|
677
|
+
# Optional. A pagination token from a previous request to list posture revisions.
|
678
|
+
# Provide this token to retrieve the next page of results.
|
679
|
+
# @param [String] fields
|
680
|
+
# Selector specifying which fields to include in a partial response.
|
681
|
+
# @param [String] quota_user
|
682
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
683
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
684
|
+
# @param [Google::Apis::RequestOptions] options
|
685
|
+
# Request-specific options
|
686
|
+
#
|
687
|
+
# @yield [result, err] Result & error if block supplied
|
688
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::ListPostureRevisionsResponse] parsed result object
|
689
|
+
# @yieldparam err [StandardError] error object if request failed
|
690
|
+
#
|
691
|
+
# @return [Google::Apis::SecuritypostureV1::ListPostureRevisionsResponse]
|
692
|
+
#
|
693
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
694
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
695
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
696
|
+
def list_organization_location_posture_revisions(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
697
|
+
command = make_simple_command(:get, 'v1/{+name}:listRevisions', options)
|
698
|
+
command.response_representation = Google::Apis::SecuritypostureV1::ListPostureRevisionsResponse::Representation
|
699
|
+
command.response_class = Google::Apis::SecuritypostureV1::ListPostureRevisionsResponse
|
700
|
+
command.params['name'] = name unless name.nil?
|
701
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
702
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
703
|
+
command.query['fields'] = fields unless fields.nil?
|
704
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
705
|
+
execute_or_queue_command(command, &block)
|
706
|
+
end
|
707
|
+
|
708
|
+
# Updates a revision of an existing Posture. If the posture revision that you
|
709
|
+
# update is currently deployed, then a new revision of the posture is created.
|
710
|
+
# To prevent concurrent updates from overwriting each other, always follow the
|
711
|
+
# read-modify-write pattern when you update a posture: 1. Call GetPosture to get
|
712
|
+
# the current version of the posture. 2. Update the fields in the posture as
|
713
|
+
# needed. 3. Call UpdatePosture to update the posture. Ensure that your request
|
714
|
+
# includes the `etag` value from the GetPosture response. **Important:** If you
|
715
|
+
# omit the `etag` when you call UpdatePosture, then the updated posture
|
716
|
+
# unconditionally overwrites the existing posture.
|
717
|
+
# @param [String] name
|
718
|
+
# Required. Identifier. The name of the posture, in the format `organizations/`
|
719
|
+
# organization`/locations/global/postures/`posture_id``.
|
720
|
+
# @param [Google::Apis::SecuritypostureV1::Posture] posture_object
|
721
|
+
# @param [String] revision_id
|
722
|
+
# Required. The revision ID of the posture to update. If the posture revision
|
723
|
+
# that you update is currently deployed, then a new revision of the posture is
|
724
|
+
# created.
|
725
|
+
# @param [String] update_mask
|
726
|
+
# Required. The fields in the Posture to update. You can update only the
|
727
|
+
# following fields: * Posture.description * Posture.policy_sets * Posture.state
|
728
|
+
# @param [String] fields
|
729
|
+
# Selector specifying which fields to include in a partial response.
|
730
|
+
# @param [String] quota_user
|
731
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
732
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
733
|
+
# @param [Google::Apis::RequestOptions] options
|
734
|
+
# Request-specific options
|
735
|
+
#
|
736
|
+
# @yield [result, err] Result & error if block supplied
|
737
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
738
|
+
# @yieldparam err [StandardError] error object if request failed
|
739
|
+
#
|
740
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
741
|
+
#
|
742
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
743
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
744
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
745
|
+
def patch_organization_location_posture(name, posture_object = nil, revision_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
746
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
747
|
+
command.request_representation = Google::Apis::SecuritypostureV1::Posture::Representation
|
748
|
+
command.request_object = posture_object
|
749
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
750
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
751
|
+
command.params['name'] = name unless name.nil?
|
752
|
+
command.query['revisionId'] = revision_id unless revision_id.nil?
|
753
|
+
command.query['updateMask'] = update_mask unless update_mask.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
|
+
# Validates a specified infrastructure-as-code (IaC) configuration, and creates
|
760
|
+
# a Report with the validation results. Only Terraform configurations are
|
761
|
+
# supported. Only modified assets are validated.
|
762
|
+
# @param [String] parent
|
763
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
764
|
+
# /locations/global`.
|
765
|
+
# @param [Google::Apis::SecuritypostureV1::CreateIaCValidationReportRequest] create_ia_c_validation_report_request_object
|
766
|
+
# @param [String] fields
|
767
|
+
# Selector specifying which fields to include in a partial response.
|
768
|
+
# @param [String] quota_user
|
769
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
770
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
771
|
+
# @param [Google::Apis::RequestOptions] options
|
772
|
+
# Request-specific options
|
773
|
+
#
|
774
|
+
# @yield [result, err] Result & error if block supplied
|
775
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Operation] parsed result object
|
776
|
+
# @yieldparam err [StandardError] error object if request failed
|
777
|
+
#
|
778
|
+
# @return [Google::Apis::SecuritypostureV1::Operation]
|
779
|
+
#
|
780
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
781
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
782
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
783
|
+
def create_ia_c_validation_report(parent, create_ia_c_validation_report_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
784
|
+
command = make_simple_command(:post, 'v1/{+parent}/reports:createIaCValidationReport', options)
|
785
|
+
command.request_representation = Google::Apis::SecuritypostureV1::CreateIaCValidationReportRequest::Representation
|
786
|
+
command.request_object = create_ia_c_validation_report_request_object
|
787
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
|
788
|
+
command.response_class = Google::Apis::SecuritypostureV1::Operation
|
789
|
+
command.params['parent'] = parent unless parent.nil?
|
790
|
+
command.query['fields'] = fields unless fields.nil?
|
791
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
792
|
+
execute_or_queue_command(command, &block)
|
793
|
+
end
|
794
|
+
|
795
|
+
# Gets details for a Report.
|
796
|
+
# @param [String] name
|
797
|
+
# Required. The name of the report, in the format `organizations/`organization`/
|
798
|
+
# locations/global/reports/`report_id``.
|
799
|
+
# @param [String] fields
|
800
|
+
# Selector specifying which fields to include in a partial response.
|
801
|
+
# @param [String] quota_user
|
802
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
803
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
804
|
+
# @param [Google::Apis::RequestOptions] options
|
805
|
+
# Request-specific options
|
806
|
+
#
|
807
|
+
# @yield [result, err] Result & error if block supplied
|
808
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Report] parsed result object
|
809
|
+
# @yieldparam err [StandardError] error object if request failed
|
810
|
+
#
|
811
|
+
# @return [Google::Apis::SecuritypostureV1::Report]
|
812
|
+
#
|
813
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
814
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
815
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
816
|
+
def get_organization_location_report(name, fields: nil, quota_user: nil, options: nil, &block)
|
817
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
818
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Report::Representation
|
819
|
+
command.response_class = Google::Apis::SecuritypostureV1::Report
|
820
|
+
command.params['name'] = name unless name.nil?
|
821
|
+
command.query['fields'] = fields unless fields.nil?
|
822
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
823
|
+
execute_or_queue_command(command, &block)
|
824
|
+
end
|
825
|
+
|
826
|
+
# Lists every Report in a given organization and location.
|
827
|
+
# @param [String] parent
|
828
|
+
# Required. The parent resource name, in the format `organizations/`organization`
|
829
|
+
# /locations/global`.
|
830
|
+
# @param [String] filter
|
831
|
+
# Optional. A filter to apply to the list of reports, in the format defined in [
|
832
|
+
# AIP-160: Filtering](https://google.aip.dev/160).
|
833
|
+
# @param [Fixnum] page_size
|
834
|
+
# Optional. The maximum number of reports to return. The default value is `500`.
|
835
|
+
# If you exceed the maximum value of `1000`, then the service uses the maximum
|
836
|
+
# value.
|
837
|
+
# @param [String] page_token
|
838
|
+
# Optional. A pagination token returned from a previous request to list reports.
|
839
|
+
# Provide this token to retrieve the next page of results.
|
840
|
+
# @param [String] fields
|
841
|
+
# Selector specifying which fields to include in a partial response.
|
842
|
+
# @param [String] quota_user
|
843
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
844
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
845
|
+
# @param [Google::Apis::RequestOptions] options
|
846
|
+
# Request-specific options
|
847
|
+
#
|
848
|
+
# @yield [result, err] Result & error if block supplied
|
849
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::ListReportsResponse] parsed result object
|
850
|
+
# @yieldparam err [StandardError] error object if request failed
|
851
|
+
#
|
852
|
+
# @return [Google::Apis::SecuritypostureV1::ListReportsResponse]
|
853
|
+
#
|
854
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
855
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
856
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
857
|
+
def list_organization_location_reports(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
858
|
+
command = make_simple_command(:get, 'v1/{+parent}/reports', options)
|
859
|
+
command.response_representation = Google::Apis::SecuritypostureV1::ListReportsResponse::Representation
|
860
|
+
command.response_class = Google::Apis::SecuritypostureV1::ListReportsResponse
|
861
|
+
command.params['parent'] = parent unless parent.nil?
|
862
|
+
command.query['filter'] = filter unless filter.nil?
|
863
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
864
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
865
|
+
command.query['fields'] = fields unless fields.nil?
|
866
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
867
|
+
execute_or_queue_command(command, &block)
|
868
|
+
end
|
869
|
+
|
870
|
+
# Gets information about a location.
|
871
|
+
# @param [String] name
|
872
|
+
# Resource name for the location.
|
873
|
+
# @param [String] fields
|
874
|
+
# Selector specifying which fields to include in a partial response.
|
875
|
+
# @param [String] quota_user
|
876
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
877
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
878
|
+
# @param [Google::Apis::RequestOptions] options
|
879
|
+
# Request-specific options
|
880
|
+
#
|
881
|
+
# @yield [result, err] Result & error if block supplied
|
882
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::Location] parsed result object
|
883
|
+
# @yieldparam err [StandardError] error object if request failed
|
884
|
+
#
|
885
|
+
# @return [Google::Apis::SecuritypostureV1::Location]
|
886
|
+
#
|
887
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
888
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
889
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
890
|
+
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
|
891
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
892
|
+
command.response_representation = Google::Apis::SecuritypostureV1::Location::Representation
|
893
|
+
command.response_class = Google::Apis::SecuritypostureV1::Location
|
894
|
+
command.params['name'] = name unless name.nil?
|
895
|
+
command.query['fields'] = fields unless fields.nil?
|
896
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
897
|
+
execute_or_queue_command(command, &block)
|
898
|
+
end
|
899
|
+
|
900
|
+
# Lists information about the supported locations for this service.
|
901
|
+
# @param [String] name
|
902
|
+
# The resource that owns the locations collection, if applicable.
|
903
|
+
# @param [String] filter
|
904
|
+
# A filter to narrow down results to a preferred subset. The filtering language
|
905
|
+
# accepts strings like `"displayName=tokyo"`, and is documented in more detail
|
906
|
+
# in [AIP-160](https://google.aip.dev/160).
|
907
|
+
# @param [Fixnum] page_size
|
908
|
+
# The maximum number of results to return. If not set, the service selects a
|
909
|
+
# default.
|
910
|
+
# @param [String] page_token
|
911
|
+
# A page token received from the `next_page_token` field in the response. Send
|
912
|
+
# that page token to receive the subsequent page.
|
913
|
+
# @param [String] fields
|
914
|
+
# Selector specifying which fields to include in a partial response.
|
915
|
+
# @param [String] quota_user
|
916
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
917
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
918
|
+
# @param [Google::Apis::RequestOptions] options
|
919
|
+
# Request-specific options
|
920
|
+
#
|
921
|
+
# @yield [result, err] Result & error if block supplied
|
922
|
+
# @yieldparam result [Google::Apis::SecuritypostureV1::ListLocationsResponse] parsed result object
|
923
|
+
# @yieldparam err [StandardError] error object if request failed
|
924
|
+
#
|
925
|
+
# @return [Google::Apis::SecuritypostureV1::ListLocationsResponse]
|
926
|
+
#
|
927
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
928
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
929
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
930
|
+
def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
931
|
+
command = make_simple_command(:get, 'v1/{+name}/locations', options)
|
932
|
+
command.response_representation = Google::Apis::SecuritypostureV1::ListLocationsResponse::Representation
|
933
|
+
command.response_class = Google::Apis::SecuritypostureV1::ListLocationsResponse
|
934
|
+
command.params['name'] = name unless name.nil?
|
935
|
+
command.query['filter'] = filter unless filter.nil?
|
936
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
937
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
938
|
+
command.query['fields'] = fields unless fields.nil?
|
939
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
940
|
+
execute_or_queue_command(command, &block)
|
941
|
+
end
|
942
|
+
|
943
|
+
protected
|
944
|
+
|
945
|
+
def apply_command_defaults(command)
|
946
|
+
command.query['key'] = key unless key.nil?
|
947
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
948
|
+
end
|
949
|
+
end
|
950
|
+
end
|
951
|
+
end
|
952
|
+
end
|