google-cloud-security_center-v1p1beta1 0.7.1 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +15 -33
- data/README.md +1 -1
- data/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb +615 -174
- data/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb +149 -37
- data/lib/google/cloud/security_center/v1p1beta1/version.rb +1 -1
- data/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb +2 -2
- data/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb +2 -2
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb +1 -1
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +5 -5
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all SecurityCenter clients
|
47
|
+
# ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -75,82 +74,52 @@ module Google
|
|
75
74
|
|
76
75
|
default_config.rpcs.get_iam_policy.timeout = 60.0
|
77
76
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
78
|
-
initial_delay: 0.1,
|
79
|
-
max_delay: 60.0,
|
80
|
-
multiplier: 1.3,
|
81
|
-
retry_codes: [4, 14]
|
77
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
82
78
|
}
|
83
79
|
|
84
80
|
default_config.rpcs.get_notification_config.timeout = 60.0
|
85
81
|
default_config.rpcs.get_notification_config.retry_policy = {
|
86
|
-
initial_delay: 0.1,
|
87
|
-
max_delay: 60.0,
|
88
|
-
multiplier: 1.3,
|
89
|
-
retry_codes: [4, 14]
|
82
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
90
83
|
}
|
91
84
|
|
92
85
|
default_config.rpcs.get_organization_settings.timeout = 60.0
|
93
86
|
default_config.rpcs.get_organization_settings.retry_policy = {
|
94
|
-
initial_delay: 0.1,
|
95
|
-
max_delay: 60.0,
|
96
|
-
multiplier: 1.3,
|
97
|
-
retry_codes: [4, 14]
|
87
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
98
88
|
}
|
99
89
|
|
100
90
|
default_config.rpcs.get_source.timeout = 60.0
|
101
91
|
default_config.rpcs.get_source.retry_policy = {
|
102
|
-
initial_delay: 0.1,
|
103
|
-
max_delay: 60.0,
|
104
|
-
multiplier: 1.3,
|
105
|
-
retry_codes: [4, 14]
|
92
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
106
93
|
}
|
107
94
|
|
108
95
|
default_config.rpcs.group_assets.timeout = 480.0
|
109
96
|
default_config.rpcs.group_assets.retry_policy = {
|
110
|
-
initial_delay: 0.1,
|
111
|
-
max_delay: 60.0,
|
112
|
-
multiplier: 1.3,
|
113
|
-
retry_codes: [4, 14]
|
97
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
114
98
|
}
|
115
99
|
|
116
100
|
default_config.rpcs.group_findings.timeout = 480.0
|
117
101
|
default_config.rpcs.group_findings.retry_policy = {
|
118
|
-
initial_delay: 0.1,
|
119
|
-
max_delay: 60.0,
|
120
|
-
multiplier: 1.3,
|
121
|
-
retry_codes: [4, 14]
|
102
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
122
103
|
}
|
123
104
|
|
124
105
|
default_config.rpcs.list_assets.timeout = 480.0
|
125
106
|
default_config.rpcs.list_assets.retry_policy = {
|
126
|
-
initial_delay: 0.1,
|
127
|
-
max_delay: 60.0,
|
128
|
-
multiplier: 1.3,
|
129
|
-
retry_codes: [4, 14]
|
107
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
130
108
|
}
|
131
109
|
|
132
110
|
default_config.rpcs.list_findings.timeout = 480.0
|
133
111
|
default_config.rpcs.list_findings.retry_policy = {
|
134
|
-
initial_delay: 0.1,
|
135
|
-
max_delay: 60.0,
|
136
|
-
multiplier: 1.3,
|
137
|
-
retry_codes: [4, 14]
|
112
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
138
113
|
}
|
139
114
|
|
140
115
|
default_config.rpcs.list_notification_configs.timeout = 60.0
|
141
116
|
default_config.rpcs.list_notification_configs.retry_policy = {
|
142
|
-
initial_delay: 0.1,
|
143
|
-
max_delay: 60.0,
|
144
|
-
multiplier: 1.3,
|
145
|
-
retry_codes: [4, 14]
|
117
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
146
118
|
}
|
147
119
|
|
148
120
|
default_config.rpcs.list_sources.timeout = 60.0
|
149
121
|
default_config.rpcs.list_sources.retry_policy = {
|
150
|
-
initial_delay: 0.1,
|
151
|
-
max_delay: 60.0,
|
152
|
-
multiplier: 1.3,
|
153
|
-
retry_codes: [4, 14]
|
122
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
154
123
|
}
|
155
124
|
|
156
125
|
default_config.rpcs.run_asset_discovery.timeout = 60.0
|
@@ -161,10 +130,7 @@ module Google
|
|
161
130
|
|
162
131
|
default_config.rpcs.test_iam_permissions.timeout = 60.0
|
163
132
|
default_config.rpcs.test_iam_permissions.retry_policy = {
|
164
|
-
initial_delay: 0.1,
|
165
|
-
max_delay: 60.0,
|
166
|
-
multiplier: 1.3,
|
167
|
-
retry_codes: [4, 14]
|
133
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
168
134
|
}
|
169
135
|
|
170
136
|
default_config.rpcs.update_finding.timeout = 60.0
|
@@ -206,19 +172,15 @@ module Google
|
|
206
172
|
##
|
207
173
|
# Create a new SecurityCenter client object.
|
208
174
|
#
|
209
|
-
#
|
210
|
-
#
|
211
|
-
# To create a new SecurityCenter client with the default
|
212
|
-
# configuration:
|
213
|
-
#
|
214
|
-
# client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
175
|
+
# @example
|
215
176
|
#
|
216
|
-
#
|
217
|
-
#
|
177
|
+
# # Create a client using the default configuration
|
178
|
+
# client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
218
179
|
#
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
180
|
+
# # Create a client using a custom configuration
|
181
|
+
# client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config|
|
182
|
+
# config.timeout = 10.0
|
183
|
+
# end
|
222
184
|
#
|
223
185
|
# @yield [config] Configure the SecurityCenter client.
|
224
186
|
# @yieldparam config [Client::Configuration]
|
@@ -238,14 +200,13 @@ module Google
|
|
238
200
|
|
239
201
|
# Create credentials
|
240
202
|
credentials = @config.credentials
|
241
|
-
# Use self-signed JWT if the
|
203
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
242
204
|
# but only if the default endpoint does not have a region prefix.
|
243
|
-
enable_self_signed_jwt = @config.
|
244
|
-
@config.endpoint == Client.configure.endpoint &&
|
205
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
245
206
|
!@config.endpoint.split(".").first.include?("-")
|
246
207
|
credentials ||= Credentials.default scope: @config.scope,
|
247
208
|
enable_self_signed_jwt: enable_self_signed_jwt
|
248
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
209
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
249
210
|
credentials = Credentials.new credentials, scope: @config.scope
|
250
211
|
end
|
251
212
|
@quota_project_id = @config.quota_project
|
@@ -253,6 +214,7 @@ module Google
|
|
253
214
|
|
254
215
|
@operations_client = Operations.new do |config|
|
255
216
|
config.credentials = credentials
|
217
|
+
config.quota_project = @quota_project_id
|
256
218
|
config.endpoint = @config.endpoint
|
257
219
|
end
|
258
220
|
|
@@ -307,6 +269,21 @@ module Google
|
|
307
269
|
#
|
308
270
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
309
271
|
#
|
272
|
+
# @example Basic example
|
273
|
+
# require "google/cloud/security_center/v1p1beta1"
|
274
|
+
#
|
275
|
+
# # Create a client object. The client can be reused for multiple calls.
|
276
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
277
|
+
#
|
278
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
279
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new
|
280
|
+
#
|
281
|
+
# # Call the create_source method.
|
282
|
+
# result = client.create_source request
|
283
|
+
#
|
284
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source.
|
285
|
+
# p result
|
286
|
+
#
|
310
287
|
def create_source request, options = nil
|
311
288
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
312
289
|
|
@@ -324,16 +301,20 @@ module Google
|
|
324
301
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
325
302
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
326
303
|
|
327
|
-
header_params = {
|
328
|
-
|
329
|
-
|
304
|
+
header_params = {}
|
305
|
+
if request.parent
|
306
|
+
header_params["parent"] = request.parent
|
307
|
+
end
|
308
|
+
|
330
309
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
331
310
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
332
311
|
|
333
312
|
options.apply_defaults timeout: @config.rpcs.create_source.timeout,
|
334
313
|
metadata: metadata,
|
335
314
|
retry_policy: @config.rpcs.create_source.retry_policy
|
336
|
-
|
315
|
+
|
316
|
+
options.apply_defaults timeout: @config.timeout,
|
317
|
+
metadata: @config.metadata,
|
337
318
|
retry_policy: @config.retry_policy
|
338
319
|
|
339
320
|
@security_center_stub.call_rpc :create_source, request, options: options do |response, operation|
|
@@ -380,6 +361,21 @@ module Google
|
|
380
361
|
#
|
381
362
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
382
363
|
#
|
364
|
+
# @example Basic example
|
365
|
+
# require "google/cloud/security_center/v1p1beta1"
|
366
|
+
#
|
367
|
+
# # Create a client object. The client can be reused for multiple calls.
|
368
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
369
|
+
#
|
370
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
371
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new
|
372
|
+
#
|
373
|
+
# # Call the create_finding method.
|
374
|
+
# result = client.create_finding request
|
375
|
+
#
|
376
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding.
|
377
|
+
# p result
|
378
|
+
#
|
383
379
|
def create_finding request, options = nil
|
384
380
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
385
381
|
|
@@ -397,16 +393,20 @@ module Google
|
|
397
393
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
398
394
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
399
395
|
|
400
|
-
header_params = {
|
401
|
-
|
402
|
-
|
396
|
+
header_params = {}
|
397
|
+
if request.parent
|
398
|
+
header_params["parent"] = request.parent
|
399
|
+
end
|
400
|
+
|
403
401
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
404
402
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
405
403
|
|
406
404
|
options.apply_defaults timeout: @config.rpcs.create_finding.timeout,
|
407
405
|
metadata: metadata,
|
408
406
|
retry_policy: @config.rpcs.create_finding.retry_policy
|
409
|
-
|
407
|
+
|
408
|
+
options.apply_defaults timeout: @config.timeout,
|
409
|
+
metadata: @config.metadata,
|
410
410
|
retry_policy: @config.retry_policy
|
411
411
|
|
412
412
|
@security_center_stub.call_rpc :create_finding, request, options: options do |response, operation|
|
@@ -454,6 +454,21 @@ module Google
|
|
454
454
|
#
|
455
455
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
456
456
|
#
|
457
|
+
# @example Basic example
|
458
|
+
# require "google/cloud/security_center/v1p1beta1"
|
459
|
+
#
|
460
|
+
# # Create a client object. The client can be reused for multiple calls.
|
461
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
462
|
+
#
|
463
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
464
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new
|
465
|
+
#
|
466
|
+
# # Call the create_notification_config method.
|
467
|
+
# result = client.create_notification_config request
|
468
|
+
#
|
469
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
|
470
|
+
# p result
|
471
|
+
#
|
457
472
|
def create_notification_config request, options = nil
|
458
473
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
459
474
|
|
@@ -471,16 +486,20 @@ module Google
|
|
471
486
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
472
487
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
473
488
|
|
474
|
-
header_params = {
|
475
|
-
|
476
|
-
|
489
|
+
header_params = {}
|
490
|
+
if request.parent
|
491
|
+
header_params["parent"] = request.parent
|
492
|
+
end
|
493
|
+
|
477
494
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
478
495
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
479
496
|
|
480
497
|
options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout,
|
481
498
|
metadata: metadata,
|
482
499
|
retry_policy: @config.rpcs.create_notification_config.retry_policy
|
483
|
-
|
500
|
+
|
501
|
+
options.apply_defaults timeout: @config.timeout,
|
502
|
+
metadata: @config.metadata,
|
484
503
|
retry_policy: @config.retry_policy
|
485
504
|
|
486
505
|
@security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation|
|
@@ -521,6 +540,21 @@ module Google
|
|
521
540
|
#
|
522
541
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
523
542
|
#
|
543
|
+
# @example Basic example
|
544
|
+
# require "google/cloud/security_center/v1p1beta1"
|
545
|
+
#
|
546
|
+
# # Create a client object. The client can be reused for multiple calls.
|
547
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
548
|
+
#
|
549
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
550
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new
|
551
|
+
#
|
552
|
+
# # Call the delete_notification_config method.
|
553
|
+
# result = client.delete_notification_config request
|
554
|
+
#
|
555
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
556
|
+
# p result
|
557
|
+
#
|
524
558
|
def delete_notification_config request, options = nil
|
525
559
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
526
560
|
|
@@ -538,16 +572,20 @@ module Google
|
|
538
572
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
539
573
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
540
574
|
|
541
|
-
header_params = {
|
542
|
-
|
543
|
-
|
575
|
+
header_params = {}
|
576
|
+
if request.name
|
577
|
+
header_params["name"] = request.name
|
578
|
+
end
|
579
|
+
|
544
580
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
545
581
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
546
582
|
|
547
583
|
options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout,
|
548
584
|
metadata: metadata,
|
549
585
|
retry_policy: @config.rpcs.delete_notification_config.retry_policy
|
550
|
-
|
586
|
+
|
587
|
+
options.apply_defaults timeout: @config.timeout,
|
588
|
+
metadata: @config.metadata,
|
551
589
|
retry_policy: @config.retry_policy
|
552
590
|
|
553
591
|
@security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation|
|
@@ -591,6 +629,21 @@ module Google
|
|
591
629
|
#
|
592
630
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
593
631
|
#
|
632
|
+
# @example Basic example
|
633
|
+
# require "google/cloud/security_center/v1p1beta1"
|
634
|
+
#
|
635
|
+
# # Create a client object. The client can be reused for multiple calls.
|
636
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
637
|
+
#
|
638
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
639
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
640
|
+
#
|
641
|
+
# # Call the get_iam_policy method.
|
642
|
+
# result = client.get_iam_policy request
|
643
|
+
#
|
644
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
645
|
+
# p result
|
646
|
+
#
|
594
647
|
def get_iam_policy request, options = nil
|
595
648
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
596
649
|
|
@@ -608,16 +661,20 @@ module Google
|
|
608
661
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
609
662
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
610
663
|
|
611
|
-
header_params = {
|
612
|
-
|
613
|
-
|
664
|
+
header_params = {}
|
665
|
+
if request.resource
|
666
|
+
header_params["resource"] = request.resource
|
667
|
+
end
|
668
|
+
|
614
669
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
615
670
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
616
671
|
|
617
672
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
618
673
|
metadata: metadata,
|
619
674
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
620
|
-
|
675
|
+
|
676
|
+
options.apply_defaults timeout: @config.timeout,
|
677
|
+
metadata: @config.metadata,
|
621
678
|
retry_policy: @config.retry_policy
|
622
679
|
|
623
680
|
@security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -658,6 +715,21 @@ module Google
|
|
658
715
|
#
|
659
716
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
660
717
|
#
|
718
|
+
# @example Basic example
|
719
|
+
# require "google/cloud/security_center/v1p1beta1"
|
720
|
+
#
|
721
|
+
# # Create a client object. The client can be reused for multiple calls.
|
722
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
723
|
+
#
|
724
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
725
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new
|
726
|
+
#
|
727
|
+
# # Call the get_notification_config method.
|
728
|
+
# result = client.get_notification_config request
|
729
|
+
#
|
730
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
|
731
|
+
# p result
|
732
|
+
#
|
661
733
|
def get_notification_config request, options = nil
|
662
734
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
663
735
|
|
@@ -675,16 +747,20 @@ module Google
|
|
675
747
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
676
748
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
677
749
|
|
678
|
-
header_params = {
|
679
|
-
|
680
|
-
|
750
|
+
header_params = {}
|
751
|
+
if request.name
|
752
|
+
header_params["name"] = request.name
|
753
|
+
end
|
754
|
+
|
681
755
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
682
756
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
683
757
|
|
684
758
|
options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout,
|
685
759
|
metadata: metadata,
|
686
760
|
retry_policy: @config.rpcs.get_notification_config.retry_policy
|
687
|
-
|
761
|
+
|
762
|
+
options.apply_defaults timeout: @config.timeout,
|
763
|
+
metadata: @config.metadata,
|
688
764
|
retry_policy: @config.retry_policy
|
689
765
|
|
690
766
|
@security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation|
|
@@ -725,6 +801,21 @@ module Google
|
|
725
801
|
#
|
726
802
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
727
803
|
#
|
804
|
+
# @example Basic example
|
805
|
+
# require "google/cloud/security_center/v1p1beta1"
|
806
|
+
#
|
807
|
+
# # Create a client object. The client can be reused for multiple calls.
|
808
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
809
|
+
#
|
810
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
811
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new
|
812
|
+
#
|
813
|
+
# # Call the get_organization_settings method.
|
814
|
+
# result = client.get_organization_settings request
|
815
|
+
#
|
816
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.
|
817
|
+
# p result
|
818
|
+
#
|
728
819
|
def get_organization_settings request, options = nil
|
729
820
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
730
821
|
|
@@ -742,16 +833,20 @@ module Google
|
|
742
833
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
743
834
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
744
835
|
|
745
|
-
header_params = {
|
746
|
-
|
747
|
-
|
836
|
+
header_params = {}
|
837
|
+
if request.name
|
838
|
+
header_params["name"] = request.name
|
839
|
+
end
|
840
|
+
|
748
841
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
749
842
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
750
843
|
|
751
844
|
options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout,
|
752
845
|
metadata: metadata,
|
753
846
|
retry_policy: @config.rpcs.get_organization_settings.retry_policy
|
754
|
-
|
847
|
+
|
848
|
+
options.apply_defaults timeout: @config.timeout,
|
849
|
+
metadata: @config.metadata,
|
755
850
|
retry_policy: @config.retry_policy
|
756
851
|
|
757
852
|
@security_center_stub.call_rpc :get_organization_settings, request, options: options do |response, operation|
|
@@ -792,6 +887,21 @@ module Google
|
|
792
887
|
#
|
793
888
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
794
889
|
#
|
890
|
+
# @example Basic example
|
891
|
+
# require "google/cloud/security_center/v1p1beta1"
|
892
|
+
#
|
893
|
+
# # Create a client object. The client can be reused for multiple calls.
|
894
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
895
|
+
#
|
896
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
897
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new
|
898
|
+
#
|
899
|
+
# # Call the get_source method.
|
900
|
+
# result = client.get_source request
|
901
|
+
#
|
902
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source.
|
903
|
+
# p result
|
904
|
+
#
|
795
905
|
def get_source request, options = nil
|
796
906
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
797
907
|
|
@@ -809,16 +919,20 @@ module Google
|
|
809
919
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
810
920
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
811
921
|
|
812
|
-
header_params = {
|
813
|
-
|
814
|
-
|
922
|
+
header_params = {}
|
923
|
+
if request.name
|
924
|
+
header_params["name"] = request.name
|
925
|
+
end
|
926
|
+
|
815
927
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
816
928
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
817
929
|
|
818
930
|
options.apply_defaults timeout: @config.rpcs.get_source.timeout,
|
819
931
|
metadata: metadata,
|
820
932
|
retry_policy: @config.rpcs.get_source.retry_policy
|
821
|
-
|
933
|
+
|
934
|
+
options.apply_defaults timeout: @config.timeout,
|
935
|
+
metadata: @config.metadata,
|
822
936
|
retry_policy: @config.retry_policy
|
823
937
|
|
824
938
|
@security_center_stub.call_rpc :get_source, request, options: options do |response, operation|
|
@@ -983,6 +1097,27 @@ module Google
|
|
983
1097
|
#
|
984
1098
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
985
1099
|
#
|
1100
|
+
# @example Basic example
|
1101
|
+
# require "google/cloud/security_center/v1p1beta1"
|
1102
|
+
#
|
1103
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1104
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
1105
|
+
#
|
1106
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1107
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new
|
1108
|
+
#
|
1109
|
+
# # Call the group_assets method.
|
1110
|
+
# result = client.group_assets request
|
1111
|
+
#
|
1112
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1113
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1114
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1115
|
+
# # methods are also available for managing paging directly.
|
1116
|
+
# result.each do |response|
|
1117
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult.
|
1118
|
+
# p response
|
1119
|
+
# end
|
1120
|
+
#
|
986
1121
|
def group_assets request, options = nil
|
987
1122
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
988
1123
|
|
@@ -1000,16 +1135,20 @@ module Google
|
|
1000
1135
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1001
1136
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1002
1137
|
|
1003
|
-
header_params = {
|
1004
|
-
|
1005
|
-
|
1138
|
+
header_params = {}
|
1139
|
+
if request.parent
|
1140
|
+
header_params["parent"] = request.parent
|
1141
|
+
end
|
1142
|
+
|
1006
1143
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1007
1144
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1008
1145
|
|
1009
1146
|
options.apply_defaults timeout: @config.rpcs.group_assets.timeout,
|
1010
1147
|
metadata: metadata,
|
1011
1148
|
retry_policy: @config.rpcs.group_assets.retry_policy
|
1012
|
-
|
1149
|
+
|
1150
|
+
options.apply_defaults timeout: @config.timeout,
|
1151
|
+
metadata: @config.metadata,
|
1013
1152
|
retry_policy: @config.retry_policy
|
1014
1153
|
|
1015
1154
|
@security_center_stub.call_rpc :group_assets, request, options: options do |response, operation|
|
@@ -1174,6 +1313,27 @@ module Google
|
|
1174
1313
|
#
|
1175
1314
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1176
1315
|
#
|
1316
|
+
# @example Basic example
|
1317
|
+
# require "google/cloud/security_center/v1p1beta1"
|
1318
|
+
#
|
1319
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1320
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
1321
|
+
#
|
1322
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1323
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new
|
1324
|
+
#
|
1325
|
+
# # Call the group_findings method.
|
1326
|
+
# result = client.group_findings request
|
1327
|
+
#
|
1328
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1329
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1330
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1331
|
+
# # methods are also available for managing paging directly.
|
1332
|
+
# result.each do |response|
|
1333
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult.
|
1334
|
+
# p response
|
1335
|
+
# end
|
1336
|
+
#
|
1177
1337
|
def group_findings request, options = nil
|
1178
1338
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1179
1339
|
|
@@ -1191,16 +1351,20 @@ module Google
|
|
1191
1351
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1192
1352
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1193
1353
|
|
1194
|
-
header_params = {
|
1195
|
-
|
1196
|
-
|
1354
|
+
header_params = {}
|
1355
|
+
if request.parent
|
1356
|
+
header_params["parent"] = request.parent
|
1357
|
+
end
|
1358
|
+
|
1197
1359
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1198
1360
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1199
1361
|
|
1200
1362
|
options.apply_defaults timeout: @config.rpcs.group_findings.timeout,
|
1201
1363
|
metadata: metadata,
|
1202
1364
|
retry_policy: @config.rpcs.group_findings.retry_policy
|
1203
|
-
|
1365
|
+
|
1366
|
+
options.apply_defaults timeout: @config.timeout,
|
1367
|
+
metadata: @config.metadata,
|
1204
1368
|
retry_policy: @config.retry_policy
|
1205
1369
|
|
1206
1370
|
@security_center_stub.call_rpc :group_findings, request, options: options do |response, operation|
|
@@ -1369,6 +1533,27 @@ module Google
|
|
1369
1533
|
#
|
1370
1534
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1371
1535
|
#
|
1536
|
+
# @example Basic example
|
1537
|
+
# require "google/cloud/security_center/v1p1beta1"
|
1538
|
+
#
|
1539
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1540
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
1541
|
+
#
|
1542
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1543
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new
|
1544
|
+
#
|
1545
|
+
# # Call the list_assets method.
|
1546
|
+
# result = client.list_assets request
|
1547
|
+
#
|
1548
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1549
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1550
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1551
|
+
# # methods are also available for managing paging directly.
|
1552
|
+
# result.each do |response|
|
1553
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult.
|
1554
|
+
# p response
|
1555
|
+
# end
|
1556
|
+
#
|
1372
1557
|
def list_assets request, options = nil
|
1373
1558
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1374
1559
|
|
@@ -1386,16 +1571,20 @@ module Google
|
|
1386
1571
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1387
1572
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1388
1573
|
|
1389
|
-
header_params = {
|
1390
|
-
|
1391
|
-
|
1574
|
+
header_params = {}
|
1575
|
+
if request.parent
|
1576
|
+
header_params["parent"] = request.parent
|
1577
|
+
end
|
1578
|
+
|
1392
1579
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1393
1580
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1394
1581
|
|
1395
1582
|
options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
|
1396
1583
|
metadata: metadata,
|
1397
1584
|
retry_policy: @config.rpcs.list_assets.retry_policy
|
1398
|
-
|
1585
|
+
|
1586
|
+
options.apply_defaults timeout: @config.timeout,
|
1587
|
+
metadata: @config.metadata,
|
1399
1588
|
retry_policy: @config.retry_policy
|
1400
1589
|
|
1401
1590
|
@security_center_stub.call_rpc :list_assets, request, options: options do |response, operation|
|
@@ -1561,6 +1750,27 @@ module Google
|
|
1561
1750
|
#
|
1562
1751
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1563
1752
|
#
|
1753
|
+
# @example Basic example
|
1754
|
+
# require "google/cloud/security_center/v1p1beta1"
|
1755
|
+
#
|
1756
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1757
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
1758
|
+
#
|
1759
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1760
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new
|
1761
|
+
#
|
1762
|
+
# # Call the list_findings method.
|
1763
|
+
# result = client.list_findings request
|
1764
|
+
#
|
1765
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1766
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1767
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1768
|
+
# # methods are also available for managing paging directly.
|
1769
|
+
# result.each do |response|
|
1770
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult.
|
1771
|
+
# p response
|
1772
|
+
# end
|
1773
|
+
#
|
1564
1774
|
def list_findings request, options = nil
|
1565
1775
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1566
1776
|
|
@@ -1578,16 +1788,20 @@ module Google
|
|
1578
1788
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1579
1789
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1580
1790
|
|
1581
|
-
header_params = {
|
1582
|
-
|
1583
|
-
|
1791
|
+
header_params = {}
|
1792
|
+
if request.parent
|
1793
|
+
header_params["parent"] = request.parent
|
1794
|
+
end
|
1795
|
+
|
1584
1796
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1585
1797
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1586
1798
|
|
1587
1799
|
options.apply_defaults timeout: @config.rpcs.list_findings.timeout,
|
1588
1800
|
metadata: metadata,
|
1589
1801
|
retry_policy: @config.rpcs.list_findings.retry_policy
|
1590
|
-
|
1802
|
+
|
1803
|
+
options.apply_defaults timeout: @config.timeout,
|
1804
|
+
metadata: @config.metadata,
|
1591
1805
|
retry_policy: @config.retry_policy
|
1592
1806
|
|
1593
1807
|
@security_center_stub.call_rpc :list_findings, request, options: options do |response, operation|
|
@@ -1636,6 +1850,27 @@ module Google
|
|
1636
1850
|
#
|
1637
1851
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1638
1852
|
#
|
1853
|
+
# @example Basic example
|
1854
|
+
# require "google/cloud/security_center/v1p1beta1"
|
1855
|
+
#
|
1856
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1857
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
1858
|
+
#
|
1859
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1860
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new
|
1861
|
+
#
|
1862
|
+
# # Call the list_notification_configs method.
|
1863
|
+
# result = client.list_notification_configs request
|
1864
|
+
#
|
1865
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1866
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1867
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1868
|
+
# # methods are also available for managing paging directly.
|
1869
|
+
# result.each do |response|
|
1870
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
|
1871
|
+
# p response
|
1872
|
+
# end
|
1873
|
+
#
|
1639
1874
|
def list_notification_configs request, options = nil
|
1640
1875
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1641
1876
|
|
@@ -1653,16 +1888,20 @@ module Google
|
|
1653
1888
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1654
1889
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1655
1890
|
|
1656
|
-
header_params = {
|
1657
|
-
|
1658
|
-
|
1891
|
+
header_params = {}
|
1892
|
+
if request.parent
|
1893
|
+
header_params["parent"] = request.parent
|
1894
|
+
end
|
1895
|
+
|
1659
1896
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1660
1897
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1661
1898
|
|
1662
1899
|
options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout,
|
1663
1900
|
metadata: metadata,
|
1664
1901
|
retry_policy: @config.rpcs.list_notification_configs.retry_policy
|
1665
|
-
|
1902
|
+
|
1903
|
+
options.apply_defaults timeout: @config.timeout,
|
1904
|
+
metadata: @config.metadata,
|
1666
1905
|
retry_policy: @config.retry_policy
|
1667
1906
|
|
1668
1907
|
@security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation|
|
@@ -1712,6 +1951,27 @@ module Google
|
|
1712
1951
|
#
|
1713
1952
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1714
1953
|
#
|
1954
|
+
# @example Basic example
|
1955
|
+
# require "google/cloud/security_center/v1p1beta1"
|
1956
|
+
#
|
1957
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1958
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
1959
|
+
#
|
1960
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1961
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new
|
1962
|
+
#
|
1963
|
+
# # Call the list_sources method.
|
1964
|
+
# result = client.list_sources request
|
1965
|
+
#
|
1966
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1967
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1968
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1969
|
+
# # methods are also available for managing paging directly.
|
1970
|
+
# result.each do |response|
|
1971
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source.
|
1972
|
+
# p response
|
1973
|
+
# end
|
1974
|
+
#
|
1715
1975
|
def list_sources request, options = nil
|
1716
1976
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1717
1977
|
|
@@ -1729,16 +1989,20 @@ module Google
|
|
1729
1989
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1730
1990
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1731
1991
|
|
1732
|
-
header_params = {
|
1733
|
-
|
1734
|
-
|
1992
|
+
header_params = {}
|
1993
|
+
if request.parent
|
1994
|
+
header_params["parent"] = request.parent
|
1995
|
+
end
|
1996
|
+
|
1735
1997
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1736
1998
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1737
1999
|
|
1738
2000
|
options.apply_defaults timeout: @config.rpcs.list_sources.timeout,
|
1739
2001
|
metadata: metadata,
|
1740
2002
|
retry_policy: @config.rpcs.list_sources.retry_policy
|
1741
|
-
|
2003
|
+
|
2004
|
+
options.apply_defaults timeout: @config.timeout,
|
2005
|
+
metadata: @config.metadata,
|
1742
2006
|
retry_policy: @config.retry_policy
|
1743
2007
|
|
1744
2008
|
@security_center_stub.call_rpc :list_sources, request, options: options do |response, operation|
|
@@ -1785,6 +2049,28 @@ module Google
|
|
1785
2049
|
#
|
1786
2050
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1787
2051
|
#
|
2052
|
+
# @example Basic example
|
2053
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2054
|
+
#
|
2055
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2056
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2057
|
+
#
|
2058
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2059
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new
|
2060
|
+
#
|
2061
|
+
# # Call the run_asset_discovery method.
|
2062
|
+
# result = client.run_asset_discovery request
|
2063
|
+
#
|
2064
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
2065
|
+
# # object to check the status of an operation, cancel it, or wait
|
2066
|
+
# # for results. Here is how to block until completion:
|
2067
|
+
# result.wait_until_done! timeout: 60
|
2068
|
+
# if result.response?
|
2069
|
+
# p result.response
|
2070
|
+
# else
|
2071
|
+
# puts "Error!"
|
2072
|
+
# end
|
2073
|
+
#
|
1788
2074
|
def run_asset_discovery request, options = nil
|
1789
2075
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1790
2076
|
|
@@ -1802,16 +2088,20 @@ module Google
|
|
1802
2088
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1803
2089
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1804
2090
|
|
1805
|
-
header_params = {
|
1806
|
-
|
1807
|
-
|
2091
|
+
header_params = {}
|
2092
|
+
if request.parent
|
2093
|
+
header_params["parent"] = request.parent
|
2094
|
+
end
|
2095
|
+
|
1808
2096
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1809
2097
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1810
2098
|
|
1811
2099
|
options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout,
|
1812
2100
|
metadata: metadata,
|
1813
2101
|
retry_policy: @config.rpcs.run_asset_discovery.retry_policy
|
1814
|
-
|
2102
|
+
|
2103
|
+
options.apply_defaults timeout: @config.timeout,
|
2104
|
+
metadata: @config.metadata,
|
1815
2105
|
retry_policy: @config.retry_policy
|
1816
2106
|
|
1817
2107
|
@security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation|
|
@@ -1859,6 +2149,21 @@ module Google
|
|
1859
2149
|
#
|
1860
2150
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1861
2151
|
#
|
2152
|
+
# @example Basic example
|
2153
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2154
|
+
#
|
2155
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2156
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2157
|
+
#
|
2158
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2159
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new
|
2160
|
+
#
|
2161
|
+
# # Call the set_finding_state method.
|
2162
|
+
# result = client.set_finding_state request
|
2163
|
+
#
|
2164
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding.
|
2165
|
+
# p result
|
2166
|
+
#
|
1862
2167
|
def set_finding_state request, options = nil
|
1863
2168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1864
2169
|
|
@@ -1876,16 +2181,20 @@ module Google
|
|
1876
2181
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1877
2182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1878
2183
|
|
1879
|
-
header_params = {
|
1880
|
-
|
1881
|
-
|
2184
|
+
header_params = {}
|
2185
|
+
if request.name
|
2186
|
+
header_params["name"] = request.name
|
2187
|
+
end
|
2188
|
+
|
1882
2189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1883
2190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1884
2191
|
|
1885
2192
|
options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout,
|
1886
2193
|
metadata: metadata,
|
1887
2194
|
retry_policy: @config.rpcs.set_finding_state.retry_policy
|
1888
|
-
|
2195
|
+
|
2196
|
+
options.apply_defaults timeout: @config.timeout,
|
2197
|
+
metadata: @config.metadata,
|
1889
2198
|
retry_policy: @config.retry_policy
|
1890
2199
|
|
1891
2200
|
@security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation|
|
@@ -1931,6 +2240,21 @@ module Google
|
|
1931
2240
|
#
|
1932
2241
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1933
2242
|
#
|
2243
|
+
# @example Basic example
|
2244
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2245
|
+
#
|
2246
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2247
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2248
|
+
#
|
2249
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2250
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
2251
|
+
#
|
2252
|
+
# # Call the set_iam_policy method.
|
2253
|
+
# result = client.set_iam_policy request
|
2254
|
+
#
|
2255
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
2256
|
+
# p result
|
2257
|
+
#
|
1934
2258
|
def set_iam_policy request, options = nil
|
1935
2259
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1936
2260
|
|
@@ -1948,16 +2272,20 @@ module Google
|
|
1948
2272
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
1949
2273
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1950
2274
|
|
1951
|
-
header_params = {
|
1952
|
-
|
1953
|
-
|
2275
|
+
header_params = {}
|
2276
|
+
if request.resource
|
2277
|
+
header_params["resource"] = request.resource
|
2278
|
+
end
|
2279
|
+
|
1954
2280
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1955
2281
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1956
2282
|
|
1957
2283
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1958
2284
|
metadata: metadata,
|
1959
2285
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1960
|
-
|
2286
|
+
|
2287
|
+
options.apply_defaults timeout: @config.timeout,
|
2288
|
+
metadata: @config.metadata,
|
1961
2289
|
retry_policy: @config.retry_policy
|
1962
2290
|
|
1963
2291
|
@security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -2003,6 +2331,21 @@ module Google
|
|
2003
2331
|
#
|
2004
2332
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2005
2333
|
#
|
2334
|
+
# @example Basic example
|
2335
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2336
|
+
#
|
2337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2338
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2339
|
+
#
|
2340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2341
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
2342
|
+
#
|
2343
|
+
# # Call the test_iam_permissions method.
|
2344
|
+
# result = client.test_iam_permissions request
|
2345
|
+
#
|
2346
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
2347
|
+
# p result
|
2348
|
+
#
|
2006
2349
|
def test_iam_permissions request, options = nil
|
2007
2350
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2008
2351
|
|
@@ -2020,16 +2363,20 @@ module Google
|
|
2020
2363
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
2021
2364
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2022
2365
|
|
2023
|
-
header_params = {
|
2024
|
-
|
2025
|
-
|
2366
|
+
header_params = {}
|
2367
|
+
if request.resource
|
2368
|
+
header_params["resource"] = request.resource
|
2369
|
+
end
|
2370
|
+
|
2026
2371
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2027
2372
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2028
2373
|
|
2029
2374
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
2030
2375
|
metadata: metadata,
|
2031
2376
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
2032
|
-
|
2377
|
+
|
2378
|
+
options.apply_defaults timeout: @config.timeout,
|
2379
|
+
metadata: @config.metadata,
|
2033
2380
|
retry_policy: @config.retry_policy
|
2034
2381
|
|
2035
2382
|
@security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -2083,6 +2430,21 @@ module Google
|
|
2083
2430
|
#
|
2084
2431
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2085
2432
|
#
|
2433
|
+
# @example Basic example
|
2434
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2435
|
+
#
|
2436
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2437
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2438
|
+
#
|
2439
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2440
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new
|
2441
|
+
#
|
2442
|
+
# # Call the update_finding method.
|
2443
|
+
# result = client.update_finding request
|
2444
|
+
#
|
2445
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding.
|
2446
|
+
# p result
|
2447
|
+
#
|
2086
2448
|
def update_finding request, options = nil
|
2087
2449
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2088
2450
|
|
@@ -2100,16 +2462,20 @@ module Google
|
|
2100
2462
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
2101
2463
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2102
2464
|
|
2103
|
-
header_params = {
|
2104
|
-
|
2105
|
-
|
2465
|
+
header_params = {}
|
2466
|
+
if request.finding&.name
|
2467
|
+
header_params["finding.name"] = request.finding.name
|
2468
|
+
end
|
2469
|
+
|
2106
2470
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2107
2471
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2108
2472
|
|
2109
2473
|
options.apply_defaults timeout: @config.rpcs.update_finding.timeout,
|
2110
2474
|
metadata: metadata,
|
2111
2475
|
retry_policy: @config.rpcs.update_finding.retry_policy
|
2112
|
-
|
2476
|
+
|
2477
|
+
options.apply_defaults timeout: @config.timeout,
|
2478
|
+
metadata: @config.metadata,
|
2113
2479
|
retry_policy: @config.retry_policy
|
2114
2480
|
|
2115
2481
|
@security_center_stub.call_rpc :update_finding, request, options: options do |response, operation|
|
@@ -2154,6 +2520,21 @@ module Google
|
|
2154
2520
|
#
|
2155
2521
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2156
2522
|
#
|
2523
|
+
# @example Basic example
|
2524
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2525
|
+
#
|
2526
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2527
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2528
|
+
#
|
2529
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2530
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new
|
2531
|
+
#
|
2532
|
+
# # Call the update_notification_config method.
|
2533
|
+
# result = client.update_notification_config request
|
2534
|
+
#
|
2535
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
|
2536
|
+
# p result
|
2537
|
+
#
|
2157
2538
|
def update_notification_config request, options = nil
|
2158
2539
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2159
2540
|
|
@@ -2171,16 +2552,20 @@ module Google
|
|
2171
2552
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
2172
2553
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2173
2554
|
|
2174
|
-
header_params = {
|
2175
|
-
|
2176
|
-
|
2555
|
+
header_params = {}
|
2556
|
+
if request.notification_config&.name
|
2557
|
+
header_params["notification_config.name"] = request.notification_config.name
|
2558
|
+
end
|
2559
|
+
|
2177
2560
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2178
2561
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2179
2562
|
|
2180
2563
|
options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout,
|
2181
2564
|
metadata: metadata,
|
2182
2565
|
retry_policy: @config.rpcs.update_notification_config.retry_policy
|
2183
|
-
|
2566
|
+
|
2567
|
+
options.apply_defaults timeout: @config.timeout,
|
2568
|
+
metadata: @config.metadata,
|
2184
2569
|
retry_policy: @config.retry_policy
|
2185
2570
|
|
2186
2571
|
@security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation|
|
@@ -2214,7 +2599,7 @@ module Google
|
|
2214
2599
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2215
2600
|
# The FieldMask to use when updating the settings resource.
|
2216
2601
|
#
|
2217
|
-
#
|
2602
|
+
# If empty all mutable fields will be updated.
|
2218
2603
|
#
|
2219
2604
|
# @yield [response, operation] Access the result along with the RPC operation
|
2220
2605
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings]
|
@@ -2224,6 +2609,21 @@ module Google
|
|
2224
2609
|
#
|
2225
2610
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2226
2611
|
#
|
2612
|
+
# @example Basic example
|
2613
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2614
|
+
#
|
2615
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2616
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2617
|
+
#
|
2618
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2619
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new
|
2620
|
+
#
|
2621
|
+
# # Call the update_organization_settings method.
|
2622
|
+
# result = client.update_organization_settings request
|
2623
|
+
#
|
2624
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.
|
2625
|
+
# p result
|
2626
|
+
#
|
2227
2627
|
def update_organization_settings request, options = nil
|
2228
2628
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2229
2629
|
|
@@ -2241,16 +2641,20 @@ module Google
|
|
2241
2641
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
2242
2642
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2243
2643
|
|
2244
|
-
header_params = {
|
2245
|
-
|
2246
|
-
|
2644
|
+
header_params = {}
|
2645
|
+
if request.organization_settings&.name
|
2646
|
+
header_params["organization_settings.name"] = request.organization_settings.name
|
2647
|
+
end
|
2648
|
+
|
2247
2649
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2248
2650
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2249
2651
|
|
2250
2652
|
options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout,
|
2251
2653
|
metadata: metadata,
|
2252
2654
|
retry_policy: @config.rpcs.update_organization_settings.retry_policy
|
2253
|
-
|
2655
|
+
|
2656
|
+
options.apply_defaults timeout: @config.timeout,
|
2657
|
+
metadata: @config.metadata,
|
2254
2658
|
retry_policy: @config.retry_policy
|
2255
2659
|
|
2256
2660
|
@security_center_stub.call_rpc :update_organization_settings, request, options: options do |response, operation|
|
@@ -2294,6 +2698,21 @@ module Google
|
|
2294
2698
|
#
|
2295
2699
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2296
2700
|
#
|
2701
|
+
# @example Basic example
|
2702
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2703
|
+
#
|
2704
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2705
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2706
|
+
#
|
2707
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2708
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new
|
2709
|
+
#
|
2710
|
+
# # Call the update_source method.
|
2711
|
+
# result = client.update_source request
|
2712
|
+
#
|
2713
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source.
|
2714
|
+
# p result
|
2715
|
+
#
|
2297
2716
|
def update_source request, options = nil
|
2298
2717
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2299
2718
|
|
@@ -2311,16 +2730,20 @@ module Google
|
|
2311
2730
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
2312
2731
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2313
2732
|
|
2314
|
-
header_params = {
|
2315
|
-
|
2316
|
-
|
2733
|
+
header_params = {}
|
2734
|
+
if request.source&.name
|
2735
|
+
header_params["source.name"] = request.source.name
|
2736
|
+
end
|
2737
|
+
|
2317
2738
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2318
2739
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2319
2740
|
|
2320
2741
|
options.apply_defaults timeout: @config.rpcs.update_source.timeout,
|
2321
2742
|
metadata: metadata,
|
2322
2743
|
retry_policy: @config.rpcs.update_source.retry_policy
|
2323
|
-
|
2744
|
+
|
2745
|
+
options.apply_defaults timeout: @config.timeout,
|
2746
|
+
metadata: @config.metadata,
|
2324
2747
|
retry_policy: @config.retry_policy
|
2325
2748
|
|
2326
2749
|
@security_center_stub.call_rpc :update_source, request, options: options do |response, operation|
|
@@ -2370,6 +2793,21 @@ module Google
|
|
2370
2793
|
#
|
2371
2794
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2372
2795
|
#
|
2796
|
+
# @example Basic example
|
2797
|
+
# require "google/cloud/security_center/v1p1beta1"
|
2798
|
+
#
|
2799
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2800
|
+
# client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new
|
2801
|
+
#
|
2802
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2803
|
+
# request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new
|
2804
|
+
#
|
2805
|
+
# # Call the update_security_marks method.
|
2806
|
+
# result = client.update_security_marks request
|
2807
|
+
#
|
2808
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.
|
2809
|
+
# p result
|
2810
|
+
#
|
2373
2811
|
def update_security_marks request, options = nil
|
2374
2812
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2375
2813
|
|
@@ -2387,16 +2825,20 @@ module Google
|
|
2387
2825
|
gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION
|
2388
2826
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2389
2827
|
|
2390
|
-
header_params = {
|
2391
|
-
|
2392
|
-
|
2828
|
+
header_params = {}
|
2829
|
+
if request.security_marks&.name
|
2830
|
+
header_params["security_marks.name"] = request.security_marks.name
|
2831
|
+
end
|
2832
|
+
|
2393
2833
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2394
2834
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2395
2835
|
|
2396
2836
|
options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout,
|
2397
2837
|
metadata: metadata,
|
2398
2838
|
retry_policy: @config.rpcs.update_security_marks.retry_policy
|
2399
|
-
|
2839
|
+
|
2840
|
+
options.apply_defaults timeout: @config.timeout,
|
2841
|
+
metadata: @config.metadata,
|
2400
2842
|
retry_policy: @config.retry_policy
|
2401
2843
|
|
2402
2844
|
@security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation|
|
@@ -2420,22 +2862,21 @@ module Google
|
|
2420
2862
|
# Configuration can be applied globally to all clients, or to a single client
|
2421
2863
|
# on construction.
|
2422
2864
|
#
|
2423
|
-
#
|
2424
|
-
#
|
2425
|
-
#
|
2426
|
-
# to 20 seconds,
|
2427
|
-
#
|
2428
|
-
#
|
2429
|
-
#
|
2430
|
-
#
|
2431
|
-
#
|
2432
|
-
#
|
2433
|
-
#
|
2434
|
-
#
|
2435
|
-
#
|
2436
|
-
#
|
2437
|
-
#
|
2438
|
-
# end
|
2865
|
+
# @example
|
2866
|
+
#
|
2867
|
+
# # Modify the global config, setting the timeout for
|
2868
|
+
# # create_source to 20 seconds,
|
2869
|
+
# # and all remaining timeouts to 10 seconds.
|
2870
|
+
# ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config|
|
2871
|
+
# config.timeout = 10.0
|
2872
|
+
# config.rpcs.create_source.timeout = 20.0
|
2873
|
+
# end
|
2874
|
+
#
|
2875
|
+
# # Apply the above configuration only to a new client.
|
2876
|
+
# client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config|
|
2877
|
+
# config.timeout = 10.0
|
2878
|
+
# config.rpcs.create_source.timeout = 20.0
|
2879
|
+
# end
|
2439
2880
|
#
|
2440
2881
|
# @!attribute [rw] endpoint
|
2441
2882
|
# The hostname or hostname:port of the service endpoint.
|