google-cloud-cloud_security_compliance-v1 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb +75 -0
- data/lib/google/cloud/cloud_security_compliance/v1/config/client.rb +1467 -0
- data/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb +47 -0
- data/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb +88 -0
- data/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb +1379 -0
- data/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb +695 -0
- data/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb +54 -0
- data/lib/google/cloud/cloud_security_compliance/v1/config.rb +56 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb +1047 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb +47 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb +824 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb +88 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb +987 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb +925 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb +448 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb +55 -0
- data/lib/google/cloud/cloud_security_compliance/v1/deployment.rb +57 -0
- data/lib/google/cloud/cloud_security_compliance/v1/rest.rb +39 -0
- data/lib/google/cloud/cloud_security_compliance/v1/version.rb +7 -2
- data/lib/google/cloud/cloud_security_compliance/v1.rb +46 -0
- data/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb +73 -0
- data/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb +63 -0
- data/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb +117 -0
- data/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb +70 -0
- data/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb +56 -0
- data/lib/google-cloud-cloud_security_compliance-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb +638 -0
- data/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb +223 -0
- data/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb +429 -0
- data/proto_docs/google/longrunning/operations.rb +191 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- metadata +93 -9
@@ -0,0 +1,987 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/cloudsecuritycompliance/v1/deployment_pb"
|
21
|
+
require "google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module CloudSecurityCompliance
|
27
|
+
module V1
|
28
|
+
module Deployment
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the Deployment service.
|
32
|
+
#
|
33
|
+
# Deployment service allows users to manage deployments of Frameworks and
|
34
|
+
# Cloud Controls on a target resource.
|
35
|
+
#
|
36
|
+
class Client
|
37
|
+
# @private
|
38
|
+
API_VERSION = ""
|
39
|
+
|
40
|
+
# @private
|
41
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$"
|
42
|
+
|
43
|
+
include Paths
|
44
|
+
|
45
|
+
# @private
|
46
|
+
attr_reader :deployment_stub
|
47
|
+
|
48
|
+
##
|
49
|
+
# Configure the Deployment Client class.
|
50
|
+
#
|
51
|
+
# See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration}
|
52
|
+
# for a description of the configuration fields.
|
53
|
+
#
|
54
|
+
# @example
|
55
|
+
#
|
56
|
+
# # Modify the configuration for all Deployment clients
|
57
|
+
# ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.configure do |config|
|
58
|
+
# config.timeout = 10.0
|
59
|
+
# end
|
60
|
+
#
|
61
|
+
# @yield [config] Configure the Client client.
|
62
|
+
# @yieldparam config [Client::Configuration]
|
63
|
+
#
|
64
|
+
# @return [Client::Configuration]
|
65
|
+
#
|
66
|
+
def self.configure
|
67
|
+
@configure ||= begin
|
68
|
+
namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"]
|
69
|
+
parent_config = while namespace.any?
|
70
|
+
parent_name = namespace.join "::"
|
71
|
+
parent_const = const_get parent_name
|
72
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
73
|
+
namespace.pop
|
74
|
+
end
|
75
|
+
default_config = Client::Configuration.new parent_config
|
76
|
+
|
77
|
+
default_config.rpcs.create_framework_deployment.timeout = 60.0
|
78
|
+
|
79
|
+
default_config.rpcs.delete_framework_deployment.timeout = 60.0
|
80
|
+
|
81
|
+
default_config.rpcs.get_framework_deployment.timeout = 60.0
|
82
|
+
default_config.rpcs.get_framework_deployment.retry_policy = {
|
83
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
84
|
+
}
|
85
|
+
|
86
|
+
default_config.rpcs.list_framework_deployments.timeout = 60.0
|
87
|
+
default_config.rpcs.list_framework_deployments.retry_policy = {
|
88
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config.rpcs.get_cloud_control_deployment.timeout = 60.0
|
92
|
+
default_config.rpcs.get_cloud_control_deployment.retry_policy = {
|
93
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.list_cloud_control_deployments.timeout = 60.0
|
97
|
+
default_config.rpcs.list_cloud_control_deployments.retry_policy = {
|
98
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
99
|
+
}
|
100
|
+
|
101
|
+
default_config
|
102
|
+
end
|
103
|
+
yield @configure if block_given?
|
104
|
+
@configure
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# Configure the Deployment Client instance.
|
109
|
+
#
|
110
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
111
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
112
|
+
# should be made on {Client.configure}.
|
113
|
+
#
|
114
|
+
# See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration}
|
115
|
+
# for a description of the configuration fields.
|
116
|
+
#
|
117
|
+
# @yield [config] Configure the Client client.
|
118
|
+
# @yieldparam config [Client::Configuration]
|
119
|
+
#
|
120
|
+
# @return [Client::Configuration]
|
121
|
+
#
|
122
|
+
def configure
|
123
|
+
yield @config if block_given?
|
124
|
+
@config
|
125
|
+
end
|
126
|
+
|
127
|
+
##
|
128
|
+
# The effective universe domain
|
129
|
+
#
|
130
|
+
# @return [String]
|
131
|
+
#
|
132
|
+
def universe_domain
|
133
|
+
@deployment_stub.universe_domain
|
134
|
+
end
|
135
|
+
|
136
|
+
##
|
137
|
+
# Create a new Deployment REST client object.
|
138
|
+
#
|
139
|
+
# @example
|
140
|
+
#
|
141
|
+
# # Create a client using the default configuration
|
142
|
+
# client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new
|
143
|
+
#
|
144
|
+
# # Create a client using a custom configuration
|
145
|
+
# client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config|
|
146
|
+
# config.timeout = 10.0
|
147
|
+
# end
|
148
|
+
#
|
149
|
+
# @yield [config] Configure the Deployment client.
|
150
|
+
# @yieldparam config [Client::Configuration]
|
151
|
+
#
|
152
|
+
def initialize
|
153
|
+
# Create the configuration object
|
154
|
+
@config = Configuration.new Client.configure
|
155
|
+
|
156
|
+
# Yield the configuration if needed
|
157
|
+
yield @config if block_given?
|
158
|
+
|
159
|
+
# Create credentials
|
160
|
+
credentials = @config.credentials
|
161
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
162
|
+
# but only if the default endpoint does not have a region prefix.
|
163
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
164
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
165
|
+
!@config.endpoint.split(".").first.include?("-"))
|
166
|
+
credentials ||= Credentials.default scope: @config.scope,
|
167
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
168
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
169
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
170
|
+
end
|
171
|
+
|
172
|
+
@quota_project_id = @config.quota_project
|
173
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
174
|
+
|
175
|
+
@operations_client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Operations.new do |config|
|
176
|
+
config.credentials = credentials
|
177
|
+
config.quota_project = @quota_project_id
|
178
|
+
config.endpoint = @config.endpoint
|
179
|
+
config.universe_domain = @config.universe_domain
|
180
|
+
end
|
181
|
+
|
182
|
+
@deployment_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.new(
|
183
|
+
endpoint: @config.endpoint,
|
184
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
185
|
+
universe_domain: @config.universe_domain,
|
186
|
+
credentials: credentials,
|
187
|
+
logger: @config.logger
|
188
|
+
)
|
189
|
+
|
190
|
+
@deployment_stub.logger(stub: true)&.info do |entry|
|
191
|
+
entry.set_system_name
|
192
|
+
entry.set_service
|
193
|
+
entry.message = "Created client for #{entry.service}"
|
194
|
+
entry.set_credentials_fields credentials
|
195
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
196
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
197
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
198
|
+
end
|
199
|
+
|
200
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
201
|
+
config.credentials = credentials
|
202
|
+
config.quota_project = @quota_project_id
|
203
|
+
config.endpoint = @deployment_stub.endpoint
|
204
|
+
config.universe_domain = @deployment_stub.universe_domain
|
205
|
+
config.bindings_override = @config.bindings_override
|
206
|
+
config.logger = @deployment_stub.logger if config.respond_to? :logger=
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
##
|
211
|
+
# Get the associated client for long-running operations.
|
212
|
+
#
|
213
|
+
# @return [::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Operations]
|
214
|
+
#
|
215
|
+
attr_reader :operations_client
|
216
|
+
|
217
|
+
##
|
218
|
+
# Get the associated client for mix-in of the Locations.
|
219
|
+
#
|
220
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
221
|
+
#
|
222
|
+
attr_reader :location_client
|
223
|
+
|
224
|
+
##
|
225
|
+
# The logger used for request/response debug logging.
|
226
|
+
#
|
227
|
+
# @return [Logger]
|
228
|
+
#
|
229
|
+
def logger
|
230
|
+
@deployment_stub.logger
|
231
|
+
end
|
232
|
+
|
233
|
+
# Service calls
|
234
|
+
|
235
|
+
##
|
236
|
+
# Creates a new FrameworkDeployment in a given parent resource.
|
237
|
+
#
|
238
|
+
# @overload create_framework_deployment(request, options = nil)
|
239
|
+
# Pass arguments to `create_framework_deployment` via a request object, either of type
|
240
|
+
# {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest} or an equivalent Hash.
|
241
|
+
#
|
242
|
+
# @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Hash]
|
243
|
+
# A request object representing the call parameters. Required. To specify no
|
244
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
245
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
246
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
247
|
+
#
|
248
|
+
# @overload create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil)
|
249
|
+
# Pass arguments to `create_framework_deployment` via keyword arguments. Note that at
|
250
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
251
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
252
|
+
#
|
253
|
+
# @param parent [::String]
|
254
|
+
# Required. The parent resource of the FrameworkDeployment in the format:
|
255
|
+
# organizations/\\{organization}/locations/\\{location}
|
256
|
+
# Only global location is supported.
|
257
|
+
# @param framework_deployment_id [::String]
|
258
|
+
# Optional. User provided identifier. It should be unique in scope of a
|
259
|
+
# parent. This is optional and if not provided, a random UUID will be
|
260
|
+
# generated.
|
261
|
+
# @param framework_deployment [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash]
|
262
|
+
# Required. The FrameworkDeployment to be created.
|
263
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
264
|
+
# @yieldparam result [::Gapic::Operation]
|
265
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
266
|
+
#
|
267
|
+
# @return [::Gapic::Operation]
|
268
|
+
#
|
269
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
270
|
+
#
|
271
|
+
# @example Basic example
|
272
|
+
# require "google/cloud/cloud_security_compliance/v1"
|
273
|
+
#
|
274
|
+
# # Create a client object. The client can be reused for multiple calls.
|
275
|
+
# client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new
|
276
|
+
#
|
277
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
278
|
+
# request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new
|
279
|
+
#
|
280
|
+
# # Call the create_framework_deployment method.
|
281
|
+
# result = client.create_framework_deployment request
|
282
|
+
#
|
283
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
284
|
+
# # check the status of an operation, cancel it, or wait for results.
|
285
|
+
# # Here is how to wait for a response.
|
286
|
+
# result.wait_until_done! timeout: 60
|
287
|
+
# if result.response?
|
288
|
+
# p result.response
|
289
|
+
# else
|
290
|
+
# puts "No response received."
|
291
|
+
# end
|
292
|
+
#
|
293
|
+
def create_framework_deployment request, options = nil
|
294
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
295
|
+
|
296
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest
|
297
|
+
|
298
|
+
# Converts hash and nil to an options object
|
299
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
300
|
+
|
301
|
+
# Customize the options with defaults
|
302
|
+
call_metadata = @config.rpcs.create_framework_deployment.metadata.to_h
|
303
|
+
|
304
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
305
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
306
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
307
|
+
gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION,
|
308
|
+
transports_version_send: [:rest]
|
309
|
+
|
310
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
311
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
312
|
+
|
313
|
+
options.apply_defaults timeout: @config.rpcs.create_framework_deployment.timeout,
|
314
|
+
metadata: call_metadata,
|
315
|
+
retry_policy: @config.rpcs.create_framework_deployment.retry_policy
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
319
|
+
retry_policy: @config.retry_policy
|
320
|
+
|
321
|
+
@deployment_stub.create_framework_deployment request, options do |result, operation|
|
322
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
323
|
+
yield result, operation if block_given?
|
324
|
+
throw :response, result
|
325
|
+
end
|
326
|
+
rescue ::Gapic::Rest::Error => e
|
327
|
+
raise ::Google::Cloud::Error.from_error(e)
|
328
|
+
end
|
329
|
+
|
330
|
+
##
|
331
|
+
# Deletes a single FrameworkDeployment.
|
332
|
+
#
|
333
|
+
# @overload delete_framework_deployment(request, options = nil)
|
334
|
+
# Pass arguments to `delete_framework_deployment` via a request object, either of type
|
335
|
+
# {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest} or an equivalent Hash.
|
336
|
+
#
|
337
|
+
# @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Hash]
|
338
|
+
# A request object representing the call parameters. Required. To specify no
|
339
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
340
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
341
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
342
|
+
#
|
343
|
+
# @overload delete_framework_deployment(name: nil, etag: nil)
|
344
|
+
# Pass arguments to `delete_framework_deployment` via keyword arguments. Note that at
|
345
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
346
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
347
|
+
#
|
348
|
+
# @param name [::String]
|
349
|
+
# Required. name of the FrameworkDeployment to be deleted in the following
|
350
|
+
# format:
|
351
|
+
# organizations/\\{organization}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
|
352
|
+
# @param etag [::String]
|
353
|
+
# Optional. An opaque identifier for the current version of the resource.
|
354
|
+
#
|
355
|
+
# If you provide this value, then it must match the existing value. If the
|
356
|
+
# values don't match, then the request fails with an
|
357
|
+
# [ABORTED][google.rpc.Code.ABORTED] error.
|
358
|
+
#
|
359
|
+
# If you omit this value, then the resource is deleted regardless of its
|
360
|
+
# current `etag` value.
|
361
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
362
|
+
# @yieldparam result [::Gapic::Operation]
|
363
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
364
|
+
#
|
365
|
+
# @return [::Gapic::Operation]
|
366
|
+
#
|
367
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
368
|
+
#
|
369
|
+
# @example Basic example
|
370
|
+
# require "google/cloud/cloud_security_compliance/v1"
|
371
|
+
#
|
372
|
+
# # Create a client object. The client can be reused for multiple calls.
|
373
|
+
# client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new
|
374
|
+
#
|
375
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
376
|
+
# request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new
|
377
|
+
#
|
378
|
+
# # Call the delete_framework_deployment method.
|
379
|
+
# result = client.delete_framework_deployment request
|
380
|
+
#
|
381
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
382
|
+
# # check the status of an operation, cancel it, or wait for results.
|
383
|
+
# # Here is how to wait for a response.
|
384
|
+
# result.wait_until_done! timeout: 60
|
385
|
+
# if result.response?
|
386
|
+
# p result.response
|
387
|
+
# else
|
388
|
+
# puts "No response received."
|
389
|
+
# end
|
390
|
+
#
|
391
|
+
def delete_framework_deployment request, options = nil
|
392
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
393
|
+
|
394
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest
|
395
|
+
|
396
|
+
# Converts hash and nil to an options object
|
397
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
398
|
+
|
399
|
+
# Customize the options with defaults
|
400
|
+
call_metadata = @config.rpcs.delete_framework_deployment.metadata.to_h
|
401
|
+
|
402
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
403
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
404
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
405
|
+
gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION,
|
406
|
+
transports_version_send: [:rest]
|
407
|
+
|
408
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
409
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
410
|
+
|
411
|
+
options.apply_defaults timeout: @config.rpcs.delete_framework_deployment.timeout,
|
412
|
+
metadata: call_metadata,
|
413
|
+
retry_policy: @config.rpcs.delete_framework_deployment.retry_policy
|
414
|
+
|
415
|
+
options.apply_defaults timeout: @config.timeout,
|
416
|
+
metadata: @config.metadata,
|
417
|
+
retry_policy: @config.retry_policy
|
418
|
+
|
419
|
+
@deployment_stub.delete_framework_deployment request, options do |result, operation|
|
420
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
421
|
+
yield result, operation if block_given?
|
422
|
+
throw :response, result
|
423
|
+
end
|
424
|
+
rescue ::Gapic::Rest::Error => e
|
425
|
+
raise ::Google::Cloud::Error.from_error(e)
|
426
|
+
end
|
427
|
+
|
428
|
+
##
|
429
|
+
# Gets details of a single FrameworkDeployment.
|
430
|
+
#
|
431
|
+
# @overload get_framework_deployment(request, options = nil)
|
432
|
+
# Pass arguments to `get_framework_deployment` via a request object, either of type
|
433
|
+
# {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest} or an equivalent Hash.
|
434
|
+
#
|
435
|
+
# @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Hash]
|
436
|
+
# A request object representing the call parameters. Required. To specify no
|
437
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
438
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
439
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
440
|
+
#
|
441
|
+
# @overload get_framework_deployment(name: nil)
|
442
|
+
# Pass arguments to `get_framework_deployment` via keyword arguments. Note that at
|
443
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
444
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
445
|
+
#
|
446
|
+
# @param name [::String]
|
447
|
+
# Required. FrameworkDeployment name in the following format:
|
448
|
+
# organizations/\\{organization}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
|
449
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
450
|
+
# @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment]
|
451
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
452
|
+
#
|
453
|
+
# @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment]
|
454
|
+
#
|
455
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
456
|
+
#
|
457
|
+
# @example Basic example
|
458
|
+
# require "google/cloud/cloud_security_compliance/v1"
|
459
|
+
#
|
460
|
+
# # Create a client object. The client can be reused for multiple calls.
|
461
|
+
# client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new
|
462
|
+
#
|
463
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
464
|
+
# request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new
|
465
|
+
#
|
466
|
+
# # Call the get_framework_deployment method.
|
467
|
+
# result = client.get_framework_deployment request
|
468
|
+
#
|
469
|
+
# # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.
|
470
|
+
# p result
|
471
|
+
#
|
472
|
+
def get_framework_deployment request, options = nil
|
473
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
474
|
+
|
475
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest
|
476
|
+
|
477
|
+
# Converts hash and nil to an options object
|
478
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
479
|
+
|
480
|
+
# Customize the options with defaults
|
481
|
+
call_metadata = @config.rpcs.get_framework_deployment.metadata.to_h
|
482
|
+
|
483
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
484
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
485
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
486
|
+
gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION,
|
487
|
+
transports_version_send: [:rest]
|
488
|
+
|
489
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
490
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
491
|
+
|
492
|
+
options.apply_defaults timeout: @config.rpcs.get_framework_deployment.timeout,
|
493
|
+
metadata: call_metadata,
|
494
|
+
retry_policy: @config.rpcs.get_framework_deployment.retry_policy
|
495
|
+
|
496
|
+
options.apply_defaults timeout: @config.timeout,
|
497
|
+
metadata: @config.metadata,
|
498
|
+
retry_policy: @config.retry_policy
|
499
|
+
|
500
|
+
@deployment_stub.get_framework_deployment request, options do |result, operation|
|
501
|
+
yield result, operation if block_given?
|
502
|
+
end
|
503
|
+
rescue ::Gapic::Rest::Error => e
|
504
|
+
raise ::Google::Cloud::Error.from_error(e)
|
505
|
+
end
|
506
|
+
|
507
|
+
##
|
508
|
+
# Lists FrameworkDeployments in a given parent resource.
|
509
|
+
#
|
510
|
+
# @overload list_framework_deployments(request, options = nil)
|
511
|
+
# Pass arguments to `list_framework_deployments` via a request object, either of type
|
512
|
+
# {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest} or an equivalent Hash.
|
513
|
+
#
|
514
|
+
# @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Hash]
|
515
|
+
# A request object representing the call parameters. Required. To specify no
|
516
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
517
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
518
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
519
|
+
#
|
520
|
+
# @overload list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
521
|
+
# Pass arguments to `list_framework_deployments` via keyword arguments. Note that at
|
522
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
523
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
524
|
+
#
|
525
|
+
# @param parent [::String]
|
526
|
+
# Required. parent resource of the FrameworkDeployment in the format:
|
527
|
+
# organizations/\\{organization}/locations/\\{location}
|
528
|
+
# Only global location is supported.
|
529
|
+
# @param page_size [::Integer]
|
530
|
+
# Optional. Requested page size. Server may return fewer items than
|
531
|
+
# requested. If unspecified, server will pick an appropriate default.
|
532
|
+
# @param page_token [::String]
|
533
|
+
# Optional. A token identifying a page of results the server should return.
|
534
|
+
# @param filter [::String]
|
535
|
+
# Optional. Filter to be applied on the resource, defined by EBNF grammar
|
536
|
+
# https://google.aip.dev/assets/misc/ebnf-filtering.txt.
|
537
|
+
# @param order_by [::String]
|
538
|
+
# Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
|
539
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
540
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>]
|
541
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
542
|
+
#
|
543
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>]
|
544
|
+
#
|
545
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
546
|
+
#
|
547
|
+
# @example Basic example
|
548
|
+
# require "google/cloud/cloud_security_compliance/v1"
|
549
|
+
#
|
550
|
+
# # Create a client object. The client can be reused for multiple calls.
|
551
|
+
# client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new
|
552
|
+
#
|
553
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
554
|
+
# request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new
|
555
|
+
#
|
556
|
+
# # Call the list_framework_deployments method.
|
557
|
+
# result = client.list_framework_deployments request
|
558
|
+
#
|
559
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
560
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
561
|
+
# result.each do |item|
|
562
|
+
# # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.
|
563
|
+
# p item
|
564
|
+
# end
|
565
|
+
#
|
566
|
+
def list_framework_deployments request, options = nil
|
567
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
568
|
+
|
569
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest
|
570
|
+
|
571
|
+
# Converts hash and nil to an options object
|
572
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
573
|
+
|
574
|
+
# Customize the options with defaults
|
575
|
+
call_metadata = @config.rpcs.list_framework_deployments.metadata.to_h
|
576
|
+
|
577
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
578
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
|
+
gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION,
|
581
|
+
transports_version_send: [:rest]
|
582
|
+
|
583
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
584
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
585
|
+
|
586
|
+
options.apply_defaults timeout: @config.rpcs.list_framework_deployments.timeout,
|
587
|
+
metadata: call_metadata,
|
588
|
+
retry_policy: @config.rpcs.list_framework_deployments.retry_policy
|
589
|
+
|
590
|
+
options.apply_defaults timeout: @config.timeout,
|
591
|
+
metadata: @config.metadata,
|
592
|
+
retry_policy: @config.retry_policy
|
593
|
+
|
594
|
+
@deployment_stub.list_framework_deployments request, options do |result, operation|
|
595
|
+
result = ::Gapic::Rest::PagedEnumerable.new @deployment_stub, :list_framework_deployments, "framework_deployments", request, result, options
|
596
|
+
yield result, operation if block_given?
|
597
|
+
throw :response, result
|
598
|
+
end
|
599
|
+
rescue ::Gapic::Rest::Error => e
|
600
|
+
raise ::Google::Cloud::Error.from_error(e)
|
601
|
+
end
|
602
|
+
|
603
|
+
##
|
604
|
+
# Gets details of a single CloudControlDeployment.
|
605
|
+
#
|
606
|
+
# @overload get_cloud_control_deployment(request, options = nil)
|
607
|
+
# Pass arguments to `get_cloud_control_deployment` via a request object, either of type
|
608
|
+
# {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest} or an equivalent Hash.
|
609
|
+
#
|
610
|
+
# @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Hash]
|
611
|
+
# A request object representing the call parameters. Required. To specify no
|
612
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
613
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
614
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
615
|
+
#
|
616
|
+
# @overload get_cloud_control_deployment(name: nil)
|
617
|
+
# Pass arguments to `get_cloud_control_deployment` via keyword arguments. Note that at
|
618
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
619
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
620
|
+
#
|
621
|
+
# @param name [::String]
|
622
|
+
# Required. CloudControlDeployment name in the following format:
|
623
|
+
# organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/\\{cloud_control_deployment_id}
|
624
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
625
|
+
# @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment]
|
626
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
627
|
+
#
|
628
|
+
# @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment]
|
629
|
+
#
|
630
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
631
|
+
#
|
632
|
+
# @example Basic example
|
633
|
+
# require "google/cloud/cloud_security_compliance/v1"
|
634
|
+
#
|
635
|
+
# # Create a client object. The client can be reused for multiple calls.
|
636
|
+
# client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new
|
637
|
+
#
|
638
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
639
|
+
# request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new
|
640
|
+
#
|
641
|
+
# # Call the get_cloud_control_deployment method.
|
642
|
+
# result = client.get_cloud_control_deployment request
|
643
|
+
#
|
644
|
+
# # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.
|
645
|
+
# p result
|
646
|
+
#
|
647
|
+
def get_cloud_control_deployment request, options = nil
|
648
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
649
|
+
|
650
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest
|
651
|
+
|
652
|
+
# Converts hash and nil to an options object
|
653
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
654
|
+
|
655
|
+
# Customize the options with defaults
|
656
|
+
call_metadata = @config.rpcs.get_cloud_control_deployment.metadata.to_h
|
657
|
+
|
658
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
659
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
660
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
661
|
+
gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION,
|
662
|
+
transports_version_send: [:rest]
|
663
|
+
|
664
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
665
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
666
|
+
|
667
|
+
options.apply_defaults timeout: @config.rpcs.get_cloud_control_deployment.timeout,
|
668
|
+
metadata: call_metadata,
|
669
|
+
retry_policy: @config.rpcs.get_cloud_control_deployment.retry_policy
|
670
|
+
|
671
|
+
options.apply_defaults timeout: @config.timeout,
|
672
|
+
metadata: @config.metadata,
|
673
|
+
retry_policy: @config.retry_policy
|
674
|
+
|
675
|
+
@deployment_stub.get_cloud_control_deployment request, options do |result, operation|
|
676
|
+
yield result, operation if block_given?
|
677
|
+
end
|
678
|
+
rescue ::Gapic::Rest::Error => e
|
679
|
+
raise ::Google::Cloud::Error.from_error(e)
|
680
|
+
end
|
681
|
+
|
682
|
+
##
|
683
|
+
# Lists CloudControlDeployments in a given parent resource.
|
684
|
+
#
|
685
|
+
# @overload list_cloud_control_deployments(request, options = nil)
|
686
|
+
# Pass arguments to `list_cloud_control_deployments` via a request object, either of type
|
687
|
+
# {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest} or an equivalent Hash.
|
688
|
+
#
|
689
|
+
# @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Hash]
|
690
|
+
# A request object representing the call parameters. Required. To specify no
|
691
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
692
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
693
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
694
|
+
#
|
695
|
+
# @overload list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
696
|
+
# Pass arguments to `list_cloud_control_deployments` via keyword arguments. Note that at
|
697
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
698
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
699
|
+
#
|
700
|
+
# @param parent [::String]
|
701
|
+
# Required. parent resource of the CloudControlDeployment in the format:
|
702
|
+
# organizations/\\{organization}/locations/\\{location}
|
703
|
+
# Only global location is supported.
|
704
|
+
# @param page_size [::Integer]
|
705
|
+
# Optional. Requested page size. Server may return fewer items than
|
706
|
+
# requested. If unspecified, server will pick an appropriate default.
|
707
|
+
# @param page_token [::String]
|
708
|
+
# Optional. A token identifying a page of results the server should return.
|
709
|
+
# @param filter [::String]
|
710
|
+
# Optional. Filter to be applied on the resource, defined by EBNF grammar
|
711
|
+
# https://google.aip.dev/assets/misc/ebnf-filtering.txt.
|
712
|
+
# @param order_by [::String]
|
713
|
+
# Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
|
714
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
715
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>]
|
716
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
717
|
+
#
|
718
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>]
|
719
|
+
#
|
720
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
721
|
+
#
|
722
|
+
# @example Basic example
|
723
|
+
# require "google/cloud/cloud_security_compliance/v1"
|
724
|
+
#
|
725
|
+
# # Create a client object. The client can be reused for multiple calls.
|
726
|
+
# client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new
|
727
|
+
#
|
728
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
729
|
+
# request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new
|
730
|
+
#
|
731
|
+
# # Call the list_cloud_control_deployments method.
|
732
|
+
# result = client.list_cloud_control_deployments request
|
733
|
+
#
|
734
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
735
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
736
|
+
# result.each do |item|
|
737
|
+
# # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.
|
738
|
+
# p item
|
739
|
+
# end
|
740
|
+
#
|
741
|
+
def list_cloud_control_deployments request, options = nil
|
742
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
743
|
+
|
744
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest
|
745
|
+
|
746
|
+
# Converts hash and nil to an options object
|
747
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
748
|
+
|
749
|
+
# Customize the options with defaults
|
750
|
+
call_metadata = @config.rpcs.list_cloud_control_deployments.metadata.to_h
|
751
|
+
|
752
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
753
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
754
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
755
|
+
gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION,
|
756
|
+
transports_version_send: [:rest]
|
757
|
+
|
758
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
759
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
760
|
+
|
761
|
+
options.apply_defaults timeout: @config.rpcs.list_cloud_control_deployments.timeout,
|
762
|
+
metadata: call_metadata,
|
763
|
+
retry_policy: @config.rpcs.list_cloud_control_deployments.retry_policy
|
764
|
+
|
765
|
+
options.apply_defaults timeout: @config.timeout,
|
766
|
+
metadata: @config.metadata,
|
767
|
+
retry_policy: @config.retry_policy
|
768
|
+
|
769
|
+
@deployment_stub.list_cloud_control_deployments request, options do |result, operation|
|
770
|
+
result = ::Gapic::Rest::PagedEnumerable.new @deployment_stub, :list_cloud_control_deployments, "cloud_control_deployments", request, result, options
|
771
|
+
yield result, operation if block_given?
|
772
|
+
throw :response, result
|
773
|
+
end
|
774
|
+
rescue ::Gapic::Rest::Error => e
|
775
|
+
raise ::Google::Cloud::Error.from_error(e)
|
776
|
+
end
|
777
|
+
|
778
|
+
##
|
779
|
+
# Configuration class for the Deployment REST API.
|
780
|
+
#
|
781
|
+
# This class represents the configuration for Deployment REST,
|
782
|
+
# providing control over timeouts, retry behavior, logging, transport
|
783
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
784
|
+
# applied individually to specific RPCs. See
|
785
|
+
# {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration::Rpcs}
|
786
|
+
# for a list of RPCs that can be configured independently.
|
787
|
+
#
|
788
|
+
# Configuration can be applied globally to all clients, or to a single client
|
789
|
+
# on construction.
|
790
|
+
#
|
791
|
+
# @example
|
792
|
+
#
|
793
|
+
# # Modify the global config, setting the timeout for
|
794
|
+
# # create_framework_deployment to 20 seconds,
|
795
|
+
# # and all remaining timeouts to 10 seconds.
|
796
|
+
# ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.configure do |config|
|
797
|
+
# config.timeout = 10.0
|
798
|
+
# config.rpcs.create_framework_deployment.timeout = 20.0
|
799
|
+
# end
|
800
|
+
#
|
801
|
+
# # Apply the above configuration only to a new client.
|
802
|
+
# client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config|
|
803
|
+
# config.timeout = 10.0
|
804
|
+
# config.rpcs.create_framework_deployment.timeout = 20.0
|
805
|
+
# end
|
806
|
+
#
|
807
|
+
# @!attribute [rw] endpoint
|
808
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
809
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
810
|
+
# @return [::String,nil]
|
811
|
+
# @!attribute [rw] credentials
|
812
|
+
# Credentials to send with calls. You may provide any of the following types:
|
813
|
+
# * (`String`) The path to a service account key file in JSON format
|
814
|
+
# * (`Hash`) A service account key as a Hash
|
815
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
816
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
817
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
818
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
819
|
+
# * (`nil`) indicating no credentials
|
820
|
+
#
|
821
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
822
|
+
# external source for authentication to Google Cloud, you must validate it before
|
823
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
824
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
825
|
+
# For more information, refer to [Validate credential configurations from external
|
826
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
827
|
+
# @return [::Object]
|
828
|
+
# @!attribute [rw] scope
|
829
|
+
# The OAuth scopes
|
830
|
+
# @return [::Array<::String>]
|
831
|
+
# @!attribute [rw] lib_name
|
832
|
+
# The library name as recorded in instrumentation and logging
|
833
|
+
# @return [::String]
|
834
|
+
# @!attribute [rw] lib_version
|
835
|
+
# The library version as recorded in instrumentation and logging
|
836
|
+
# @return [::String]
|
837
|
+
# @!attribute [rw] timeout
|
838
|
+
# The call timeout in seconds.
|
839
|
+
# @return [::Numeric]
|
840
|
+
# @!attribute [rw] metadata
|
841
|
+
# Additional headers to be sent with the call.
|
842
|
+
# @return [::Hash{::Symbol=>::String}]
|
843
|
+
# @!attribute [rw] retry_policy
|
844
|
+
# The retry policy. The value is a hash with the following keys:
|
845
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
846
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
847
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
848
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
849
|
+
# trigger a retry.
|
850
|
+
# @return [::Hash]
|
851
|
+
# @!attribute [rw] quota_project
|
852
|
+
# A separate project against which to charge quota.
|
853
|
+
# @return [::String]
|
854
|
+
# @!attribute [rw] universe_domain
|
855
|
+
# The universe domain within which to make requests. This determines the
|
856
|
+
# default endpoint URL. The default value of nil uses the environment
|
857
|
+
# universe (usually the default "googleapis.com" universe).
|
858
|
+
# @return [::String,nil]
|
859
|
+
# @!attribute [rw] logger
|
860
|
+
# A custom logger to use for request/response debug logging, or the value
|
861
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
862
|
+
# explicitly disable logging.
|
863
|
+
# @return [::Logger,:default,nil]
|
864
|
+
#
|
865
|
+
class Configuration
|
866
|
+
extend ::Gapic::Config
|
867
|
+
|
868
|
+
# @private
|
869
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
870
|
+
DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com"
|
871
|
+
|
872
|
+
config_attr :endpoint, nil, ::String, nil
|
873
|
+
config_attr :credentials, nil do |value|
|
874
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
875
|
+
allowed.any? { |klass| klass === value }
|
876
|
+
end
|
877
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
878
|
+
config_attr :lib_name, nil, ::String, nil
|
879
|
+
config_attr :lib_version, nil, ::String, nil
|
880
|
+
config_attr :timeout, nil, ::Numeric, nil
|
881
|
+
config_attr :metadata, nil, ::Hash, nil
|
882
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
883
|
+
config_attr :quota_project, nil, ::String, nil
|
884
|
+
config_attr :universe_domain, nil, ::String, nil
|
885
|
+
|
886
|
+
# @private
|
887
|
+
# Overrides for http bindings for the RPCs of this service
|
888
|
+
# are only used when this service is used as mixin, and only
|
889
|
+
# by the host service.
|
890
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
891
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
892
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
893
|
+
|
894
|
+
# @private
|
895
|
+
def initialize parent_config = nil
|
896
|
+
@parent_config = parent_config unless parent_config.nil?
|
897
|
+
|
898
|
+
yield self if block_given?
|
899
|
+
end
|
900
|
+
|
901
|
+
##
|
902
|
+
# Configurations for individual RPCs
|
903
|
+
# @return [Rpcs]
|
904
|
+
#
|
905
|
+
def rpcs
|
906
|
+
@rpcs ||= begin
|
907
|
+
parent_rpcs = nil
|
908
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
909
|
+
Rpcs.new parent_rpcs
|
910
|
+
end
|
911
|
+
end
|
912
|
+
|
913
|
+
##
|
914
|
+
# Configuration RPC class for the Deployment API.
|
915
|
+
#
|
916
|
+
# Includes fields providing the configuration for each RPC in this service.
|
917
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
918
|
+
# the following configuration fields:
|
919
|
+
#
|
920
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
921
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
922
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
923
|
+
# include the following keys:
|
924
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
925
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
926
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
927
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
928
|
+
# trigger a retry.
|
929
|
+
#
|
930
|
+
class Rpcs
|
931
|
+
##
|
932
|
+
# RPC-specific configuration for `create_framework_deployment`
|
933
|
+
# @return [::Gapic::Config::Method]
|
934
|
+
#
|
935
|
+
attr_reader :create_framework_deployment
|
936
|
+
##
|
937
|
+
# RPC-specific configuration for `delete_framework_deployment`
|
938
|
+
# @return [::Gapic::Config::Method]
|
939
|
+
#
|
940
|
+
attr_reader :delete_framework_deployment
|
941
|
+
##
|
942
|
+
# RPC-specific configuration for `get_framework_deployment`
|
943
|
+
# @return [::Gapic::Config::Method]
|
944
|
+
#
|
945
|
+
attr_reader :get_framework_deployment
|
946
|
+
##
|
947
|
+
# RPC-specific configuration for `list_framework_deployments`
|
948
|
+
# @return [::Gapic::Config::Method]
|
949
|
+
#
|
950
|
+
attr_reader :list_framework_deployments
|
951
|
+
##
|
952
|
+
# RPC-specific configuration for `get_cloud_control_deployment`
|
953
|
+
# @return [::Gapic::Config::Method]
|
954
|
+
#
|
955
|
+
attr_reader :get_cloud_control_deployment
|
956
|
+
##
|
957
|
+
# RPC-specific configuration for `list_cloud_control_deployments`
|
958
|
+
# @return [::Gapic::Config::Method]
|
959
|
+
#
|
960
|
+
attr_reader :list_cloud_control_deployments
|
961
|
+
|
962
|
+
# @private
|
963
|
+
def initialize parent_rpcs = nil
|
964
|
+
create_framework_deployment_config = parent_rpcs.create_framework_deployment if parent_rpcs.respond_to? :create_framework_deployment
|
965
|
+
@create_framework_deployment = ::Gapic::Config::Method.new create_framework_deployment_config
|
966
|
+
delete_framework_deployment_config = parent_rpcs.delete_framework_deployment if parent_rpcs.respond_to? :delete_framework_deployment
|
967
|
+
@delete_framework_deployment = ::Gapic::Config::Method.new delete_framework_deployment_config
|
968
|
+
get_framework_deployment_config = parent_rpcs.get_framework_deployment if parent_rpcs.respond_to? :get_framework_deployment
|
969
|
+
@get_framework_deployment = ::Gapic::Config::Method.new get_framework_deployment_config
|
970
|
+
list_framework_deployments_config = parent_rpcs.list_framework_deployments if parent_rpcs.respond_to? :list_framework_deployments
|
971
|
+
@list_framework_deployments = ::Gapic::Config::Method.new list_framework_deployments_config
|
972
|
+
get_cloud_control_deployment_config = parent_rpcs.get_cloud_control_deployment if parent_rpcs.respond_to? :get_cloud_control_deployment
|
973
|
+
@get_cloud_control_deployment = ::Gapic::Config::Method.new get_cloud_control_deployment_config
|
974
|
+
list_cloud_control_deployments_config = parent_rpcs.list_cloud_control_deployments if parent_rpcs.respond_to? :list_cloud_control_deployments
|
975
|
+
@list_cloud_control_deployments = ::Gapic::Config::Method.new list_cloud_control_deployments_config
|
976
|
+
|
977
|
+
yield self if block_given?
|
978
|
+
end
|
979
|
+
end
|
980
|
+
end
|
981
|
+
end
|
982
|
+
end
|
983
|
+
end
|
984
|
+
end
|
985
|
+
end
|
986
|
+
end
|
987
|
+
end
|