google-cloud-security_center-v1 0.25.1 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/security_center/v1/rest.rb +37 -0
- data/lib/google/cloud/security_center/v1/security_center/client.rb +907 -82
- data/lib/google/cloud/security_center/v1/security_center/operations.rb +14 -16
- data/lib/google/cloud/security_center/v1/security_center/paths.rb +147 -0
- data/lib/google/cloud/security_center/v1/security_center/rest/client.rb +4259 -0
- data/lib/google/cloud/security_center/v1/security_center/rest/operations.rb +792 -0
- data/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb +3200 -0
- data/lib/google/cloud/security_center/v1/security_center/rest.rb +53 -0
- data/lib/google/cloud/security_center/v1/security_center.rb +6 -0
- data/lib/google/cloud/security_center/v1/version.rb +1 -1
- data/lib/google/cloud/security_center/v1.rb +5 -0
- data/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb +35 -0
- data/lib/google/cloud/securitycenter/v1/finding_pb.rb +1 -0
- data/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb.rb +50 -0
- data/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_module_pb.rb +40 -0
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb +58 -1
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +30 -0
- data/proto_docs/google/api/client.rb +57 -3
- data/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb +5 -5
- data/proto_docs/google/cloud/securitycenter/v1/contact_details.rb +2 -2
- data/proto_docs/google/cloud/securitycenter/v1/database.rb +1 -1
- data/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb +73 -0
- data/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb +1 -1
- data/proto_docs/google/cloud/securitycenter/v1/finding.rb +11 -6
- data/proto_docs/google/cloud/securitycenter/v1/indicator.rb +4 -3
- data/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb +8 -8
- data/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb +3 -3
- data/proto_docs/google/cloud/securitycenter/v1/mute_config.rb +5 -5
- data/proto_docs/google/cloud/securitycenter/v1/resource.rb +3 -3
- data/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb +112 -0
- data/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb +90 -0
- data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +169 -0
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- metadata +19 -7
@@ -64,6 +64,8 @@ module Google
|
|
64
64
|
end
|
65
65
|
default_config = Client::Configuration.new parent_config
|
66
66
|
|
67
|
+
default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0
|
68
|
+
|
67
69
|
default_config.rpcs.create_source.timeout = 60.0
|
68
70
|
|
69
71
|
default_config.rpcs.create_finding.timeout = 60.0
|
@@ -72,6 +74,8 @@ module Google
|
|
72
74
|
|
73
75
|
default_config.rpcs.delete_notification_config.timeout = 60.0
|
74
76
|
|
77
|
+
default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0
|
78
|
+
|
75
79
|
default_config.rpcs.get_iam_policy.timeout = 60.0
|
76
80
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
77
81
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
@@ -87,6 +91,16 @@ module Google
|
|
87
91
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
88
92
|
}
|
89
93
|
|
94
|
+
default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0
|
95
|
+
default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = {
|
96
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
97
|
+
}
|
98
|
+
|
99
|
+
default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0
|
100
|
+
default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = {
|
101
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
102
|
+
}
|
103
|
+
|
90
104
|
default_config.rpcs.get_source.timeout = 60.0
|
91
105
|
default_config.rpcs.get_source.retry_policy = {
|
92
106
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
@@ -107,6 +121,11 @@ module Google
|
|
107
121
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
108
122
|
}
|
109
123
|
|
124
|
+
default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0
|
125
|
+
default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = {
|
126
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
127
|
+
}
|
128
|
+
|
110
129
|
default_config.rpcs.list_findings.timeout = 480.0
|
111
130
|
default_config.rpcs.list_findings.retry_policy = {
|
112
131
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
@@ -117,6 +136,16 @@ module Google
|
|
117
136
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
118
137
|
}
|
119
138
|
|
139
|
+
default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0
|
140
|
+
default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = {
|
141
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
142
|
+
}
|
143
|
+
|
144
|
+
default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0
|
145
|
+
default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = {
|
146
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
147
|
+
}
|
148
|
+
|
120
149
|
default_config.rpcs.list_sources.timeout = 60.0
|
121
150
|
default_config.rpcs.list_sources.retry_policy = {
|
122
151
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
@@ -139,6 +168,8 @@ module Google
|
|
139
168
|
|
140
169
|
default_config.rpcs.update_organization_settings.timeout = 60.0
|
141
170
|
|
171
|
+
default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0
|
172
|
+
|
142
173
|
default_config.rpcs.update_source.timeout = 60.0
|
143
174
|
|
144
175
|
default_config.rpcs.update_security_marks.timeout = 480.0
|
@@ -305,14 +336,14 @@ module Google
|
|
305
336
|
# # Call the bulk_mute_findings method.
|
306
337
|
# result = client.bulk_mute_findings request
|
307
338
|
#
|
308
|
-
# # The returned object is of type Gapic::Operation. You can use
|
309
|
-
# #
|
310
|
-
# #
|
339
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
340
|
+
# # check the status of an operation, cancel it, or wait for results.
|
341
|
+
# # Here is how to wait for a response.
|
311
342
|
# result.wait_until_done! timeout: 60
|
312
343
|
# if result.response?
|
313
344
|
# p result.response
|
314
345
|
# else
|
315
|
-
# puts "
|
346
|
+
# puts "No response received."
|
316
347
|
# end
|
317
348
|
#
|
318
349
|
def bulk_mute_findings request, options = nil
|
@@ -357,6 +388,101 @@ module Google
|
|
357
388
|
raise ::Google::Cloud::Error.from_error(e)
|
358
389
|
end
|
359
390
|
|
391
|
+
##
|
392
|
+
# Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the
|
393
|
+
# given CRM parent, and also creates inherited
|
394
|
+
# SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
|
395
|
+
# parent. These modules are enabled by default.
|
396
|
+
#
|
397
|
+
# @overload create_security_health_analytics_custom_module(request, options = nil)
|
398
|
+
# Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type
|
399
|
+
# {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
|
400
|
+
#
|
401
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
|
402
|
+
# A request object representing the call parameters. Required. To specify no
|
403
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
404
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
405
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
406
|
+
#
|
407
|
+
# @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil)
|
408
|
+
# Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at
|
409
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
410
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
411
|
+
#
|
412
|
+
# @param parent [::String]
|
413
|
+
# Required. Resource name of the new custom module's parent. Its format is
|
414
|
+
# "organizations/\\{organization}/securityHealthAnalyticsSettings",
|
415
|
+
# "folders/\\{folder}/securityHealthAnalyticsSettings", or
|
416
|
+
# "projects/\\{project}/securityHealthAnalyticsSettings"
|
417
|
+
# @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
|
418
|
+
# Required. SecurityHealthAnalytics custom module to create. The provided
|
419
|
+
# name is ignored and reset with provided parent information and
|
420
|
+
# server-generated ID.
|
421
|
+
#
|
422
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
423
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
424
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
425
|
+
#
|
426
|
+
# @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
427
|
+
#
|
428
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
429
|
+
#
|
430
|
+
# @example Basic example
|
431
|
+
# require "google/cloud/security_center/v1"
|
432
|
+
#
|
433
|
+
# # Create a client object. The client can be reused for multiple calls.
|
434
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
435
|
+
#
|
436
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
437
|
+
# request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new
|
438
|
+
#
|
439
|
+
# # Call the create_security_health_analytics_custom_module method.
|
440
|
+
# result = client.create_security_health_analytics_custom_module request
|
441
|
+
#
|
442
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.
|
443
|
+
# p result
|
444
|
+
#
|
445
|
+
def create_security_health_analytics_custom_module request, options = nil
|
446
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
447
|
+
|
448
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest
|
449
|
+
|
450
|
+
# Converts hash and nil to an options object
|
451
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
452
|
+
|
453
|
+
# Customize the options with defaults
|
454
|
+
metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h
|
455
|
+
|
456
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
457
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
458
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
459
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
460
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
461
|
+
|
462
|
+
header_params = {}
|
463
|
+
if request.parent
|
464
|
+
header_params["parent"] = request.parent
|
465
|
+
end
|
466
|
+
|
467
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
468
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
469
|
+
|
470
|
+
options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout,
|
471
|
+
metadata: metadata,
|
472
|
+
retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy
|
473
|
+
|
474
|
+
options.apply_defaults timeout: @config.timeout,
|
475
|
+
metadata: @config.metadata,
|
476
|
+
retry_policy: @config.retry_policy
|
477
|
+
|
478
|
+
@security_center_stub.call_rpc :create_security_health_analytics_custom_module, request, options: options do |response, operation|
|
479
|
+
yield response, operation if block_given?
|
480
|
+
return response
|
481
|
+
end
|
482
|
+
rescue ::GRPC::BadStatus => e
|
483
|
+
raise ::Google::Cloud::Error.from_error(e)
|
484
|
+
end
|
485
|
+
|
360
486
|
##
|
361
487
|
# Creates a source.
|
362
488
|
#
|
@@ -906,6 +1032,97 @@ module Google
|
|
906
1032
|
raise ::Google::Cloud::Error.from_error(e)
|
907
1033
|
end
|
908
1034
|
|
1035
|
+
##
|
1036
|
+
# Deletes the specified SecurityHealthAnalyticsCustomModule and all of its
|
1037
|
+
# descendants in the CRM hierarchy. This method is only supported for
|
1038
|
+
# resident custom modules.
|
1039
|
+
#
|
1040
|
+
# @overload delete_security_health_analytics_custom_module(request, options = nil)
|
1041
|
+
# Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type
|
1042
|
+
# {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
|
1043
|
+
#
|
1044
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
|
1045
|
+
# A request object representing the call parameters. Required. To specify no
|
1046
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1047
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1048
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1049
|
+
#
|
1050
|
+
# @overload delete_security_health_analytics_custom_module(name: nil)
|
1051
|
+
# Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at
|
1052
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1053
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1054
|
+
#
|
1055
|
+
# @param name [::String]
|
1056
|
+
# Required. Name of the custom module to delete. Its format is
|
1057
|
+
# "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
|
1058
|
+
# "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
|
1059
|
+
# or
|
1060
|
+
# "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}"
|
1061
|
+
#
|
1062
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1063
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1064
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1065
|
+
#
|
1066
|
+
# @return [::Google::Protobuf::Empty]
|
1067
|
+
#
|
1068
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1069
|
+
#
|
1070
|
+
# @example Basic example
|
1071
|
+
# require "google/cloud/security_center/v1"
|
1072
|
+
#
|
1073
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1074
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
1075
|
+
#
|
1076
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1077
|
+
# request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new
|
1078
|
+
#
|
1079
|
+
# # Call the delete_security_health_analytics_custom_module method.
|
1080
|
+
# result = client.delete_security_health_analytics_custom_module request
|
1081
|
+
#
|
1082
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1083
|
+
# p result
|
1084
|
+
#
|
1085
|
+
def delete_security_health_analytics_custom_module request, options = nil
|
1086
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1087
|
+
|
1088
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest
|
1089
|
+
|
1090
|
+
# Converts hash and nil to an options object
|
1091
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1092
|
+
|
1093
|
+
# Customize the options with defaults
|
1094
|
+
metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h
|
1095
|
+
|
1096
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1097
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1098
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1099
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
1100
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1101
|
+
|
1102
|
+
header_params = {}
|
1103
|
+
if request.name
|
1104
|
+
header_params["name"] = request.name
|
1105
|
+
end
|
1106
|
+
|
1107
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1108
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1109
|
+
|
1110
|
+
options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout,
|
1111
|
+
metadata: metadata,
|
1112
|
+
retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy
|
1113
|
+
|
1114
|
+
options.apply_defaults timeout: @config.timeout,
|
1115
|
+
metadata: @config.metadata,
|
1116
|
+
retry_policy: @config.retry_policy
|
1117
|
+
|
1118
|
+
@security_center_stub.call_rpc :delete_security_health_analytics_custom_module, request, options: options do |response, operation|
|
1119
|
+
yield response, operation if block_given?
|
1120
|
+
return response
|
1121
|
+
end
|
1122
|
+
rescue ::GRPC::BadStatus => e
|
1123
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1124
|
+
end
|
1125
|
+
|
909
1126
|
##
|
910
1127
|
# Gets a BigQuery export.
|
911
1128
|
#
|
@@ -1345,6 +1562,184 @@ module Google
|
|
1345
1562
|
raise ::Google::Cloud::Error.from_error(e)
|
1346
1563
|
end
|
1347
1564
|
|
1565
|
+
##
|
1566
|
+
# Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
|
1567
|
+
#
|
1568
|
+
# @overload get_effective_security_health_analytics_custom_module(request, options = nil)
|
1569
|
+
# Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type
|
1570
|
+
# {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
|
1571
|
+
#
|
1572
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
|
1573
|
+
# A request object representing the call parameters. Required. To specify no
|
1574
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1575
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1576
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1577
|
+
#
|
1578
|
+
# @overload get_effective_security_health_analytics_custom_module(name: nil)
|
1579
|
+
# Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at
|
1580
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1581
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1582
|
+
#
|
1583
|
+
# @param name [::String]
|
1584
|
+
# Required. Name of the effective custom module to get. Its format is
|
1585
|
+
# "organizations/\\{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}",
|
1586
|
+
# "folders/\\{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}",
|
1587
|
+
# or
|
1588
|
+
# "projects/\\{project}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}"
|
1589
|
+
#
|
1590
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1591
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule]
|
1592
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1593
|
+
#
|
1594
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule]
|
1595
|
+
#
|
1596
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1597
|
+
#
|
1598
|
+
# @example Basic example
|
1599
|
+
# require "google/cloud/security_center/v1"
|
1600
|
+
#
|
1601
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1602
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
1603
|
+
#
|
1604
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1605
|
+
# request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new
|
1606
|
+
#
|
1607
|
+
# # Call the get_effective_security_health_analytics_custom_module method.
|
1608
|
+
# result = client.get_effective_security_health_analytics_custom_module request
|
1609
|
+
#
|
1610
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.
|
1611
|
+
# p result
|
1612
|
+
#
|
1613
|
+
def get_effective_security_health_analytics_custom_module request, options = nil
|
1614
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1615
|
+
|
1616
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest
|
1617
|
+
|
1618
|
+
# Converts hash and nil to an options object
|
1619
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1620
|
+
|
1621
|
+
# Customize the options with defaults
|
1622
|
+
metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h
|
1623
|
+
|
1624
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1625
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1626
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1627
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
1628
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1629
|
+
|
1630
|
+
header_params = {}
|
1631
|
+
if request.name
|
1632
|
+
header_params["name"] = request.name
|
1633
|
+
end
|
1634
|
+
|
1635
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1636
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1637
|
+
|
1638
|
+
options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout,
|
1639
|
+
metadata: metadata,
|
1640
|
+
retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy
|
1641
|
+
|
1642
|
+
options.apply_defaults timeout: @config.timeout,
|
1643
|
+
metadata: @config.metadata,
|
1644
|
+
retry_policy: @config.retry_policy
|
1645
|
+
|
1646
|
+
@security_center_stub.call_rpc :get_effective_security_health_analytics_custom_module, request, options: options do |response, operation|
|
1647
|
+
yield response, operation if block_given?
|
1648
|
+
return response
|
1649
|
+
end
|
1650
|
+
rescue ::GRPC::BadStatus => e
|
1651
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1652
|
+
end
|
1653
|
+
|
1654
|
+
##
|
1655
|
+
# Retrieves a SecurityHealthAnalyticsCustomModule.
|
1656
|
+
#
|
1657
|
+
# @overload get_security_health_analytics_custom_module(request, options = nil)
|
1658
|
+
# Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type
|
1659
|
+
# {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
|
1660
|
+
#
|
1661
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
|
1662
|
+
# A request object representing the call parameters. Required. To specify no
|
1663
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1664
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1665
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1666
|
+
#
|
1667
|
+
# @overload get_security_health_analytics_custom_module(name: nil)
|
1668
|
+
# Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at
|
1669
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1670
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1671
|
+
#
|
1672
|
+
# @param name [::String]
|
1673
|
+
# Required. Name of the custom module to get. Its format is
|
1674
|
+
# "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
|
1675
|
+
# "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
|
1676
|
+
# or
|
1677
|
+
# "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}"
|
1678
|
+
#
|
1679
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1680
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
1681
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1682
|
+
#
|
1683
|
+
# @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
1684
|
+
#
|
1685
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1686
|
+
#
|
1687
|
+
# @example Basic example
|
1688
|
+
# require "google/cloud/security_center/v1"
|
1689
|
+
#
|
1690
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1691
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
1692
|
+
#
|
1693
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1694
|
+
# request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new
|
1695
|
+
#
|
1696
|
+
# # Call the get_security_health_analytics_custom_module method.
|
1697
|
+
# result = client.get_security_health_analytics_custom_module request
|
1698
|
+
#
|
1699
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.
|
1700
|
+
# p result
|
1701
|
+
#
|
1702
|
+
def get_security_health_analytics_custom_module request, options = nil
|
1703
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1704
|
+
|
1705
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest
|
1706
|
+
|
1707
|
+
# Converts hash and nil to an options object
|
1708
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1709
|
+
|
1710
|
+
# Customize the options with defaults
|
1711
|
+
metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h
|
1712
|
+
|
1713
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1714
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1715
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1716
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
1717
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1718
|
+
|
1719
|
+
header_params = {}
|
1720
|
+
if request.name
|
1721
|
+
header_params["name"] = request.name
|
1722
|
+
end
|
1723
|
+
|
1724
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1725
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1726
|
+
|
1727
|
+
options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout,
|
1728
|
+
metadata: metadata,
|
1729
|
+
retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy
|
1730
|
+
|
1731
|
+
options.apply_defaults timeout: @config.timeout,
|
1732
|
+
metadata: @config.metadata,
|
1733
|
+
retry_policy: @config.retry_policy
|
1734
|
+
|
1735
|
+
@security_center_stub.call_rpc :get_security_health_analytics_custom_module, request, options: options do |response, operation|
|
1736
|
+
yield response, operation if block_given?
|
1737
|
+
return response
|
1738
|
+
end
|
1739
|
+
rescue ::GRPC::BadStatus => e
|
1740
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1741
|
+
end
|
1742
|
+
|
1348
1743
|
##
|
1349
1744
|
# Gets a source.
|
1350
1745
|
#
|
@@ -1597,13 +1992,11 @@ module Google
|
|
1597
1992
|
# # Call the group_assets method.
|
1598
1993
|
# result = client.group_assets request
|
1599
1994
|
#
|
1600
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1601
|
-
# #
|
1602
|
-
#
|
1603
|
-
# # methods are also available for managing paging directly.
|
1604
|
-
# result.each do |response|
|
1995
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1996
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1997
|
+
# result.each do |item|
|
1605
1998
|
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult.
|
1606
|
-
# p
|
1999
|
+
# p item
|
1607
2000
|
# end
|
1608
2001
|
#
|
1609
2002
|
def group_assets request, options = nil
|
@@ -1822,13 +2215,11 @@ module Google
|
|
1822
2215
|
# # Call the group_findings method.
|
1823
2216
|
# result = client.group_findings request
|
1824
2217
|
#
|
1825
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1826
|
-
# #
|
1827
|
-
#
|
1828
|
-
# # methods are also available for managing paging directly.
|
1829
|
-
# result.each do |response|
|
2218
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2219
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2220
|
+
# result.each do |item|
|
1830
2221
|
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult.
|
1831
|
-
# p
|
2222
|
+
# p item
|
1832
2223
|
# end
|
1833
2224
|
#
|
1834
2225
|
def group_findings request, options = nil
|
@@ -2009,26 +2400,125 @@ module Google
|
|
2009
2400
|
# start and the end of the time period defined by
|
2010
2401
|
# compare_duration and read_time.
|
2011
2402
|
#
|
2012
|
-
# If compare_duration is not specified, then the only possible state_change
|
2013
|
-
# is "UNUSED", which will be the state_change set for all assets present at
|
2014
|
-
# read_time.
|
2015
|
-
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2016
|
-
# A field mask to specify the ListAssetsResult fields to be listed in the
|
2017
|
-
# response.
|
2018
|
-
# An empty field mask will list all fields.
|
2019
|
-
# @param page_token [::String]
|
2020
|
-
# The value returned by the last `ListAssetsResponse`; indicates
|
2021
|
-
# that this is a continuation of a prior `ListAssets` call, and
|
2022
|
-
# that the system should return the next page of data.
|
2403
|
+
# If compare_duration is not specified, then the only possible state_change
|
2404
|
+
# is "UNUSED", which will be the state_change set for all assets present at
|
2405
|
+
# read_time.
|
2406
|
+
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2407
|
+
# A field mask to specify the ListAssetsResult fields to be listed in the
|
2408
|
+
# response.
|
2409
|
+
# An empty field mask will list all fields.
|
2410
|
+
# @param page_token [::String]
|
2411
|
+
# The value returned by the last `ListAssetsResponse`; indicates
|
2412
|
+
# that this is a continuation of a prior `ListAssets` call, and
|
2413
|
+
# that the system should return the next page of data.
|
2414
|
+
# @param page_size [::Integer]
|
2415
|
+
# The maximum number of results to return in a single response. Default is
|
2416
|
+
# 10, minimum is 1, maximum is 1000.
|
2417
|
+
#
|
2418
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2419
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>]
|
2420
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2421
|
+
#
|
2422
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>]
|
2423
|
+
#
|
2424
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2425
|
+
#
|
2426
|
+
# @example Basic example
|
2427
|
+
# require "google/cloud/security_center/v1"
|
2428
|
+
#
|
2429
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2430
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
2431
|
+
#
|
2432
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2433
|
+
# request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new
|
2434
|
+
#
|
2435
|
+
# # Call the list_assets method.
|
2436
|
+
# result = client.list_assets request
|
2437
|
+
#
|
2438
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2439
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2440
|
+
# result.each do |item|
|
2441
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult.
|
2442
|
+
# p item
|
2443
|
+
# end
|
2444
|
+
#
|
2445
|
+
def list_assets request, options = nil
|
2446
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2447
|
+
|
2448
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest
|
2449
|
+
|
2450
|
+
# Converts hash and nil to an options object
|
2451
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2452
|
+
|
2453
|
+
# Customize the options with defaults
|
2454
|
+
metadata = @config.rpcs.list_assets.metadata.to_h
|
2455
|
+
|
2456
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2457
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2458
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2459
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
2460
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2461
|
+
|
2462
|
+
header_params = {}
|
2463
|
+
if request.parent
|
2464
|
+
header_params["parent"] = request.parent
|
2465
|
+
end
|
2466
|
+
|
2467
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2468
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2469
|
+
|
2470
|
+
options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
|
2471
|
+
metadata: metadata,
|
2472
|
+
retry_policy: @config.rpcs.list_assets.retry_policy
|
2473
|
+
|
2474
|
+
options.apply_defaults timeout: @config.timeout,
|
2475
|
+
metadata: @config.metadata,
|
2476
|
+
retry_policy: @config.retry_policy
|
2477
|
+
|
2478
|
+
@security_center_stub.call_rpc :list_assets, request, options: options do |response, operation|
|
2479
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_assets, request, response, operation, options
|
2480
|
+
yield response, operation if block_given?
|
2481
|
+
return response
|
2482
|
+
end
|
2483
|
+
rescue ::GRPC::BadStatus => e
|
2484
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2485
|
+
end
|
2486
|
+
|
2487
|
+
##
|
2488
|
+
# Returns a list of all resident SecurityHealthAnalyticsCustomModules under
|
2489
|
+
# the given CRM parent and all of the parent’s CRM descendants.
|
2490
|
+
#
|
2491
|
+
# @overload list_descendant_security_health_analytics_custom_modules(request, options = nil)
|
2492
|
+
# Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type
|
2493
|
+
# {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
|
2494
|
+
#
|
2495
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
|
2496
|
+
# A request object representing the call parameters. Required. To specify no
|
2497
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2498
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2499
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2500
|
+
#
|
2501
|
+
# @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
|
2502
|
+
# Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at
|
2503
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2504
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2505
|
+
#
|
2506
|
+
# @param parent [::String]
|
2507
|
+
# Required. Name of parent to list descendant custom modules. Its format is
|
2508
|
+
# "organizations/\\{organization}/securityHealthAnalyticsSettings",
|
2509
|
+
# "folders/\\{folder}/securityHealthAnalyticsSettings", or
|
2510
|
+
# "projects/\\{project}/securityHealthAnalyticsSettings"
|
2023
2511
|
# @param page_size [::Integer]
|
2024
2512
|
# The maximum number of results to return in a single response. Default is
|
2025
2513
|
# 10, minimum is 1, maximum is 1000.
|
2514
|
+
# @param page_token [::String]
|
2515
|
+
# The value returned by the last call indicating a continuation
|
2026
2516
|
#
|
2027
2517
|
# @yield [response, operation] Access the result along with the RPC operation
|
2028
|
-
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::
|
2518
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
|
2029
2519
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2030
2520
|
#
|
2031
|
-
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::
|
2521
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
|
2032
2522
|
#
|
2033
2523
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2034
2524
|
#
|
@@ -2039,30 +2529,28 @@ module Google
|
|
2039
2529
|
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
2040
2530
|
#
|
2041
2531
|
# # Create a request. To set request fields, pass in keyword arguments.
|
2042
|
-
# request = Google::Cloud::SecurityCenter::V1::
|
2532
|
+
# request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new
|
2043
2533
|
#
|
2044
|
-
# # Call the
|
2045
|
-
# result = client.
|
2534
|
+
# # Call the list_descendant_security_health_analytics_custom_modules method.
|
2535
|
+
# result = client.list_descendant_security_health_analytics_custom_modules request
|
2046
2536
|
#
|
2047
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2048
|
-
# #
|
2049
|
-
#
|
2050
|
-
#
|
2051
|
-
#
|
2052
|
-
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult.
|
2053
|
-
# p response
|
2537
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2538
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2539
|
+
# result.each do |item|
|
2540
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.
|
2541
|
+
# p item
|
2054
2542
|
# end
|
2055
2543
|
#
|
2056
|
-
def
|
2544
|
+
def list_descendant_security_health_analytics_custom_modules request, options = nil
|
2057
2545
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2058
2546
|
|
2059
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::
|
2547
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest
|
2060
2548
|
|
2061
2549
|
# Converts hash and nil to an options object
|
2062
2550
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2063
2551
|
|
2064
2552
|
# Customize the options with defaults
|
2065
|
-
metadata = @config.rpcs.
|
2553
|
+
metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h
|
2066
2554
|
|
2067
2555
|
# Set x-goog-api-client and x-goog-user-project headers
|
2068
2556
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -2078,16 +2566,16 @@ module Google
|
|
2078
2566
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2079
2567
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2080
2568
|
|
2081
|
-
options.apply_defaults timeout: @config.rpcs.
|
2569
|
+
options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout,
|
2082
2570
|
metadata: metadata,
|
2083
|
-
retry_policy: @config.rpcs.
|
2571
|
+
retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy
|
2084
2572
|
|
2085
2573
|
options.apply_defaults timeout: @config.timeout,
|
2086
2574
|
metadata: @config.metadata,
|
2087
2575
|
retry_policy: @config.retry_policy
|
2088
2576
|
|
2089
|
-
@security_center_stub.call_rpc :
|
2090
|
-
response = ::Gapic::PagedEnumerable.new @security_center_stub, :
|
2577
|
+
@security_center_stub.call_rpc :list_descendant_security_health_analytics_custom_modules, request, options: options do |response, operation|
|
2578
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, request, response, operation, options
|
2091
2579
|
yield response, operation if block_given?
|
2092
2580
|
return response
|
2093
2581
|
end
|
@@ -2272,13 +2760,11 @@ module Google
|
|
2272
2760
|
# # Call the list_findings method.
|
2273
2761
|
# result = client.list_findings request
|
2274
2762
|
#
|
2275
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2276
|
-
# #
|
2277
|
-
#
|
2278
|
-
# # methods are also available for managing paging directly.
|
2279
|
-
# result.each do |response|
|
2763
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2764
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2765
|
+
# result.each do |item|
|
2280
2766
|
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult.
|
2281
|
-
# p
|
2767
|
+
# p item
|
2282
2768
|
# end
|
2283
2769
|
#
|
2284
2770
|
def list_findings request, options = nil
|
@@ -2377,13 +2863,11 @@ module Google
|
|
2377
2863
|
# # Call the list_mute_configs method.
|
2378
2864
|
# result = client.list_mute_configs request
|
2379
2865
|
#
|
2380
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2381
|
-
# #
|
2382
|
-
#
|
2383
|
-
# # methods are also available for managing paging directly.
|
2384
|
-
# result.each do |response|
|
2866
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2867
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2868
|
+
# result.each do |item|
|
2385
2869
|
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig.
|
2386
|
-
# p
|
2870
|
+
# p item
|
2387
2871
|
# end
|
2388
2872
|
#
|
2389
2873
|
def list_mute_configs request, options = nil
|
@@ -2478,13 +2962,11 @@ module Google
|
|
2478
2962
|
# # Call the list_notification_configs method.
|
2479
2963
|
# result = client.list_notification_configs request
|
2480
2964
|
#
|
2481
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2482
|
-
# #
|
2483
|
-
#
|
2484
|
-
# # methods are also available for managing paging directly.
|
2485
|
-
# result.each do |response|
|
2965
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2966
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2967
|
+
# result.each do |item|
|
2486
2968
|
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig.
|
2487
|
-
# p
|
2969
|
+
# p item
|
2488
2970
|
# end
|
2489
2971
|
#
|
2490
2972
|
def list_notification_configs request, options = nil
|
@@ -2529,6 +3011,206 @@ module Google
|
|
2529
3011
|
raise ::Google::Cloud::Error.from_error(e)
|
2530
3012
|
end
|
2531
3013
|
|
3014
|
+
##
|
3015
|
+
# Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the
|
3016
|
+
# given parent. This includes resident modules defined at the scope of the
|
3017
|
+
# parent, and inherited modules, inherited from CRM ancestors.
|
3018
|
+
#
|
3019
|
+
# @overload list_effective_security_health_analytics_custom_modules(request, options = nil)
|
3020
|
+
# Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type
|
3021
|
+
# {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
|
3022
|
+
#
|
3023
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
|
3024
|
+
# A request object representing the call parameters. Required. To specify no
|
3025
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3026
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3027
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3028
|
+
#
|
3029
|
+
# @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
|
3030
|
+
# Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at
|
3031
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3032
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3033
|
+
#
|
3034
|
+
# @param parent [::String]
|
3035
|
+
# Required. Name of parent to list effective custom modules. Its format is
|
3036
|
+
# "organizations/\\{organization}/securityHealthAnalyticsSettings",
|
3037
|
+
# "folders/\\{folder}/securityHealthAnalyticsSettings", or
|
3038
|
+
# "projects/\\{project}/securityHealthAnalyticsSettings"
|
3039
|
+
# @param page_size [::Integer]
|
3040
|
+
# The maximum number of results to return in a single response. Default is
|
3041
|
+
# 10, minimum is 1, maximum is 1000.
|
3042
|
+
# @param page_token [::String]
|
3043
|
+
# The value returned by the last call indicating a continuation
|
3044
|
+
#
|
3045
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3046
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>]
|
3047
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3048
|
+
#
|
3049
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>]
|
3050
|
+
#
|
3051
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3052
|
+
#
|
3053
|
+
# @example Basic example
|
3054
|
+
# require "google/cloud/security_center/v1"
|
3055
|
+
#
|
3056
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3057
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3058
|
+
#
|
3059
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3060
|
+
# request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new
|
3061
|
+
#
|
3062
|
+
# # Call the list_effective_security_health_analytics_custom_modules method.
|
3063
|
+
# result = client.list_effective_security_health_analytics_custom_modules request
|
3064
|
+
#
|
3065
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3066
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3067
|
+
# result.each do |item|
|
3068
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.
|
3069
|
+
# p item
|
3070
|
+
# end
|
3071
|
+
#
|
3072
|
+
def list_effective_security_health_analytics_custom_modules request, options = nil
|
3073
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3074
|
+
|
3075
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest
|
3076
|
+
|
3077
|
+
# Converts hash and nil to an options object
|
3078
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3079
|
+
|
3080
|
+
# Customize the options with defaults
|
3081
|
+
metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h
|
3082
|
+
|
3083
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3084
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3085
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3086
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3087
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3088
|
+
|
3089
|
+
header_params = {}
|
3090
|
+
if request.parent
|
3091
|
+
header_params["parent"] = request.parent
|
3092
|
+
end
|
3093
|
+
|
3094
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3095
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3096
|
+
|
3097
|
+
options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout,
|
3098
|
+
metadata: metadata,
|
3099
|
+
retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy
|
3100
|
+
|
3101
|
+
options.apply_defaults timeout: @config.timeout,
|
3102
|
+
metadata: @config.metadata,
|
3103
|
+
retry_policy: @config.retry_policy
|
3104
|
+
|
3105
|
+
@security_center_stub.call_rpc :list_effective_security_health_analytics_custom_modules, request, options: options do |response, operation|
|
3106
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, request, response, operation, options
|
3107
|
+
yield response, operation if block_given?
|
3108
|
+
return response
|
3109
|
+
end
|
3110
|
+
rescue ::GRPC::BadStatus => e
|
3111
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3112
|
+
end
|
3113
|
+
|
3114
|
+
##
|
3115
|
+
# Returns a list of all SecurityHealthAnalyticsCustomModules for the given
|
3116
|
+
# parent. This includes resident modules defined at the scope of the parent,
|
3117
|
+
# and inherited modules, inherited from CRM ancestors.
|
3118
|
+
#
|
3119
|
+
# @overload list_security_health_analytics_custom_modules(request, options = nil)
|
3120
|
+
# Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type
|
3121
|
+
# {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
|
3122
|
+
#
|
3123
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
|
3124
|
+
# A request object representing the call parameters. Required. To specify no
|
3125
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3126
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3127
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3128
|
+
#
|
3129
|
+
# @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
|
3130
|
+
# Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at
|
3131
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3132
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3133
|
+
#
|
3134
|
+
# @param parent [::String]
|
3135
|
+
# Required. Name of parent to list custom modules. Its format is
|
3136
|
+
# "organizations/\\{organization}/securityHealthAnalyticsSettings",
|
3137
|
+
# "folders/\\{folder}/securityHealthAnalyticsSettings", or
|
3138
|
+
# "projects/\\{project}/securityHealthAnalyticsSettings"
|
3139
|
+
# @param page_size [::Integer]
|
3140
|
+
# The maximum number of results to return in a single response. Default is
|
3141
|
+
# 10, minimum is 1, maximum is 1000.
|
3142
|
+
# @param page_token [::String]
|
3143
|
+
# The value returned by the last call indicating a continuation
|
3144
|
+
#
|
3145
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3146
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
|
3147
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3148
|
+
#
|
3149
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
|
3150
|
+
#
|
3151
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3152
|
+
#
|
3153
|
+
# @example Basic example
|
3154
|
+
# require "google/cloud/security_center/v1"
|
3155
|
+
#
|
3156
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3157
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3158
|
+
#
|
3159
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3160
|
+
# request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new
|
3161
|
+
#
|
3162
|
+
# # Call the list_security_health_analytics_custom_modules method.
|
3163
|
+
# result = client.list_security_health_analytics_custom_modules request
|
3164
|
+
#
|
3165
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3166
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3167
|
+
# result.each do |item|
|
3168
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.
|
3169
|
+
# p item
|
3170
|
+
# end
|
3171
|
+
#
|
3172
|
+
def list_security_health_analytics_custom_modules request, options = nil
|
3173
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3174
|
+
|
3175
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest
|
3176
|
+
|
3177
|
+
# Converts hash and nil to an options object
|
3178
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3179
|
+
|
3180
|
+
# Customize the options with defaults
|
3181
|
+
metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h
|
3182
|
+
|
3183
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3184
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3185
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3186
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3187
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3188
|
+
|
3189
|
+
header_params = {}
|
3190
|
+
if request.parent
|
3191
|
+
header_params["parent"] = request.parent
|
3192
|
+
end
|
3193
|
+
|
3194
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3195
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3196
|
+
|
3197
|
+
options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout,
|
3198
|
+
metadata: metadata,
|
3199
|
+
retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy
|
3200
|
+
|
3201
|
+
options.apply_defaults timeout: @config.timeout,
|
3202
|
+
metadata: @config.metadata,
|
3203
|
+
retry_policy: @config.retry_policy
|
3204
|
+
|
3205
|
+
@security_center_stub.call_rpc :list_security_health_analytics_custom_modules, request, options: options do |response, operation|
|
3206
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, request, response, operation, options
|
3207
|
+
yield response, operation if block_given?
|
3208
|
+
return response
|
3209
|
+
end
|
3210
|
+
rescue ::GRPC::BadStatus => e
|
3211
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3212
|
+
end
|
3213
|
+
|
2532
3214
|
##
|
2533
3215
|
# Lists all sources belonging to an organization.
|
2534
3216
|
#
|
@@ -2579,13 +3261,11 @@ module Google
|
|
2579
3261
|
# # Call the list_sources method.
|
2580
3262
|
# result = client.list_sources request
|
2581
3263
|
#
|
2582
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2583
|
-
# #
|
2584
|
-
#
|
2585
|
-
# # methods are also available for managing paging directly.
|
2586
|
-
# result.each do |response|
|
3264
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3265
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3266
|
+
# result.each do |item|
|
2587
3267
|
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source.
|
2588
|
-
# p
|
3268
|
+
# p item
|
2589
3269
|
# end
|
2590
3270
|
#
|
2591
3271
|
def list_sources request, options = nil
|
@@ -2677,14 +3357,14 @@ module Google
|
|
2677
3357
|
# # Call the run_asset_discovery method.
|
2678
3358
|
# result = client.run_asset_discovery request
|
2679
3359
|
#
|
2680
|
-
# # The returned object is of type Gapic::Operation. You can use
|
2681
|
-
# #
|
2682
|
-
# #
|
3360
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3361
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3362
|
+
# # Here is how to wait for a response.
|
2683
3363
|
# result.wait_until_done! timeout: 60
|
2684
3364
|
# if result.response?
|
2685
3365
|
# p result.response
|
2686
3366
|
# else
|
2687
|
-
# puts "
|
3367
|
+
# puts "No response received."
|
2688
3368
|
# end
|
2689
3369
|
#
|
2690
3370
|
def run_asset_discovery request, options = nil
|
@@ -3558,6 +4238,97 @@ module Google
|
|
3558
4238
|
raise ::Google::Cloud::Error.from_error(e)
|
3559
4239
|
end
|
3560
4240
|
|
4241
|
+
##
|
4242
|
+
# Updates the SecurityHealthAnalyticsCustomModule under the given name based
|
4243
|
+
# on the given update mask. Updating the enablement state is supported on
|
4244
|
+
# both resident and inherited modules (though resident modules cannot have an
|
4245
|
+
# enablement state of “inherited”). Updating the display name and custom
|
4246
|
+
# config of a module is supported on resident modules only.
|
4247
|
+
#
|
4248
|
+
# @overload update_security_health_analytics_custom_module(request, options = nil)
|
4249
|
+
# Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type
|
4250
|
+
# {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
|
4251
|
+
#
|
4252
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
|
4253
|
+
# A request object representing the call parameters. Required. To specify no
|
4254
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4255
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4256
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4257
|
+
#
|
4258
|
+
# @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil)
|
4259
|
+
# Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at
|
4260
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4261
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4262
|
+
#
|
4263
|
+
# @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
|
4264
|
+
# Required. The SecurityHealthAnalytics custom module to update.
|
4265
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4266
|
+
# The list of fields to update.
|
4267
|
+
#
|
4268
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4269
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
4270
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4271
|
+
#
|
4272
|
+
# @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
4273
|
+
#
|
4274
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4275
|
+
#
|
4276
|
+
# @example Basic example
|
4277
|
+
# require "google/cloud/security_center/v1"
|
4278
|
+
#
|
4279
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4280
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
4281
|
+
#
|
4282
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4283
|
+
# request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new
|
4284
|
+
#
|
4285
|
+
# # Call the update_security_health_analytics_custom_module method.
|
4286
|
+
# result = client.update_security_health_analytics_custom_module request
|
4287
|
+
#
|
4288
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.
|
4289
|
+
# p result
|
4290
|
+
#
|
4291
|
+
def update_security_health_analytics_custom_module request, options = nil
|
4292
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4293
|
+
|
4294
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest
|
4295
|
+
|
4296
|
+
# Converts hash and nil to an options object
|
4297
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4298
|
+
|
4299
|
+
# Customize the options with defaults
|
4300
|
+
metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h
|
4301
|
+
|
4302
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4303
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4304
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4305
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
4306
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4307
|
+
|
4308
|
+
header_params = {}
|
4309
|
+
if request.security_health_analytics_custom_module&.name
|
4310
|
+
header_params["security_health_analytics_custom_module.name"] = request.security_health_analytics_custom_module.name
|
4311
|
+
end
|
4312
|
+
|
4313
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4314
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4315
|
+
|
4316
|
+
options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout,
|
4317
|
+
metadata: metadata,
|
4318
|
+
retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy
|
4319
|
+
|
4320
|
+
options.apply_defaults timeout: @config.timeout,
|
4321
|
+
metadata: @config.metadata,
|
4322
|
+
retry_policy: @config.retry_policy
|
4323
|
+
|
4324
|
+
@security_center_stub.call_rpc :update_security_health_analytics_custom_module, request, options: options do |response, operation|
|
4325
|
+
yield response, operation if block_given?
|
4326
|
+
return response
|
4327
|
+
end
|
4328
|
+
rescue ::GRPC::BadStatus => e
|
4329
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4330
|
+
end
|
4331
|
+
|
3561
4332
|
##
|
3562
4333
|
# Updates a source.
|
3563
4334
|
#
|
@@ -4070,13 +4841,11 @@ module Google
|
|
4070
4841
|
# # Call the list_big_query_exports method.
|
4071
4842
|
# result = client.list_big_query_exports request
|
4072
4843
|
#
|
4073
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4074
|
-
# #
|
4075
|
-
#
|
4076
|
-
# # methods are also available for managing paging directly.
|
4077
|
-
# result.each do |response|
|
4844
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4845
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4846
|
+
# result.each do |item|
|
4078
4847
|
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
4079
|
-
# p
|
4848
|
+
# p item
|
4080
4849
|
# end
|
4081
4850
|
#
|
4082
4851
|
def list_big_query_exports request, options = nil
|
@@ -4159,9 +4928,9 @@ module Google
|
|
4159
4928
|
# * (`String`) The path to a service account key file in JSON format
|
4160
4929
|
# * (`Hash`) A service account key as a Hash
|
4161
4930
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
4162
|
-
# (see the [googleauth docs](https://
|
4931
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
4163
4932
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
4164
|
-
# (see the [signet docs](https://
|
4933
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
4165
4934
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
4166
4935
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
4167
4936
|
# * (`nil`) indicating no credentials
|
@@ -4262,6 +5031,11 @@ module Google
|
|
4262
5031
|
#
|
4263
5032
|
attr_reader :bulk_mute_findings
|
4264
5033
|
##
|
5034
|
+
# RPC-specific configuration for `create_security_health_analytics_custom_module`
|
5035
|
+
# @return [::Gapic::Config::Method]
|
5036
|
+
#
|
5037
|
+
attr_reader :create_security_health_analytics_custom_module
|
5038
|
+
##
|
4265
5039
|
# RPC-specific configuration for `create_source`
|
4266
5040
|
# @return [::Gapic::Config::Method]
|
4267
5041
|
#
|
@@ -4292,6 +5066,11 @@ module Google
|
|
4292
5066
|
#
|
4293
5067
|
attr_reader :delete_notification_config
|
4294
5068
|
##
|
5069
|
+
# RPC-specific configuration for `delete_security_health_analytics_custom_module`
|
5070
|
+
# @return [::Gapic::Config::Method]
|
5071
|
+
#
|
5072
|
+
attr_reader :delete_security_health_analytics_custom_module
|
5073
|
+
##
|
4295
5074
|
# RPC-specific configuration for `get_big_query_export`
|
4296
5075
|
# @return [::Gapic::Config::Method]
|
4297
5076
|
#
|
@@ -4317,6 +5096,16 @@ module Google
|
|
4317
5096
|
#
|
4318
5097
|
attr_reader :get_organization_settings
|
4319
5098
|
##
|
5099
|
+
# RPC-specific configuration for `get_effective_security_health_analytics_custom_module`
|
5100
|
+
# @return [::Gapic::Config::Method]
|
5101
|
+
#
|
5102
|
+
attr_reader :get_effective_security_health_analytics_custom_module
|
5103
|
+
##
|
5104
|
+
# RPC-specific configuration for `get_security_health_analytics_custom_module`
|
5105
|
+
# @return [::Gapic::Config::Method]
|
5106
|
+
#
|
5107
|
+
attr_reader :get_security_health_analytics_custom_module
|
5108
|
+
##
|
4320
5109
|
# RPC-specific configuration for `get_source`
|
4321
5110
|
# @return [::Gapic::Config::Method]
|
4322
5111
|
#
|
@@ -4337,6 +5126,11 @@ module Google
|
|
4337
5126
|
#
|
4338
5127
|
attr_reader :list_assets
|
4339
5128
|
##
|
5129
|
+
# RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules`
|
5130
|
+
# @return [::Gapic::Config::Method]
|
5131
|
+
#
|
5132
|
+
attr_reader :list_descendant_security_health_analytics_custom_modules
|
5133
|
+
##
|
4340
5134
|
# RPC-specific configuration for `list_findings`
|
4341
5135
|
# @return [::Gapic::Config::Method]
|
4342
5136
|
#
|
@@ -4352,6 +5146,16 @@ module Google
|
|
4352
5146
|
#
|
4353
5147
|
attr_reader :list_notification_configs
|
4354
5148
|
##
|
5149
|
+
# RPC-specific configuration for `list_effective_security_health_analytics_custom_modules`
|
5150
|
+
# @return [::Gapic::Config::Method]
|
5151
|
+
#
|
5152
|
+
attr_reader :list_effective_security_health_analytics_custom_modules
|
5153
|
+
##
|
5154
|
+
# RPC-specific configuration for `list_security_health_analytics_custom_modules`
|
5155
|
+
# @return [::Gapic::Config::Method]
|
5156
|
+
#
|
5157
|
+
attr_reader :list_security_health_analytics_custom_modules
|
5158
|
+
##
|
4355
5159
|
# RPC-specific configuration for `list_sources`
|
4356
5160
|
# @return [::Gapic::Config::Method]
|
4357
5161
|
#
|
@@ -4407,6 +5211,11 @@ module Google
|
|
4407
5211
|
#
|
4408
5212
|
attr_reader :update_organization_settings
|
4409
5213
|
##
|
5214
|
+
# RPC-specific configuration for `update_security_health_analytics_custom_module`
|
5215
|
+
# @return [::Gapic::Config::Method]
|
5216
|
+
#
|
5217
|
+
attr_reader :update_security_health_analytics_custom_module
|
5218
|
+
##
|
4410
5219
|
# RPC-specific configuration for `update_source`
|
4411
5220
|
# @return [::Gapic::Config::Method]
|
4412
5221
|
#
|
@@ -4441,6 +5250,8 @@ module Google
|
|
4441
5250
|
def initialize parent_rpcs = nil
|
4442
5251
|
bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings
|
4443
5252
|
@bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config
|
5253
|
+
create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module
|
5254
|
+
@create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config
|
4444
5255
|
create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source
|
4445
5256
|
@create_source = ::Gapic::Config::Method.new create_source_config
|
4446
5257
|
create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding
|
@@ -4453,6 +5264,8 @@ module Google
|
|
4453
5264
|
@delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
|
4454
5265
|
delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
|
4455
5266
|
@delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
|
5267
|
+
delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module
|
5268
|
+
@delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config
|
4456
5269
|
get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
|
4457
5270
|
@get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
|
4458
5271
|
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
@@ -4463,6 +5276,10 @@ module Google
|
|
4463
5276
|
@get_notification_config = ::Gapic::Config::Method.new get_notification_config_config
|
4464
5277
|
get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings
|
4465
5278
|
@get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config
|
5279
|
+
get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module
|
5280
|
+
@get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config
|
5281
|
+
get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module
|
5282
|
+
@get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config
|
4466
5283
|
get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source
|
4467
5284
|
@get_source = ::Gapic::Config::Method.new get_source_config
|
4468
5285
|
group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets
|
@@ -4471,12 +5288,18 @@ module Google
|
|
4471
5288
|
@group_findings = ::Gapic::Config::Method.new group_findings_config
|
4472
5289
|
list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
|
4473
5290
|
@list_assets = ::Gapic::Config::Method.new list_assets_config
|
5291
|
+
list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules
|
5292
|
+
@list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config
|
4474
5293
|
list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings
|
4475
5294
|
@list_findings = ::Gapic::Config::Method.new list_findings_config
|
4476
5295
|
list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs
|
4477
5296
|
@list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config
|
4478
5297
|
list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs
|
4479
5298
|
@list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config
|
5299
|
+
list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules
|
5300
|
+
@list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config
|
5301
|
+
list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules
|
5302
|
+
@list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config
|
4480
5303
|
list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources
|
4481
5304
|
@list_sources = ::Gapic::Config::Method.new list_sources_config
|
4482
5305
|
run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery
|
@@ -4499,6 +5322,8 @@ module Google
|
|
4499
5322
|
@update_notification_config = ::Gapic::Config::Method.new update_notification_config_config
|
4500
5323
|
update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings
|
4501
5324
|
@update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config
|
5325
|
+
update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module
|
5326
|
+
@update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config
|
4502
5327
|
update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source
|
4503
5328
|
@update_source = ::Gapic::Config::Method.new update_source_config
|
4504
5329
|
update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks
|