google-cloud-security_center-v1 0.41.0 → 1.1.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 +0 -1
- data/lib/google/cloud/security_center/v1/security_center/client.rb +2096 -182
- data/lib/google/cloud/security_center/v1/security_center/paths.rb +313 -0
- data/lib/google/cloud/security_center/v1/security_center/rest/client.rb +1977 -189
- data/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb +1926 -595
- data/lib/google/cloud/security_center/v1/version.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/asset_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb +46 -0
- data/lib/google/cloud/securitycenter/v1/attack_path_pb.rb +49 -0
- data/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb +48 -0
- data/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb +50 -0
- data/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v1/external_system_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/finding_pb.rb +6 -1
- data/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/mute_config_pb.rb +2 -1
- data/lib/google/cloud/securitycenter/v1/notification_config_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/resource_pb.rb +13 -1
- data/lib/google/cloud/securitycenter/v1/resource_value_config_pb.rb +50 -0
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb +45 -2
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +54 -0
- data/lib/google/cloud/securitycenter/v1/simulation_pb.rb +50 -0
- data/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb +46 -0
- data/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb +73 -0
- data/proto_docs/google/cloud/securitycenter/v1/attack_path.rb +147 -0
- data/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb +6 -6
- data/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb +77 -0
- data/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb +88 -0
- data/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb +69 -0
- data/proto_docs/google/cloud/securitycenter/v1/finding.rb +50 -0
- data/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb +19 -1
- data/proto_docs/google/cloud/securitycenter/v1/mute_config.rb +36 -3
- data/proto_docs/google/cloud/securitycenter/v1/resource.rb +223 -0
- data/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb +125 -0
- data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +626 -87
- data/proto_docs/google/cloud/securitycenter/v1/simulation.rb +46 -0
- data/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb +86 -0
- data/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +3 -0
- metadata +18 -2
@@ -302,15 +302,15 @@ module Google
|
|
302
302
|
# @param options [::Gapic::CallOptions, ::Hash]
|
303
303
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
304
304
|
#
|
305
|
-
# @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil)
|
305
|
+
# @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil)
|
306
306
|
# Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at
|
307
307
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
308
308
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
309
309
|
#
|
310
310
|
# @param parent [::String]
|
311
311
|
# Required. The parent, at which bulk action needs to be applied. Its format
|
312
|
-
# is
|
313
|
-
#
|
312
|
+
# is `organizations/[organization_id]`, `folders/[folder_id]`,
|
313
|
+
# `projects/[project_id]`.
|
314
314
|
# @param filter [::String]
|
315
315
|
# Expression that identifies findings that should be updated.
|
316
316
|
# The expression is a list of zero or more restrictions combined
|
@@ -335,6 +335,10 @@ module Google
|
|
335
335
|
# @param mute_annotation [::String]
|
336
336
|
# This can be a mute configuration name or any identifier for mute/unmute
|
337
337
|
# of findings based on the filter.
|
338
|
+
# @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState]
|
339
|
+
# Optional. All findings matching the given filter will have their mute state
|
340
|
+
# set to this value. The default value is `MUTED`. Setting this to
|
341
|
+
# `UNDEFINED` will clear the mute state on all matching findings.
|
338
342
|
#
|
339
343
|
# @yield [response, operation] Access the result along with the RPC operation
|
340
344
|
# @yieldparam response [::Gapic::Operation]
|
@@ -432,9 +436,9 @@ module Google
|
|
432
436
|
#
|
433
437
|
# @param parent [::String]
|
434
438
|
# Required. Resource name of the new custom module's parent. Its format is
|
435
|
-
#
|
436
|
-
#
|
437
|
-
#
|
439
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
440
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
441
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
438
442
|
# @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
|
439
443
|
# Required. SecurityHealthAnalytics custom module to create. The provided
|
440
444
|
# name is ignored and reset with provided parent information and
|
@@ -525,7 +529,7 @@ module Google
|
|
525
529
|
#
|
526
530
|
# @param parent [::String]
|
527
531
|
# Required. Resource name of the new source's parent. Its format should be
|
528
|
-
#
|
532
|
+
# `organizations/[organization_id]`.
|
529
533
|
# @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash]
|
530
534
|
# Required. The Source being created, only the display_name and description
|
531
535
|
# will be used. All other fields will be ignored.
|
@@ -616,7 +620,7 @@ module Google
|
|
616
620
|
#
|
617
621
|
# @param parent [::String]
|
618
622
|
# Required. Resource name of the new finding's parent. Its format should be
|
619
|
-
#
|
623
|
+
# `organizations/[organization_id]/sources/[source_id]`.
|
620
624
|
# @param finding_id [::String]
|
621
625
|
# Required. Unique identifier provided by the client within the parent scope.
|
622
626
|
# It must be alphanumeric and less than or equal to 32 characters and
|
@@ -710,8 +714,8 @@ module Google
|
|
710
714
|
#
|
711
715
|
# @param parent [::String]
|
712
716
|
# Required. Resource name of the new mute configs's parent. Its format is
|
713
|
-
#
|
714
|
-
#
|
717
|
+
# `organizations/[organization_id]`, `folders/[folder_id]`, or
|
718
|
+
# `projects/[project_id]`.
|
715
719
|
# @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash]
|
716
720
|
# Required. The mute config being created.
|
717
721
|
# @param mute_config_id [::String]
|
@@ -805,8 +809,8 @@ module Google
|
|
805
809
|
#
|
806
810
|
# @param parent [::String]
|
807
811
|
# Required. Resource name of the new notification config's parent. Its format
|
808
|
-
# is
|
809
|
-
#
|
812
|
+
# is `organizations/[organization_id]`, `folders/[folder_id]`, or
|
813
|
+
# `projects/[project_id]`.
|
810
814
|
# @param config_id [::String]
|
811
815
|
# Required.
|
812
816
|
# Unique identifier provided by the client within the parent scope.
|
@@ -902,9 +906,12 @@ module Google
|
|
902
906
|
#
|
903
907
|
# @param name [::String]
|
904
908
|
# Required. Name of the mute config to delete. Its format is
|
905
|
-
# organizations
|
906
|
-
# folders
|
907
|
-
# projects
|
909
|
+
# `organizations/{organization}/muteConfigs/{config_id}`,
|
910
|
+
# `folders/{folder}/muteConfigs/{config_id}`,
|
911
|
+
# `projects/{project}/muteConfigs/{config_id}`,
|
912
|
+
# `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
|
913
|
+
# `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
|
914
|
+
# `projects/{project}/locations/global/muteConfigs/{config_id}`.
|
908
915
|
#
|
909
916
|
# @yield [response, operation] Access the result along with the RPC operation
|
910
917
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -991,9 +998,9 @@ module Google
|
|
991
998
|
#
|
992
999
|
# @param name [::String]
|
993
1000
|
# Required. Name of the notification config to delete. Its format is
|
994
|
-
#
|
995
|
-
#
|
996
|
-
# or
|
1001
|
+
# `organizations/[organization_id]/notificationConfigs/[config_id]`,
|
1002
|
+
# `folders/[folder_id]/notificationConfigs/[config_id]`,
|
1003
|
+
# or `projects/[project_id]/notificationConfigs/[config_id]`.
|
997
1004
|
#
|
998
1005
|
# @yield [response, operation] Access the result along with the RPC operation
|
999
1006
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -1082,10 +1089,10 @@ module Google
|
|
1082
1089
|
#
|
1083
1090
|
# @param name [::String]
|
1084
1091
|
# Required. Name of the custom module to delete. Its format is
|
1085
|
-
#
|
1086
|
-
#
|
1092
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1093
|
+
# `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1087
1094
|
# or
|
1088
|
-
#
|
1095
|
+
# `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
|
1089
1096
|
#
|
1090
1097
|
# @yield [response, operation] Access the result along with the RPC operation
|
1091
1098
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -1152,6 +1159,186 @@ module Google
|
|
1152
1159
|
raise ::Google::Cloud::Error.from_error(e)
|
1153
1160
|
end
|
1154
1161
|
|
1162
|
+
##
|
1163
|
+
# Get the simulation by name or the latest simulation for the given
|
1164
|
+
# organization.
|
1165
|
+
#
|
1166
|
+
# @overload get_simulation(request, options = nil)
|
1167
|
+
# Pass arguments to `get_simulation` via a request object, either of type
|
1168
|
+
# {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash.
|
1169
|
+
#
|
1170
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash]
|
1171
|
+
# A request object representing the call parameters. Required. To specify no
|
1172
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1173
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1174
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1175
|
+
#
|
1176
|
+
# @overload get_simulation(name: nil)
|
1177
|
+
# Pass arguments to `get_simulation` via keyword arguments. Note that at
|
1178
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1179
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1180
|
+
#
|
1181
|
+
# @param name [::String]
|
1182
|
+
# Required. The organization name or simulation name of this simulation
|
1183
|
+
#
|
1184
|
+
# Valid format:
|
1185
|
+
# `organizations/{organization}/simulations/latest`
|
1186
|
+
# `organizations/{organization}/simulations/{simulation}`
|
1187
|
+
#
|
1188
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1189
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::Simulation]
|
1190
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1191
|
+
#
|
1192
|
+
# @return [::Google::Cloud::SecurityCenter::V1::Simulation]
|
1193
|
+
#
|
1194
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1195
|
+
#
|
1196
|
+
# @example Basic example
|
1197
|
+
# require "google/cloud/security_center/v1"
|
1198
|
+
#
|
1199
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1200
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
1201
|
+
#
|
1202
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1203
|
+
# request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new
|
1204
|
+
#
|
1205
|
+
# # Call the get_simulation method.
|
1206
|
+
# result = client.get_simulation request
|
1207
|
+
#
|
1208
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation.
|
1209
|
+
# p result
|
1210
|
+
#
|
1211
|
+
def get_simulation request, options = nil
|
1212
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1213
|
+
|
1214
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest
|
1215
|
+
|
1216
|
+
# Converts hash and nil to an options object
|
1217
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1218
|
+
|
1219
|
+
# Customize the options with defaults
|
1220
|
+
metadata = @config.rpcs.get_simulation.metadata.to_h
|
1221
|
+
|
1222
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1223
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1224
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1225
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
1226
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1227
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1228
|
+
|
1229
|
+
header_params = {}
|
1230
|
+
if request.name
|
1231
|
+
header_params["name"] = request.name
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1235
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1236
|
+
|
1237
|
+
options.apply_defaults timeout: @config.rpcs.get_simulation.timeout,
|
1238
|
+
metadata: metadata,
|
1239
|
+
retry_policy: @config.rpcs.get_simulation.retry_policy
|
1240
|
+
|
1241
|
+
options.apply_defaults timeout: @config.timeout,
|
1242
|
+
metadata: @config.metadata,
|
1243
|
+
retry_policy: @config.retry_policy
|
1244
|
+
|
1245
|
+
@security_center_stub.call_rpc :get_simulation, request, options: options do |response, operation|
|
1246
|
+
yield response, operation if block_given?
|
1247
|
+
return response
|
1248
|
+
end
|
1249
|
+
rescue ::GRPC::BadStatus => e
|
1250
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1251
|
+
end
|
1252
|
+
|
1253
|
+
##
|
1254
|
+
# Get the valued resource by name
|
1255
|
+
#
|
1256
|
+
# @overload get_valued_resource(request, options = nil)
|
1257
|
+
# Pass arguments to `get_valued_resource` via a request object, either of type
|
1258
|
+
# {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash.
|
1259
|
+
#
|
1260
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash]
|
1261
|
+
# A request object representing the call parameters. Required. To specify no
|
1262
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1263
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1264
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1265
|
+
#
|
1266
|
+
# @overload get_valued_resource(name: nil)
|
1267
|
+
# Pass arguments to `get_valued_resource` via keyword arguments. Note that at
|
1268
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1269
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1270
|
+
#
|
1271
|
+
# @param name [::String]
|
1272
|
+
# Required. The name of this valued resource
|
1273
|
+
#
|
1274
|
+
# Valid format:
|
1275
|
+
# `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
|
1276
|
+
#
|
1277
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1278
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValuedResource]
|
1279
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1280
|
+
#
|
1281
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ValuedResource]
|
1282
|
+
#
|
1283
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1284
|
+
#
|
1285
|
+
# @example Basic example
|
1286
|
+
# require "google/cloud/security_center/v1"
|
1287
|
+
#
|
1288
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1289
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
1290
|
+
#
|
1291
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1292
|
+
# request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new
|
1293
|
+
#
|
1294
|
+
# # Call the get_valued_resource method.
|
1295
|
+
# result = client.get_valued_resource request
|
1296
|
+
#
|
1297
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource.
|
1298
|
+
# p result
|
1299
|
+
#
|
1300
|
+
def get_valued_resource request, options = nil
|
1301
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1302
|
+
|
1303
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest
|
1304
|
+
|
1305
|
+
# Converts hash and nil to an options object
|
1306
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1307
|
+
|
1308
|
+
# Customize the options with defaults
|
1309
|
+
metadata = @config.rpcs.get_valued_resource.metadata.to_h
|
1310
|
+
|
1311
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1312
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1313
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1314
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
1315
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1316
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1317
|
+
|
1318
|
+
header_params = {}
|
1319
|
+
if request.name
|
1320
|
+
header_params["name"] = request.name
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1324
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1325
|
+
|
1326
|
+
options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout,
|
1327
|
+
metadata: metadata,
|
1328
|
+
retry_policy: @config.rpcs.get_valued_resource.retry_policy
|
1329
|
+
|
1330
|
+
options.apply_defaults timeout: @config.timeout,
|
1331
|
+
metadata: @config.metadata,
|
1332
|
+
retry_policy: @config.retry_policy
|
1333
|
+
|
1334
|
+
@security_center_stub.call_rpc :get_valued_resource, request, options: options do |response, operation|
|
1335
|
+
yield response, operation if block_given?
|
1336
|
+
return response
|
1337
|
+
end
|
1338
|
+
rescue ::GRPC::BadStatus => e
|
1339
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1340
|
+
end
|
1341
|
+
|
1155
1342
|
##
|
1156
1343
|
# Gets a BigQuery export.
|
1157
1344
|
#
|
@@ -1172,9 +1359,9 @@ module Google
|
|
1172
1359
|
#
|
1173
1360
|
# @param name [::String]
|
1174
1361
|
# Required. Name of the BigQuery export to retrieve. Its format is
|
1175
|
-
# organizations
|
1176
|
-
# folders
|
1177
|
-
# projects
|
1362
|
+
# `organizations/{organization}/bigQueryExports/{export_id}`,
|
1363
|
+
# `folders/{folder}/bigQueryExports/{export_id}`, or
|
1364
|
+
# `projects/{project}/bigQueryExports/{export_id}`
|
1178
1365
|
#
|
1179
1366
|
# @yield [response, operation] Access the result along with the RPC operation
|
1180
1367
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
@@ -1351,9 +1538,12 @@ module Google
|
|
1351
1538
|
#
|
1352
1539
|
# @param name [::String]
|
1353
1540
|
# Required. Name of the mute config to retrieve. Its format is
|
1354
|
-
# organizations
|
1355
|
-
# folders
|
1356
|
-
# projects
|
1541
|
+
# `organizations/{organization}/muteConfigs/{config_id}`,
|
1542
|
+
# `folders/{folder}/muteConfigs/{config_id}`,
|
1543
|
+
# `projects/{project}/muteConfigs/{config_id}`,
|
1544
|
+
# `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
|
1545
|
+
# `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
|
1546
|
+
# `projects/{project}/locations/global/muteConfigs/{config_id}`.
|
1357
1547
|
#
|
1358
1548
|
# @yield [response, operation] Access the result along with the RPC operation
|
1359
1549
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig]
|
@@ -1440,9 +1630,9 @@ module Google
|
|
1440
1630
|
#
|
1441
1631
|
# @param name [::String]
|
1442
1632
|
# Required. Name of the notification config to get. Its format is
|
1443
|
-
#
|
1444
|
-
#
|
1445
|
-
# or
|
1633
|
+
# `organizations/[organization_id]/notificationConfigs/[config_id]`,
|
1634
|
+
# `folders/[folder_id]/notificationConfigs/[config_id]`,
|
1635
|
+
# or `projects/[project_id]/notificationConfigs/[config_id]`.
|
1446
1636
|
#
|
1447
1637
|
# @yield [response, operation] Access the result along with the RPC operation
|
1448
1638
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
|
@@ -1529,7 +1719,7 @@ module Google
|
|
1529
1719
|
#
|
1530
1720
|
# @param name [::String]
|
1531
1721
|
# Required. Name of the organization to get organization settings for. Its
|
1532
|
-
# format is
|
1722
|
+
# format is `organizations/[organization_id]/organizationSettings`.
|
1533
1723
|
#
|
1534
1724
|
# @yield [response, operation] Access the result along with the RPC operation
|
1535
1725
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
|
@@ -1616,10 +1806,10 @@ module Google
|
|
1616
1806
|
#
|
1617
1807
|
# @param name [::String]
|
1618
1808
|
# Required. Name of the effective custom module to get. Its format is
|
1619
|
-
#
|
1620
|
-
#
|
1809
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
|
1810
|
+
# `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
|
1621
1811
|
# or
|
1622
|
-
#
|
1812
|
+
# `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
|
1623
1813
|
#
|
1624
1814
|
# @yield [response, operation] Access the result along with the RPC operation
|
1625
1815
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule]
|
@@ -1706,10 +1896,10 @@ module Google
|
|
1706
1896
|
#
|
1707
1897
|
# @param name [::String]
|
1708
1898
|
# Required. Name of the custom module to get. Its format is
|
1709
|
-
#
|
1710
|
-
#
|
1899
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1900
|
+
# `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1711
1901
|
# or
|
1712
|
-
#
|
1902
|
+
# `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
|
1713
1903
|
#
|
1714
1904
|
# @yield [response, operation] Access the result along with the RPC operation
|
1715
1905
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
@@ -1796,7 +1986,7 @@ module Google
|
|
1796
1986
|
#
|
1797
1987
|
# @param name [::String]
|
1798
1988
|
# Required. Relative resource name of the source. Its format is
|
1799
|
-
#
|
1989
|
+
# `organizations/[organization_id]/source/[source_id]`.
|
1800
1990
|
#
|
1801
1991
|
# @yield [response, operation] Access the result along with the RPC operation
|
1802
1992
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source]
|
@@ -1886,8 +2076,8 @@ module Google
|
|
1886
2076
|
#
|
1887
2077
|
# @param parent [::String]
|
1888
2078
|
# Required. The name of the parent to group the assets by. Its format is
|
1889
|
-
#
|
1890
|
-
#
|
2079
|
+
# `organizations/[organization_id]`, `folders/[folder_id]`, or
|
2080
|
+
# `projects/[project_id]`.
|
1891
2081
|
# @param filter [::String]
|
1892
2082
|
# Expression that defines the filter to apply across assets.
|
1893
2083
|
# The expression is a list of zero or more restrictions combined via logical
|
@@ -2107,12 +2297,12 @@ module Google
|
|
2107
2297
|
#
|
2108
2298
|
# @param parent [::String]
|
2109
2299
|
# Required. Name of the source to groupBy. Its format is
|
2110
|
-
#
|
2111
|
-
# folders/[folder_id]/sources/[source_id]
|
2112
|
-
# projects/[project_id]/sources/[source_id]
|
2300
|
+
# `organizations/[organization_id]/sources/[source_id]`,
|
2301
|
+
# `folders/[folder_id]/sources/[source_id]`, or
|
2302
|
+
# `projects/[project_id]/sources/[source_id]`. To groupBy across all sources
|
2113
2303
|
# provide a source_id of `-`. For example:
|
2114
|
-
# organizations
|
2115
|
-
# or projects
|
2304
|
+
# `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`,
|
2305
|
+
# or `projects/{project_id}/sources/-`
|
2116
2306
|
# @param filter [::String]
|
2117
2307
|
# Expression that defines the filter to apply across findings.
|
2118
2308
|
# The expression is a list of one or more restrictions combined via logical
|
@@ -2178,14 +2368,6 @@ module Google
|
|
2178
2368
|
# (including `state_change`). The string value should follow SQL syntax:
|
2179
2369
|
# comma separated list of fields. For example: "parent,resource_name".
|
2180
2370
|
#
|
2181
|
-
# The following fields are supported:
|
2182
|
-
#
|
2183
|
-
# * resource_name
|
2184
|
-
# * category
|
2185
|
-
# * state
|
2186
|
-
# * parent
|
2187
|
-
# * severity
|
2188
|
-
#
|
2189
2371
|
# The following fields are supported when compare_duration is set:
|
2190
2372
|
#
|
2191
2373
|
# * state_change
|
@@ -2329,8 +2511,8 @@ module Google
|
|
2329
2511
|
# Required. The name of the parent resource that contains the assets. The
|
2330
2512
|
# value that you can specify on parent depends on the method in which you
|
2331
2513
|
# specify parent. You can specify one of the following values:
|
2332
|
-
#
|
2333
|
-
#
|
2514
|
+
# `organizations/[organization_id]`, `folders/[folder_id]`, or
|
2515
|
+
# `projects/[project_id]`.
|
2334
2516
|
# @param filter [::String]
|
2335
2517
|
# Expression that defines the filter to apply across assets.
|
2336
2518
|
# The expression is a list of zero or more restrictions combined via logical
|
@@ -2549,9 +2731,9 @@ module Google
|
|
2549
2731
|
#
|
2550
2732
|
# @param parent [::String]
|
2551
2733
|
# Required. Name of parent to list descendant custom modules. Its format is
|
2552
|
-
#
|
2553
|
-
#
|
2554
|
-
#
|
2734
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
2735
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
2736
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
2555
2737
|
# @param page_size [::Integer]
|
2556
2738
|
# The maximum number of results to return in a single response. Default is
|
2557
2739
|
# 10, minimum is 1, maximum is 1000.
|
@@ -2651,12 +2833,12 @@ module Google
|
|
2651
2833
|
#
|
2652
2834
|
# @param parent [::String]
|
2653
2835
|
# Required. Name of the source the findings belong to. Its format is
|
2654
|
-
#
|
2655
|
-
# folders/[folder_id]/sources/[source_id]
|
2656
|
-
# projects/[project_id]/sources/[source_id]
|
2836
|
+
# `organizations/[organization_id]/sources/[source_id]`,
|
2837
|
+
# `folders/[folder_id]/sources/[source_id]`, or
|
2838
|
+
# `projects/[project_id]/sources/[source_id]`. To list across all sources
|
2657
2839
|
# provide a source_id of `-`. For example:
|
2658
|
-
# organizations
|
2659
|
-
# projects
|
2840
|
+
# `organizations/{organization_id}/sources/-`,
|
2841
|
+
# `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
|
2660
2842
|
# @param filter [::String]
|
2661
2843
|
# Expression that defines the filter to apply across findings.
|
2662
2844
|
# The expression is a list of one or more restrictions combined via logical
|
@@ -2875,8 +3057,8 @@ module Google
|
|
2875
3057
|
#
|
2876
3058
|
# @param parent [::String]
|
2877
3059
|
# Required. The parent, which owns the collection of mute configs. Its format
|
2878
|
-
# is
|
2879
|
-
#
|
3060
|
+
# is `organizations/[organization_id]`, `folders/[folder_id]`,
|
3061
|
+
# `projects/[project_id]`.
|
2880
3062
|
# @param page_size [::Integer]
|
2881
3063
|
# The maximum number of configs to return. The service may return fewer than
|
2882
3064
|
# this value.
|
@@ -3081,9 +3263,9 @@ module Google
|
|
3081
3263
|
#
|
3082
3264
|
# @param parent [::String]
|
3083
3265
|
# Required. Name of parent to list effective custom modules. Its format is
|
3084
|
-
#
|
3085
|
-
#
|
3086
|
-
#
|
3266
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
3267
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
3268
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
3087
3269
|
# @param page_size [::Integer]
|
3088
3270
|
# The maximum number of results to return in a single response. Default is
|
3089
3271
|
# 10, minimum is 1, maximum is 1000.
|
@@ -3182,9 +3364,9 @@ module Google
|
|
3182
3364
|
#
|
3183
3365
|
# @param parent [::String]
|
3184
3366
|
# Required. Name of parent to list custom modules. Its format is
|
3185
|
-
#
|
3186
|
-
#
|
3187
|
-
#
|
3367
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
3368
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
3369
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
3188
3370
|
# @param page_size [::Integer]
|
3189
3371
|
# The maximum number of results to return in a single response. Default is
|
3190
3372
|
# 10, minimum is 1, maximum is 1000.
|
@@ -3281,8 +3463,8 @@ module Google
|
|
3281
3463
|
#
|
3282
3464
|
# @param parent [::String]
|
3283
3465
|
# Required. Resource name of the parent of sources to list. Its format should
|
3284
|
-
# be
|
3285
|
-
#
|
3466
|
+
# be `organizations/[organization_id]`, `folders/[folder_id]`, or
|
3467
|
+
# `projects/[project_id]`.
|
3286
3468
|
# @param page_token [::String]
|
3287
3469
|
# The value returned by the last `ListSourcesResponse`; indicates
|
3288
3470
|
# that this is a continuation of a prior `ListSources` call, and
|
@@ -3388,7 +3570,7 @@ module Google
|
|
3388
3570
|
#
|
3389
3571
|
# @param parent [::String]
|
3390
3572
|
# Required. Name of the organization to run asset discovery for. Its format
|
3391
|
-
# is
|
3573
|
+
# is `organizations/[organization_id]`.
|
3392
3574
|
#
|
3393
3575
|
# @yield [response, operation] Access the result along with the RPC operation
|
3394
3576
|
# @yieldparam response [::Gapic::Operation]
|
@@ -3485,9 +3667,9 @@ module Google
|
|
3485
3667
|
# Required. The [relative resource
|
3486
3668
|
# name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
|
3487
3669
|
# of the finding. Example:
|
3488
|
-
#
|
3489
|
-
#
|
3490
|
-
#
|
3670
|
+
# `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
|
3671
|
+
# `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
|
3672
|
+
# `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
|
3491
3673
|
# @param state [::Google::Cloud::SecurityCenter::V1::Finding::State]
|
3492
3674
|
# Required. The desired State of the finding.
|
3493
3675
|
# @param start_time [::Google::Protobuf::Timestamp, ::Hash]
|
@@ -3580,9 +3762,9 @@ module Google
|
|
3580
3762
|
# Required. The [relative resource
|
3581
3763
|
# name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
|
3582
3764
|
# of the finding. Example:
|
3583
|
-
#
|
3584
|
-
#
|
3585
|
-
#
|
3765
|
+
# `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
|
3766
|
+
# `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
|
3767
|
+
# `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
|
3586
3768
|
# @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute]
|
3587
3769
|
# Required. The desired state of the Mute.
|
3588
3770
|
#
|
@@ -4420,7 +4602,9 @@ module Google
|
|
4420
4602
|
# @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
|
4421
4603
|
# Required. The SecurityHealthAnalytics custom module to update.
|
4422
4604
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4423
|
-
# The list of fields to
|
4605
|
+
# The list of fields to be updated. The only fields that can be updated are
|
4606
|
+
# `enablement_state` and `custom_config`. If empty or set to the wildcard
|
4607
|
+
# value `*`, both `enablement_state` and `custom_config` are updated.
|
4424
4608
|
#
|
4425
4609
|
# @yield [response, operation] Access the result along with the RPC operation
|
4426
4610
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
@@ -4694,8 +4878,8 @@ module Google
|
|
4694
4878
|
#
|
4695
4879
|
# @param parent [::String]
|
4696
4880
|
# Required. The name of the parent resource of the new BigQuery export. Its
|
4697
|
-
# format is
|
4698
|
-
#
|
4881
|
+
# format is `organizations/[organization_id]`, `folders/[folder_id]`, or
|
4882
|
+
# `projects/[project_id]`.
|
4699
4883
|
# @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
|
4700
4884
|
# Required. The BigQuery export being created.
|
4701
4885
|
# @param big_query_export_id [::String]
|
@@ -4789,9 +4973,9 @@ module Google
|
|
4789
4973
|
#
|
4790
4974
|
# @param name [::String]
|
4791
4975
|
# Required. The name of the BigQuery export to delete. Its format is
|
4792
|
-
# organizations
|
4793
|
-
# folders
|
4794
|
-
# projects
|
4976
|
+
# `organizations/{organization}/bigQueryExports/{export_id}`,
|
4977
|
+
# `folders/{folder}/bigQueryExports/{export_id}`, or
|
4978
|
+
# `projects/{project}/bigQueryExports/{export_id}`
|
4795
4979
|
#
|
4796
4980
|
# @yield [response, operation] Access the result along with the RPC operation
|
4797
4981
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -4971,8 +5155,8 @@ module Google
|
|
4971
5155
|
#
|
4972
5156
|
# @param parent [::String]
|
4973
5157
|
# Required. The parent, which owns the collection of BigQuery exports. Its
|
4974
|
-
# format is
|
4975
|
-
#
|
5158
|
+
# format is `organizations/[organization_id]`, `folders/[folder_id]`,
|
5159
|
+
# `projects/[project_id]`.
|
4976
5160
|
# @param page_size [::Integer]
|
4977
5161
|
# The maximum number of configs to return. The service may return fewer than
|
4978
5162
|
# this value.
|
@@ -5055,109 +5239,1713 @@ module Google
|
|
5055
5239
|
end
|
5056
5240
|
|
5057
5241
|
##
|
5058
|
-
#
|
5242
|
+
# Creates a resident Event Threat Detection custom module at the scope of the
|
5243
|
+
# given Resource Manager parent, and also creates inherited custom modules
|
5244
|
+
# for all descendants of the given parent. These modules are enabled by
|
5245
|
+
# default.
|
5059
5246
|
#
|
5060
|
-
#
|
5061
|
-
#
|
5062
|
-
#
|
5063
|
-
# applied individually to specific RPCs. See
|
5064
|
-
# {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration::Rpcs}
|
5065
|
-
# for a list of RPCs that can be configured independently.
|
5247
|
+
# @overload create_event_threat_detection_custom_module(request, options = nil)
|
5248
|
+
# Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type
|
5249
|
+
# {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5066
5250
|
#
|
5067
|
-
#
|
5068
|
-
#
|
5251
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash]
|
5252
|
+
# A request object representing the call parameters. Required. To specify no
|
5253
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5254
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5255
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5069
5256
|
#
|
5070
|
-
# @
|
5257
|
+
# @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil)
|
5258
|
+
# Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5259
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5260
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5071
5261
|
#
|
5072
|
-
#
|
5073
|
-
#
|
5074
|
-
# # and all remaining timeouts to 10 seconds.
|
5075
|
-
# ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config|
|
5076
|
-
# config.timeout = 10.0
|
5077
|
-
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
5078
|
-
# end
|
5262
|
+
# @param parent [::String]
|
5263
|
+
# Required. The new custom module's parent.
|
5079
5264
|
#
|
5080
|
-
#
|
5081
|
-
# client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config|
|
5082
|
-
# config.timeout = 10.0
|
5083
|
-
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
5084
|
-
# end
|
5265
|
+
# Its format is:
|
5085
5266
|
#
|
5086
|
-
#
|
5087
|
-
#
|
5088
|
-
#
|
5089
|
-
# @
|
5090
|
-
#
|
5091
|
-
#
|
5092
|
-
#
|
5093
|
-
# * (`Hash`) A service account key as a Hash
|
5094
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
5095
|
-
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
5096
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
5097
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
5098
|
-
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
5099
|
-
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
5100
|
-
# * (`nil`) indicating no credentials
|
5101
|
-
# @return [::Object]
|
5102
|
-
# @!attribute [rw] scope
|
5103
|
-
# The OAuth scopes
|
5104
|
-
# @return [::Array<::String>]
|
5105
|
-
# @!attribute [rw] lib_name
|
5106
|
-
# The library name as recorded in instrumentation and logging
|
5107
|
-
# @return [::String]
|
5108
|
-
# @!attribute [rw] lib_version
|
5109
|
-
# The library version as recorded in instrumentation and logging
|
5110
|
-
# @return [::String]
|
5111
|
-
# @!attribute [rw] channel_args
|
5112
|
-
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
5113
|
-
# `GRPC::Core::Channel` object is provided as the credential.
|
5114
|
-
# @return [::Hash]
|
5115
|
-
# @!attribute [rw] interceptors
|
5116
|
-
# An array of interceptors that are run before calls are executed.
|
5117
|
-
# @return [::Array<::GRPC::ClientInterceptor>]
|
5118
|
-
# @!attribute [rw] timeout
|
5119
|
-
# The call timeout in seconds.
|
5120
|
-
# @return [::Numeric]
|
5121
|
-
# @!attribute [rw] metadata
|
5122
|
-
# Additional gRPC headers to be sent with the call.
|
5123
|
-
# @return [::Hash{::Symbol=>::String}]
|
5124
|
-
# @!attribute [rw] retry_policy
|
5125
|
-
# The retry policy. The value is a hash with the following keys:
|
5126
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
5127
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
5128
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
5129
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
5130
|
-
# trigger a retry.
|
5131
|
-
# @return [::Hash]
|
5132
|
-
# @!attribute [rw] quota_project
|
5133
|
-
# A separate project against which to charge quota.
|
5134
|
-
# @return [::String]
|
5135
|
-
# @!attribute [rw] universe_domain
|
5136
|
-
# The universe domain within which to make requests. This determines the
|
5137
|
-
# default endpoint URL. The default value of nil uses the environment
|
5138
|
-
# universe (usually the default "googleapis.com" universe).
|
5139
|
-
# @return [::String,nil]
|
5267
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5268
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5269
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5270
|
+
# @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash]
|
5271
|
+
# Required. The module to create. The
|
5272
|
+
# event_threat_detection_custom_module.name will be ignored and server
|
5273
|
+
# generated.
|
5140
5274
|
#
|
5141
|
-
|
5142
|
-
|
5275
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5276
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5277
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5278
|
+
#
|
5279
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5280
|
+
#
|
5281
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5282
|
+
#
|
5283
|
+
# @example Basic example
|
5284
|
+
# require "google/cloud/security_center/v1"
|
5285
|
+
#
|
5286
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5287
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5288
|
+
#
|
5289
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5290
|
+
# request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new
|
5291
|
+
#
|
5292
|
+
# # Call the create_event_threat_detection_custom_module method.
|
5293
|
+
# result = client.create_event_threat_detection_custom_module request
|
5294
|
+
#
|
5295
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5296
|
+
# p result
|
5297
|
+
#
|
5298
|
+
def create_event_threat_detection_custom_module request, options = nil
|
5299
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5143
5300
|
|
5144
|
-
|
5145
|
-
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
5146
|
-
DEFAULT_ENDPOINT = "securitycenter.googleapis.com"
|
5301
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest
|
5147
5302
|
|
5148
|
-
|
5149
|
-
|
5150
|
-
|
5151
|
-
|
5152
|
-
|
5153
|
-
|
5154
|
-
|
5155
|
-
|
5156
|
-
|
5157
|
-
|
5158
|
-
|
5159
|
-
|
5160
|
-
|
5303
|
+
# Converts hash and nil to an options object
|
5304
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5305
|
+
|
5306
|
+
# Customize the options with defaults
|
5307
|
+
metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h
|
5308
|
+
|
5309
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5310
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5311
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5312
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
5313
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5314
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5315
|
+
|
5316
|
+
header_params = {}
|
5317
|
+
if request.parent
|
5318
|
+
header_params["parent"] = request.parent
|
5319
|
+
end
|
5320
|
+
|
5321
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5322
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5323
|
+
|
5324
|
+
options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout,
|
5325
|
+
metadata: metadata,
|
5326
|
+
retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy
|
5327
|
+
|
5328
|
+
options.apply_defaults timeout: @config.timeout,
|
5329
|
+
metadata: @config.metadata,
|
5330
|
+
retry_policy: @config.retry_policy
|
5331
|
+
|
5332
|
+
@security_center_stub.call_rpc :create_event_threat_detection_custom_module, request, options: options do |response, operation|
|
5333
|
+
yield response, operation if block_given?
|
5334
|
+
return response
|
5335
|
+
end
|
5336
|
+
rescue ::GRPC::BadStatus => e
|
5337
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5338
|
+
end
|
5339
|
+
|
5340
|
+
##
|
5341
|
+
# Deletes the specified Event Threat Detection custom module and all of its
|
5342
|
+
# descendants in the Resource Manager hierarchy. This method is only
|
5343
|
+
# supported for resident custom modules.
|
5344
|
+
#
|
5345
|
+
# @overload delete_event_threat_detection_custom_module(request, options = nil)
|
5346
|
+
# Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type
|
5347
|
+
# {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5348
|
+
#
|
5349
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash]
|
5350
|
+
# A request object representing the call parameters. Required. To specify no
|
5351
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5352
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5353
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5354
|
+
#
|
5355
|
+
# @overload delete_event_threat_detection_custom_module(name: nil)
|
5356
|
+
# Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5357
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5358
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5359
|
+
#
|
5360
|
+
# @param name [::String]
|
5361
|
+
# Required. Name of the custom module to delete.
|
5362
|
+
#
|
5363
|
+
# Its format is:
|
5364
|
+
#
|
5365
|
+
# * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
|
5366
|
+
# * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
|
5367
|
+
# * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
|
5368
|
+
#
|
5369
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5370
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
5371
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5372
|
+
#
|
5373
|
+
# @return [::Google::Protobuf::Empty]
|
5374
|
+
#
|
5375
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5376
|
+
#
|
5377
|
+
# @example Basic example
|
5378
|
+
# require "google/cloud/security_center/v1"
|
5379
|
+
#
|
5380
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5381
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5382
|
+
#
|
5383
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5384
|
+
# request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new
|
5385
|
+
#
|
5386
|
+
# # Call the delete_event_threat_detection_custom_module method.
|
5387
|
+
# result = client.delete_event_threat_detection_custom_module request
|
5388
|
+
#
|
5389
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
5390
|
+
# p result
|
5391
|
+
#
|
5392
|
+
def delete_event_threat_detection_custom_module request, options = nil
|
5393
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5394
|
+
|
5395
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest
|
5396
|
+
|
5397
|
+
# Converts hash and nil to an options object
|
5398
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5399
|
+
|
5400
|
+
# Customize the options with defaults
|
5401
|
+
metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h
|
5402
|
+
|
5403
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5404
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5405
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5406
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
5407
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5408
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5409
|
+
|
5410
|
+
header_params = {}
|
5411
|
+
if request.name
|
5412
|
+
header_params["name"] = request.name
|
5413
|
+
end
|
5414
|
+
|
5415
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5416
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5417
|
+
|
5418
|
+
options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout,
|
5419
|
+
metadata: metadata,
|
5420
|
+
retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy
|
5421
|
+
|
5422
|
+
options.apply_defaults timeout: @config.timeout,
|
5423
|
+
metadata: @config.metadata,
|
5424
|
+
retry_policy: @config.retry_policy
|
5425
|
+
|
5426
|
+
@security_center_stub.call_rpc :delete_event_threat_detection_custom_module, request, options: options do |response, operation|
|
5427
|
+
yield response, operation if block_given?
|
5428
|
+
return response
|
5429
|
+
end
|
5430
|
+
rescue ::GRPC::BadStatus => e
|
5431
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5432
|
+
end
|
5433
|
+
|
5434
|
+
##
|
5435
|
+
# Gets an Event Threat Detection custom module.
|
5436
|
+
#
|
5437
|
+
# @overload get_event_threat_detection_custom_module(request, options = nil)
|
5438
|
+
# Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type
|
5439
|
+
# {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5440
|
+
#
|
5441
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash]
|
5442
|
+
# A request object representing the call parameters. Required. To specify no
|
5443
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5444
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5445
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5446
|
+
#
|
5447
|
+
# @overload get_event_threat_detection_custom_module(name: nil)
|
5448
|
+
# Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5449
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5450
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5451
|
+
#
|
5452
|
+
# @param name [::String]
|
5453
|
+
# Required. Name of the custom module to get.
|
5454
|
+
#
|
5455
|
+
# Its format is:
|
5456
|
+
#
|
5457
|
+
# * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
|
5458
|
+
# * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
|
5459
|
+
# * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
|
5460
|
+
#
|
5461
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5462
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5463
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5464
|
+
#
|
5465
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5466
|
+
#
|
5467
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5468
|
+
#
|
5469
|
+
# @example Basic example
|
5470
|
+
# require "google/cloud/security_center/v1"
|
5471
|
+
#
|
5472
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5473
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5474
|
+
#
|
5475
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5476
|
+
# request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new
|
5477
|
+
#
|
5478
|
+
# # Call the get_event_threat_detection_custom_module method.
|
5479
|
+
# result = client.get_event_threat_detection_custom_module request
|
5480
|
+
#
|
5481
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5482
|
+
# p result
|
5483
|
+
#
|
5484
|
+
def get_event_threat_detection_custom_module request, options = nil
|
5485
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5486
|
+
|
5487
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest
|
5488
|
+
|
5489
|
+
# Converts hash and nil to an options object
|
5490
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5491
|
+
|
5492
|
+
# Customize the options with defaults
|
5493
|
+
metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h
|
5494
|
+
|
5495
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5496
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5497
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5498
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
5499
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5500
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5501
|
+
|
5502
|
+
header_params = {}
|
5503
|
+
if request.name
|
5504
|
+
header_params["name"] = request.name
|
5505
|
+
end
|
5506
|
+
|
5507
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5508
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5509
|
+
|
5510
|
+
options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout,
|
5511
|
+
metadata: metadata,
|
5512
|
+
retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy
|
5513
|
+
|
5514
|
+
options.apply_defaults timeout: @config.timeout,
|
5515
|
+
metadata: @config.metadata,
|
5516
|
+
retry_policy: @config.retry_policy
|
5517
|
+
|
5518
|
+
@security_center_stub.call_rpc :get_event_threat_detection_custom_module, request, options: options do |response, operation|
|
5519
|
+
yield response, operation if block_given?
|
5520
|
+
return response
|
5521
|
+
end
|
5522
|
+
rescue ::GRPC::BadStatus => e
|
5523
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5524
|
+
end
|
5525
|
+
|
5526
|
+
##
|
5527
|
+
# Lists all resident Event Threat Detection custom modules under the
|
5528
|
+
# given Resource Manager parent and its descendants.
|
5529
|
+
#
|
5530
|
+
# @overload list_descendant_event_threat_detection_custom_modules(request, options = nil)
|
5531
|
+
# Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type
|
5532
|
+
# {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
|
5533
|
+
#
|
5534
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash]
|
5535
|
+
# A request object representing the call parameters. Required. To specify no
|
5536
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5537
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5538
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5539
|
+
#
|
5540
|
+
# @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil)
|
5541
|
+
# Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at
|
5542
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5543
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5544
|
+
#
|
5545
|
+
# @param parent [::String]
|
5546
|
+
# Required. Name of the parent to list custom modules under.
|
5547
|
+
#
|
5548
|
+
# Its format is:
|
5549
|
+
#
|
5550
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5551
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5552
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5553
|
+
# @param page_token [::String]
|
5554
|
+
# A page token, received from a previous
|
5555
|
+
# `ListDescendantEventThreatDetectionCustomModules` call. Provide this to
|
5556
|
+
# retrieve the subsequent page.
|
5557
|
+
#
|
5558
|
+
# When paginating, all other parameters provided to
|
5559
|
+
# `ListDescendantEventThreatDetectionCustomModules` must match the call that
|
5560
|
+
# provided the page token.
|
5561
|
+
# @param page_size [::Integer]
|
5562
|
+
# The maximum number of modules to return. The service may return fewer than
|
5563
|
+
# this value.
|
5564
|
+
# If unspecified, at most 10 configs will be returned.
|
5565
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
5566
|
+
#
|
5567
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5568
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5569
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5570
|
+
#
|
5571
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5572
|
+
#
|
5573
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5574
|
+
#
|
5575
|
+
# @example Basic example
|
5576
|
+
# require "google/cloud/security_center/v1"
|
5577
|
+
#
|
5578
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5579
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5580
|
+
#
|
5581
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5582
|
+
# request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new
|
5583
|
+
#
|
5584
|
+
# # Call the list_descendant_event_threat_detection_custom_modules method.
|
5585
|
+
# result = client.list_descendant_event_threat_detection_custom_modules request
|
5586
|
+
#
|
5587
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5588
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5589
|
+
# result.each do |item|
|
5590
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5591
|
+
# p item
|
5592
|
+
# end
|
5593
|
+
#
|
5594
|
+
def list_descendant_event_threat_detection_custom_modules request, options = nil
|
5595
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5596
|
+
|
5597
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest
|
5598
|
+
|
5599
|
+
# Converts hash and nil to an options object
|
5600
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5601
|
+
|
5602
|
+
# Customize the options with defaults
|
5603
|
+
metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h
|
5604
|
+
|
5605
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5606
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5607
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5608
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
5609
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5610
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5611
|
+
|
5612
|
+
header_params = {}
|
5613
|
+
if request.parent
|
5614
|
+
header_params["parent"] = request.parent
|
5615
|
+
end
|
5616
|
+
|
5617
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5618
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5619
|
+
|
5620
|
+
options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout,
|
5621
|
+
metadata: metadata,
|
5622
|
+
retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy
|
5623
|
+
|
5624
|
+
options.apply_defaults timeout: @config.timeout,
|
5625
|
+
metadata: @config.metadata,
|
5626
|
+
retry_policy: @config.retry_policy
|
5627
|
+
|
5628
|
+
@security_center_stub.call_rpc :list_descendant_event_threat_detection_custom_modules, request, options: options do |response, operation|
|
5629
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, request, response, operation, options
|
5630
|
+
yield response, operation if block_given?
|
5631
|
+
return response
|
5632
|
+
end
|
5633
|
+
rescue ::GRPC::BadStatus => e
|
5634
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5635
|
+
end
|
5636
|
+
|
5637
|
+
##
|
5638
|
+
# Lists all Event Threat Detection custom modules for the given
|
5639
|
+
# Resource Manager parent. This includes resident modules defined at the
|
5640
|
+
# scope of the parent along with modules inherited from ancestors.
|
5641
|
+
#
|
5642
|
+
# @overload list_event_threat_detection_custom_modules(request, options = nil)
|
5643
|
+
# Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type
|
5644
|
+
# {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
|
5645
|
+
#
|
5646
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash]
|
5647
|
+
# A request object representing the call parameters. Required. To specify no
|
5648
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5649
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5650
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5651
|
+
#
|
5652
|
+
# @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil)
|
5653
|
+
# Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at
|
5654
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5655
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5656
|
+
#
|
5657
|
+
# @param parent [::String]
|
5658
|
+
# Required. Name of the parent to list custom modules under.
|
5659
|
+
#
|
5660
|
+
# Its format is:
|
5661
|
+
#
|
5662
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5663
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5664
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5665
|
+
# @param page_token [::String]
|
5666
|
+
# A page token, received from a previous
|
5667
|
+
# `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the
|
5668
|
+
# subsequent page.
|
5669
|
+
#
|
5670
|
+
# When paginating, all other parameters provided to
|
5671
|
+
# `ListEventThreatDetectionCustomModules` must match the call that provided
|
5672
|
+
# the page token.
|
5673
|
+
# @param page_size [::Integer]
|
5674
|
+
# The maximum number of modules to return. The service may return fewer than
|
5675
|
+
# this value.
|
5676
|
+
# If unspecified, at most 10 configs will be returned.
|
5677
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
5678
|
+
#
|
5679
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5680
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5681
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5682
|
+
#
|
5683
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5684
|
+
#
|
5685
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5686
|
+
#
|
5687
|
+
# @example Basic example
|
5688
|
+
# require "google/cloud/security_center/v1"
|
5689
|
+
#
|
5690
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5691
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5692
|
+
#
|
5693
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5694
|
+
# request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new
|
5695
|
+
#
|
5696
|
+
# # Call the list_event_threat_detection_custom_modules method.
|
5697
|
+
# result = client.list_event_threat_detection_custom_modules request
|
5698
|
+
#
|
5699
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5700
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5701
|
+
# result.each do |item|
|
5702
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5703
|
+
# p item
|
5704
|
+
# end
|
5705
|
+
#
|
5706
|
+
def list_event_threat_detection_custom_modules request, options = nil
|
5707
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5708
|
+
|
5709
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest
|
5710
|
+
|
5711
|
+
# Converts hash and nil to an options object
|
5712
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5713
|
+
|
5714
|
+
# Customize the options with defaults
|
5715
|
+
metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h
|
5716
|
+
|
5717
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5718
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5719
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5720
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
5721
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5722
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5723
|
+
|
5724
|
+
header_params = {}
|
5725
|
+
if request.parent
|
5726
|
+
header_params["parent"] = request.parent
|
5727
|
+
end
|
5728
|
+
|
5729
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5730
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5731
|
+
|
5732
|
+
options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout,
|
5733
|
+
metadata: metadata,
|
5734
|
+
retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy
|
5735
|
+
|
5736
|
+
options.apply_defaults timeout: @config.timeout,
|
5737
|
+
metadata: @config.metadata,
|
5738
|
+
retry_policy: @config.retry_policy
|
5739
|
+
|
5740
|
+
@security_center_stub.call_rpc :list_event_threat_detection_custom_modules, request, options: options do |response, operation|
|
5741
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, request, response, operation, options
|
5742
|
+
yield response, operation if block_given?
|
5743
|
+
return response
|
5744
|
+
end
|
5745
|
+
rescue ::GRPC::BadStatus => e
|
5746
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5747
|
+
end
|
5748
|
+
|
5749
|
+
##
|
5750
|
+
# Updates the Event Threat Detection custom module with the given name based
|
5751
|
+
# on the given update mask. Updating the enablement state is supported for
|
5752
|
+
# both resident and inherited modules (though resident modules cannot have an
|
5753
|
+
# enablement state of "inherited"). Updating the display name or
|
5754
|
+
# configuration of a module is supported for resident modules only. The type
|
5755
|
+
# of a module cannot be changed.
|
5756
|
+
#
|
5757
|
+
# @overload update_event_threat_detection_custom_module(request, options = nil)
|
5758
|
+
# Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type
|
5759
|
+
# {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5760
|
+
#
|
5761
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash]
|
5762
|
+
# A request object representing the call parameters. Required. To specify no
|
5763
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5764
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5765
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5766
|
+
#
|
5767
|
+
# @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil)
|
5768
|
+
# Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5769
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5770
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5771
|
+
#
|
5772
|
+
# @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash]
|
5773
|
+
# Required. The module being updated.
|
5774
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
5775
|
+
# The list of fields to be updated.
|
5776
|
+
# If empty all mutable fields will be updated.
|
5777
|
+
#
|
5778
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5779
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5780
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5781
|
+
#
|
5782
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5783
|
+
#
|
5784
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5785
|
+
#
|
5786
|
+
# @example Basic example
|
5787
|
+
# require "google/cloud/security_center/v1"
|
5788
|
+
#
|
5789
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5790
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5791
|
+
#
|
5792
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5793
|
+
# request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new
|
5794
|
+
#
|
5795
|
+
# # Call the update_event_threat_detection_custom_module method.
|
5796
|
+
# result = client.update_event_threat_detection_custom_module request
|
5797
|
+
#
|
5798
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5799
|
+
# p result
|
5800
|
+
#
|
5801
|
+
def update_event_threat_detection_custom_module request, options = nil
|
5802
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5803
|
+
|
5804
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest
|
5805
|
+
|
5806
|
+
# Converts hash and nil to an options object
|
5807
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5808
|
+
|
5809
|
+
# Customize the options with defaults
|
5810
|
+
metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h
|
5811
|
+
|
5812
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5813
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5814
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5815
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
5816
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5817
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5818
|
+
|
5819
|
+
header_params = {}
|
5820
|
+
if request.event_threat_detection_custom_module&.name
|
5821
|
+
header_params["event_threat_detection_custom_module.name"] = request.event_threat_detection_custom_module.name
|
5822
|
+
end
|
5823
|
+
|
5824
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5825
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5826
|
+
|
5827
|
+
options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout,
|
5828
|
+
metadata: metadata,
|
5829
|
+
retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy
|
5830
|
+
|
5831
|
+
options.apply_defaults timeout: @config.timeout,
|
5832
|
+
metadata: @config.metadata,
|
5833
|
+
retry_policy: @config.retry_policy
|
5834
|
+
|
5835
|
+
@security_center_stub.call_rpc :update_event_threat_detection_custom_module, request, options: options do |response, operation|
|
5836
|
+
yield response, operation if block_given?
|
5837
|
+
return response
|
5838
|
+
end
|
5839
|
+
rescue ::GRPC::BadStatus => e
|
5840
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5841
|
+
end
|
5842
|
+
|
5843
|
+
##
|
5844
|
+
# Validates the given Event Threat Detection custom module.
|
5845
|
+
#
|
5846
|
+
# @overload validate_event_threat_detection_custom_module(request, options = nil)
|
5847
|
+
# Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type
|
5848
|
+
# {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5849
|
+
#
|
5850
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash]
|
5851
|
+
# A request object representing the call parameters. Required. To specify no
|
5852
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5853
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5854
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5855
|
+
#
|
5856
|
+
# @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil)
|
5857
|
+
# Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5858
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5859
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5860
|
+
#
|
5861
|
+
# @param parent [::String]
|
5862
|
+
# Required. Resource name of the parent to validate the Custom Module under.
|
5863
|
+
#
|
5864
|
+
# Its format is:
|
5865
|
+
#
|
5866
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5867
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5868
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5869
|
+
# @param raw_text [::String]
|
5870
|
+
# Required. The raw text of the module's contents. Used to generate error
|
5871
|
+
# messages.
|
5872
|
+
# @param type [::String]
|
5873
|
+
# Required. The type of the module (e.g. CONFIGURABLE_BAD_IP).
|
5874
|
+
#
|
5875
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5876
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse]
|
5877
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5878
|
+
#
|
5879
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse]
|
5880
|
+
#
|
5881
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5882
|
+
#
|
5883
|
+
# @example Basic example
|
5884
|
+
# require "google/cloud/security_center/v1"
|
5885
|
+
#
|
5886
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5887
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5888
|
+
#
|
5889
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5890
|
+
# request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new
|
5891
|
+
#
|
5892
|
+
# # Call the validate_event_threat_detection_custom_module method.
|
5893
|
+
# result = client.validate_event_threat_detection_custom_module request
|
5894
|
+
#
|
5895
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.
|
5896
|
+
# p result
|
5897
|
+
#
|
5898
|
+
def validate_event_threat_detection_custom_module request, options = nil
|
5899
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5900
|
+
|
5901
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest
|
5902
|
+
|
5903
|
+
# Converts hash and nil to an options object
|
5904
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5905
|
+
|
5906
|
+
# Customize the options with defaults
|
5907
|
+
metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h
|
5908
|
+
|
5909
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5910
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5911
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5912
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
5913
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5914
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5915
|
+
|
5916
|
+
header_params = {}
|
5917
|
+
if request.parent
|
5918
|
+
header_params["parent"] = request.parent
|
5919
|
+
end
|
5920
|
+
|
5921
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5922
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5923
|
+
|
5924
|
+
options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout,
|
5925
|
+
metadata: metadata,
|
5926
|
+
retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy
|
5927
|
+
|
5928
|
+
options.apply_defaults timeout: @config.timeout,
|
5929
|
+
metadata: @config.metadata,
|
5930
|
+
retry_policy: @config.retry_policy
|
5931
|
+
|
5932
|
+
@security_center_stub.call_rpc :validate_event_threat_detection_custom_module, request, options: options do |response, operation|
|
5933
|
+
yield response, operation if block_given?
|
5934
|
+
return response
|
5935
|
+
end
|
5936
|
+
rescue ::GRPC::BadStatus => e
|
5937
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5938
|
+
end
|
5939
|
+
|
5940
|
+
##
|
5941
|
+
# Gets an effective Event Threat Detection custom module at the given level.
|
5942
|
+
#
|
5943
|
+
# @overload get_effective_event_threat_detection_custom_module(request, options = nil)
|
5944
|
+
# Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type
|
5945
|
+
# {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5946
|
+
#
|
5947
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash]
|
5948
|
+
# A request object representing the call parameters. Required. To specify no
|
5949
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5950
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5951
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5952
|
+
#
|
5953
|
+
# @overload get_effective_event_threat_detection_custom_module(name: nil)
|
5954
|
+
# Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5955
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5956
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5957
|
+
#
|
5958
|
+
# @param name [::String]
|
5959
|
+
# Required. The resource name of the effective Event Threat Detection custom
|
5960
|
+
# module.
|
5961
|
+
#
|
5962
|
+
# Its format is:
|
5963
|
+
#
|
5964
|
+
# * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
|
5965
|
+
# * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
|
5966
|
+
# * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
|
5967
|
+
#
|
5968
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5969
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule]
|
5970
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5971
|
+
#
|
5972
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule]
|
5973
|
+
#
|
5974
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5975
|
+
#
|
5976
|
+
# @example Basic example
|
5977
|
+
# require "google/cloud/security_center/v1"
|
5978
|
+
#
|
5979
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5980
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
5981
|
+
#
|
5982
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5983
|
+
# request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new
|
5984
|
+
#
|
5985
|
+
# # Call the get_effective_event_threat_detection_custom_module method.
|
5986
|
+
# result = client.get_effective_event_threat_detection_custom_module request
|
5987
|
+
#
|
5988
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.
|
5989
|
+
# p result
|
5990
|
+
#
|
5991
|
+
def get_effective_event_threat_detection_custom_module request, options = nil
|
5992
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5993
|
+
|
5994
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest
|
5995
|
+
|
5996
|
+
# Converts hash and nil to an options object
|
5997
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5998
|
+
|
5999
|
+
# Customize the options with defaults
|
6000
|
+
metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h
|
6001
|
+
|
6002
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6003
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6004
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6005
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6006
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6007
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6008
|
+
|
6009
|
+
header_params = {}
|
6010
|
+
if request.name
|
6011
|
+
header_params["name"] = request.name
|
6012
|
+
end
|
6013
|
+
|
6014
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6015
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6016
|
+
|
6017
|
+
options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout,
|
6018
|
+
metadata: metadata,
|
6019
|
+
retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy
|
6020
|
+
|
6021
|
+
options.apply_defaults timeout: @config.timeout,
|
6022
|
+
metadata: @config.metadata,
|
6023
|
+
retry_policy: @config.retry_policy
|
6024
|
+
|
6025
|
+
@security_center_stub.call_rpc :get_effective_event_threat_detection_custom_module, request, options: options do |response, operation|
|
6026
|
+
yield response, operation if block_given?
|
6027
|
+
return response
|
6028
|
+
end
|
6029
|
+
rescue ::GRPC::BadStatus => e
|
6030
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6031
|
+
end
|
6032
|
+
|
6033
|
+
##
|
6034
|
+
# Lists all effective Event Threat Detection custom modules for the
|
6035
|
+
# given parent. This includes resident modules defined at the scope of the
|
6036
|
+
# parent along with modules inherited from its ancestors.
|
6037
|
+
#
|
6038
|
+
# @overload list_effective_event_threat_detection_custom_modules(request, options = nil)
|
6039
|
+
# Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type
|
6040
|
+
# {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
|
6041
|
+
#
|
6042
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash]
|
6043
|
+
# A request object representing the call parameters. Required. To specify no
|
6044
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6045
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6046
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6047
|
+
#
|
6048
|
+
# @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil)
|
6049
|
+
# Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at
|
6050
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6051
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6052
|
+
#
|
6053
|
+
# @param parent [::String]
|
6054
|
+
# Required. Name of the parent to list custom modules for.
|
6055
|
+
#
|
6056
|
+
# Its format is:
|
6057
|
+
#
|
6058
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
6059
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
6060
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
6061
|
+
# @param page_token [::String]
|
6062
|
+
# A page token, received from a previous
|
6063
|
+
# `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to
|
6064
|
+
# retrieve the subsequent page.
|
6065
|
+
#
|
6066
|
+
# When paginating, all other parameters provided to
|
6067
|
+
# `ListEffectiveEventThreatDetectionCustomModules` must match the call that
|
6068
|
+
# provided the page token.
|
6069
|
+
# @param page_size [::Integer]
|
6070
|
+
# The maximum number of modules to return. The service may return fewer than
|
6071
|
+
# this value.
|
6072
|
+
# If unspecified, at most 10 configs will be returned.
|
6073
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
6074
|
+
#
|
6075
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6076
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>]
|
6077
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6078
|
+
#
|
6079
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>]
|
6080
|
+
#
|
6081
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6082
|
+
#
|
6083
|
+
# @example Basic example
|
6084
|
+
# require "google/cloud/security_center/v1"
|
6085
|
+
#
|
6086
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6087
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6088
|
+
#
|
6089
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6090
|
+
# request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new
|
6091
|
+
#
|
6092
|
+
# # Call the list_effective_event_threat_detection_custom_modules method.
|
6093
|
+
# result = client.list_effective_event_threat_detection_custom_modules request
|
6094
|
+
#
|
6095
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
6096
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
6097
|
+
# result.each do |item|
|
6098
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.
|
6099
|
+
# p item
|
6100
|
+
# end
|
6101
|
+
#
|
6102
|
+
def list_effective_event_threat_detection_custom_modules request, options = nil
|
6103
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6104
|
+
|
6105
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest
|
6106
|
+
|
6107
|
+
# Converts hash and nil to an options object
|
6108
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6109
|
+
|
6110
|
+
# Customize the options with defaults
|
6111
|
+
metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h
|
6112
|
+
|
6113
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6114
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6115
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6116
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6117
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6118
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6119
|
+
|
6120
|
+
header_params = {}
|
6121
|
+
if request.parent
|
6122
|
+
header_params["parent"] = request.parent
|
6123
|
+
end
|
6124
|
+
|
6125
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6126
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6127
|
+
|
6128
|
+
options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout,
|
6129
|
+
metadata: metadata,
|
6130
|
+
retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy
|
6131
|
+
|
6132
|
+
options.apply_defaults timeout: @config.timeout,
|
6133
|
+
metadata: @config.metadata,
|
6134
|
+
retry_policy: @config.retry_policy
|
6135
|
+
|
6136
|
+
@security_center_stub.call_rpc :list_effective_event_threat_detection_custom_modules, request, options: options do |response, operation|
|
6137
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, request, response, operation, options
|
6138
|
+
yield response, operation if block_given?
|
6139
|
+
return response
|
6140
|
+
end
|
6141
|
+
rescue ::GRPC::BadStatus => e
|
6142
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6143
|
+
end
|
6144
|
+
|
6145
|
+
##
|
6146
|
+
# Creates a ResourceValueConfig for an organization. Maps user's tags to
|
6147
|
+
# difference resource values for use by the attack path simulation.
|
6148
|
+
#
|
6149
|
+
# @overload batch_create_resource_value_configs(request, options = nil)
|
6150
|
+
# Pass arguments to `batch_create_resource_value_configs` via a request object, either of type
|
6151
|
+
# {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash.
|
6152
|
+
#
|
6153
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash]
|
6154
|
+
# A request object representing the call parameters. Required. To specify no
|
6155
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6156
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6157
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6158
|
+
#
|
6159
|
+
# @overload batch_create_resource_value_configs(parent: nil, requests: nil)
|
6160
|
+
# Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at
|
6161
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6162
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6163
|
+
#
|
6164
|
+
# @param parent [::String]
|
6165
|
+
# Required. Resource name of the new ResourceValueConfig's parent.
|
6166
|
+
# The parent field in the CreateResourceValueConfigRequest
|
6167
|
+
# messages must either be empty or match this field.
|
6168
|
+
# @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>]
|
6169
|
+
# Required. The resource value configs to be created.
|
6170
|
+
#
|
6171
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6172
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse]
|
6173
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6174
|
+
#
|
6175
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse]
|
6176
|
+
#
|
6177
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6178
|
+
#
|
6179
|
+
# @example Basic example
|
6180
|
+
# require "google/cloud/security_center/v1"
|
6181
|
+
#
|
6182
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6183
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6184
|
+
#
|
6185
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6186
|
+
# request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new
|
6187
|
+
#
|
6188
|
+
# # Call the batch_create_resource_value_configs method.
|
6189
|
+
# result = client.batch_create_resource_value_configs request
|
6190
|
+
#
|
6191
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.
|
6192
|
+
# p result
|
6193
|
+
#
|
6194
|
+
def batch_create_resource_value_configs request, options = nil
|
6195
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6196
|
+
|
6197
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest
|
6198
|
+
|
6199
|
+
# Converts hash and nil to an options object
|
6200
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6201
|
+
|
6202
|
+
# Customize the options with defaults
|
6203
|
+
metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h
|
6204
|
+
|
6205
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6206
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6207
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6208
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6209
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6210
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6211
|
+
|
6212
|
+
header_params = {}
|
6213
|
+
if request.parent
|
6214
|
+
header_params["parent"] = request.parent
|
6215
|
+
end
|
6216
|
+
|
6217
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6218
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6219
|
+
|
6220
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout,
|
6221
|
+
metadata: metadata,
|
6222
|
+
retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy
|
6223
|
+
|
6224
|
+
options.apply_defaults timeout: @config.timeout,
|
6225
|
+
metadata: @config.metadata,
|
6226
|
+
retry_policy: @config.retry_policy
|
6227
|
+
|
6228
|
+
@security_center_stub.call_rpc :batch_create_resource_value_configs, request, options: options do |response, operation|
|
6229
|
+
yield response, operation if block_given?
|
6230
|
+
return response
|
6231
|
+
end
|
6232
|
+
rescue ::GRPC::BadStatus => e
|
6233
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6234
|
+
end
|
6235
|
+
|
6236
|
+
##
|
6237
|
+
# Deletes a ResourceValueConfig.
|
6238
|
+
#
|
6239
|
+
# @overload delete_resource_value_config(request, options = nil)
|
6240
|
+
# Pass arguments to `delete_resource_value_config` via a request object, either of type
|
6241
|
+
# {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash.
|
6242
|
+
#
|
6243
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash]
|
6244
|
+
# A request object representing the call parameters. Required. To specify no
|
6245
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6246
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6247
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6248
|
+
#
|
6249
|
+
# @overload delete_resource_value_config(name: nil)
|
6250
|
+
# Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at
|
6251
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6252
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6253
|
+
#
|
6254
|
+
# @param name [::String]
|
6255
|
+
# Required. Name of the ResourceValueConfig to delete
|
6256
|
+
#
|
6257
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6258
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
6259
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6260
|
+
#
|
6261
|
+
# @return [::Google::Protobuf::Empty]
|
6262
|
+
#
|
6263
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6264
|
+
#
|
6265
|
+
# @example Basic example
|
6266
|
+
# require "google/cloud/security_center/v1"
|
6267
|
+
#
|
6268
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6269
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6270
|
+
#
|
6271
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6272
|
+
# request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new
|
6273
|
+
#
|
6274
|
+
# # Call the delete_resource_value_config method.
|
6275
|
+
# result = client.delete_resource_value_config request
|
6276
|
+
#
|
6277
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
6278
|
+
# p result
|
6279
|
+
#
|
6280
|
+
def delete_resource_value_config request, options = nil
|
6281
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6282
|
+
|
6283
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest
|
6284
|
+
|
6285
|
+
# Converts hash and nil to an options object
|
6286
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6287
|
+
|
6288
|
+
# Customize the options with defaults
|
6289
|
+
metadata = @config.rpcs.delete_resource_value_config.metadata.to_h
|
6290
|
+
|
6291
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6292
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6293
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6294
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6295
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6296
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6297
|
+
|
6298
|
+
header_params = {}
|
6299
|
+
if request.name
|
6300
|
+
header_params["name"] = request.name
|
6301
|
+
end
|
6302
|
+
|
6303
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6304
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6305
|
+
|
6306
|
+
options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout,
|
6307
|
+
metadata: metadata,
|
6308
|
+
retry_policy: @config.rpcs.delete_resource_value_config.retry_policy
|
6309
|
+
|
6310
|
+
options.apply_defaults timeout: @config.timeout,
|
6311
|
+
metadata: @config.metadata,
|
6312
|
+
retry_policy: @config.retry_policy
|
6313
|
+
|
6314
|
+
@security_center_stub.call_rpc :delete_resource_value_config, request, options: options do |response, operation|
|
6315
|
+
yield response, operation if block_given?
|
6316
|
+
return response
|
6317
|
+
end
|
6318
|
+
rescue ::GRPC::BadStatus => e
|
6319
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6320
|
+
end
|
6321
|
+
|
6322
|
+
##
|
6323
|
+
# Gets a ResourceValueConfig.
|
6324
|
+
#
|
6325
|
+
# @overload get_resource_value_config(request, options = nil)
|
6326
|
+
# Pass arguments to `get_resource_value_config` via a request object, either of type
|
6327
|
+
# {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash.
|
6328
|
+
#
|
6329
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash]
|
6330
|
+
# A request object representing the call parameters. Required. To specify no
|
6331
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6332
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6333
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6334
|
+
#
|
6335
|
+
# @overload get_resource_value_config(name: nil)
|
6336
|
+
# Pass arguments to `get_resource_value_config` via keyword arguments. Note that at
|
6337
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6338
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6339
|
+
#
|
6340
|
+
# @param name [::String]
|
6341
|
+
# Required. Name of the resource value config to retrieve. Its format is
|
6342
|
+
# `organizations/{organization}/resourceValueConfigs/{config_id}`.
|
6343
|
+
#
|
6344
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6345
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
6346
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6347
|
+
#
|
6348
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
6349
|
+
#
|
6350
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6351
|
+
#
|
6352
|
+
# @example Basic example
|
6353
|
+
# require "google/cloud/security_center/v1"
|
6354
|
+
#
|
6355
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6356
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6357
|
+
#
|
6358
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6359
|
+
# request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new
|
6360
|
+
#
|
6361
|
+
# # Call the get_resource_value_config method.
|
6362
|
+
# result = client.get_resource_value_config request
|
6363
|
+
#
|
6364
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig.
|
6365
|
+
# p result
|
6366
|
+
#
|
6367
|
+
def get_resource_value_config request, options = nil
|
6368
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6369
|
+
|
6370
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest
|
6371
|
+
|
6372
|
+
# Converts hash and nil to an options object
|
6373
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6374
|
+
|
6375
|
+
# Customize the options with defaults
|
6376
|
+
metadata = @config.rpcs.get_resource_value_config.metadata.to_h
|
6377
|
+
|
6378
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6379
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6380
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6381
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6382
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6383
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6384
|
+
|
6385
|
+
header_params = {}
|
6386
|
+
if request.name
|
6387
|
+
header_params["name"] = request.name
|
6388
|
+
end
|
6389
|
+
|
6390
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6391
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6392
|
+
|
6393
|
+
options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout,
|
6394
|
+
metadata: metadata,
|
6395
|
+
retry_policy: @config.rpcs.get_resource_value_config.retry_policy
|
6396
|
+
|
6397
|
+
options.apply_defaults timeout: @config.timeout,
|
6398
|
+
metadata: @config.metadata,
|
6399
|
+
retry_policy: @config.retry_policy
|
6400
|
+
|
6401
|
+
@security_center_stub.call_rpc :get_resource_value_config, request, options: options do |response, operation|
|
6402
|
+
yield response, operation if block_given?
|
6403
|
+
return response
|
6404
|
+
end
|
6405
|
+
rescue ::GRPC::BadStatus => e
|
6406
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6407
|
+
end
|
6408
|
+
|
6409
|
+
##
|
6410
|
+
# Lists all ResourceValueConfigs.
|
6411
|
+
#
|
6412
|
+
# @overload list_resource_value_configs(request, options = nil)
|
6413
|
+
# Pass arguments to `list_resource_value_configs` via a request object, either of type
|
6414
|
+
# {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash.
|
6415
|
+
#
|
6416
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash]
|
6417
|
+
# A request object representing the call parameters. Required. To specify no
|
6418
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6419
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6420
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6421
|
+
#
|
6422
|
+
# @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil)
|
6423
|
+
# Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at
|
6424
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6425
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6426
|
+
#
|
6427
|
+
# @param parent [::String]
|
6428
|
+
# Required. The parent, which owns the collection of resource value configs.
|
6429
|
+
# Its format is
|
6430
|
+
# `organizations/[organization_id]`
|
6431
|
+
# @param page_size [::Integer]
|
6432
|
+
# The number of results to return. The service may return fewer than
|
6433
|
+
# this value.
|
6434
|
+
# If unspecified, at most 10 configs will be returned.
|
6435
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
6436
|
+
# @param page_token [::String]
|
6437
|
+
# A page token, received from a previous `ListResourceValueConfigs` call.
|
6438
|
+
# Provide this to retrieve the subsequent page.
|
6439
|
+
#
|
6440
|
+
# When paginating, all other parameters provided to
|
6441
|
+
# `ListResourceValueConfigs` must match the call that provided the
|
6442
|
+
# page token.
|
6443
|
+
#
|
6444
|
+
# page_size can be specified, and the new page_size will be used.
|
6445
|
+
#
|
6446
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6447
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>]
|
6448
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6449
|
+
#
|
6450
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>]
|
6451
|
+
#
|
6452
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6453
|
+
#
|
6454
|
+
# @example Basic example
|
6455
|
+
# require "google/cloud/security_center/v1"
|
6456
|
+
#
|
6457
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6458
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6459
|
+
#
|
6460
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6461
|
+
# request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new
|
6462
|
+
#
|
6463
|
+
# # Call the list_resource_value_configs method.
|
6464
|
+
# result = client.list_resource_value_configs request
|
6465
|
+
#
|
6466
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
6467
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
6468
|
+
# result.each do |item|
|
6469
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.
|
6470
|
+
# p item
|
6471
|
+
# end
|
6472
|
+
#
|
6473
|
+
def list_resource_value_configs request, options = nil
|
6474
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6475
|
+
|
6476
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest
|
6477
|
+
|
6478
|
+
# Converts hash and nil to an options object
|
6479
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6480
|
+
|
6481
|
+
# Customize the options with defaults
|
6482
|
+
metadata = @config.rpcs.list_resource_value_configs.metadata.to_h
|
6483
|
+
|
6484
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6485
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6486
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6487
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6488
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6489
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6490
|
+
|
6491
|
+
header_params = {}
|
6492
|
+
if request.parent
|
6493
|
+
header_params["parent"] = request.parent
|
6494
|
+
end
|
6495
|
+
|
6496
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6497
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6498
|
+
|
6499
|
+
options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout,
|
6500
|
+
metadata: metadata,
|
6501
|
+
retry_policy: @config.rpcs.list_resource_value_configs.retry_policy
|
6502
|
+
|
6503
|
+
options.apply_defaults timeout: @config.timeout,
|
6504
|
+
metadata: @config.metadata,
|
6505
|
+
retry_policy: @config.retry_policy
|
6506
|
+
|
6507
|
+
@security_center_stub.call_rpc :list_resource_value_configs, request, options: options do |response, operation|
|
6508
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, request, response, operation, options
|
6509
|
+
yield response, operation if block_given?
|
6510
|
+
return response
|
6511
|
+
end
|
6512
|
+
rescue ::GRPC::BadStatus => e
|
6513
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6514
|
+
end
|
6515
|
+
|
6516
|
+
##
|
6517
|
+
# Updates an existing ResourceValueConfigs with new rules.
|
6518
|
+
#
|
6519
|
+
# @overload update_resource_value_config(request, options = nil)
|
6520
|
+
# Pass arguments to `update_resource_value_config` via a request object, either of type
|
6521
|
+
# {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash.
|
6522
|
+
#
|
6523
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash]
|
6524
|
+
# A request object representing the call parameters. Required. To specify no
|
6525
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6526
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6527
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6528
|
+
#
|
6529
|
+
# @overload update_resource_value_config(resource_value_config: nil, update_mask: nil)
|
6530
|
+
# Pass arguments to `update_resource_value_config` via keyword arguments. Note that at
|
6531
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6532
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6533
|
+
#
|
6534
|
+
# @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash]
|
6535
|
+
# Required. The resource value config being updated.
|
6536
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
6537
|
+
# The list of fields to be updated.
|
6538
|
+
# If empty all mutable fields will be updated.
|
6539
|
+
#
|
6540
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6541
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
6542
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6543
|
+
#
|
6544
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
6545
|
+
#
|
6546
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6547
|
+
#
|
6548
|
+
# @example Basic example
|
6549
|
+
# require "google/cloud/security_center/v1"
|
6550
|
+
#
|
6551
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6552
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6553
|
+
#
|
6554
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6555
|
+
# request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new
|
6556
|
+
#
|
6557
|
+
# # Call the update_resource_value_config method.
|
6558
|
+
# result = client.update_resource_value_config request
|
6559
|
+
#
|
6560
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig.
|
6561
|
+
# p result
|
6562
|
+
#
|
6563
|
+
def update_resource_value_config request, options = nil
|
6564
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6565
|
+
|
6566
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest
|
6567
|
+
|
6568
|
+
# Converts hash and nil to an options object
|
6569
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6570
|
+
|
6571
|
+
# Customize the options with defaults
|
6572
|
+
metadata = @config.rpcs.update_resource_value_config.metadata.to_h
|
6573
|
+
|
6574
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6575
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6576
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6577
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6578
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6579
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6580
|
+
|
6581
|
+
header_params = {}
|
6582
|
+
if request.resource_value_config&.name
|
6583
|
+
header_params["resource_value_config.name"] = request.resource_value_config.name
|
6584
|
+
end
|
6585
|
+
|
6586
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6587
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6588
|
+
|
6589
|
+
options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout,
|
6590
|
+
metadata: metadata,
|
6591
|
+
retry_policy: @config.rpcs.update_resource_value_config.retry_policy
|
6592
|
+
|
6593
|
+
options.apply_defaults timeout: @config.timeout,
|
6594
|
+
metadata: @config.metadata,
|
6595
|
+
retry_policy: @config.retry_policy
|
6596
|
+
|
6597
|
+
@security_center_stub.call_rpc :update_resource_value_config, request, options: options do |response, operation|
|
6598
|
+
yield response, operation if block_given?
|
6599
|
+
return response
|
6600
|
+
end
|
6601
|
+
rescue ::GRPC::BadStatus => e
|
6602
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6603
|
+
end
|
6604
|
+
|
6605
|
+
##
|
6606
|
+
# Lists the valued resources for a set of simulation results and filter.
|
6607
|
+
#
|
6608
|
+
# @overload list_valued_resources(request, options = nil)
|
6609
|
+
# Pass arguments to `list_valued_resources` via a request object, either of type
|
6610
|
+
# {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash.
|
6611
|
+
#
|
6612
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash]
|
6613
|
+
# A request object representing the call parameters. Required. To specify no
|
6614
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6615
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6616
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6617
|
+
#
|
6618
|
+
# @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil)
|
6619
|
+
# Pass arguments to `list_valued_resources` via keyword arguments. Note that at
|
6620
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6621
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6622
|
+
#
|
6623
|
+
# @param parent [::String]
|
6624
|
+
# Required. Name of parent to list valued resources.
|
6625
|
+
#
|
6626
|
+
# Valid formats:
|
6627
|
+
# `organizations/{organization}`,
|
6628
|
+
# `organizations/{organization}/simulations/{simulation}`
|
6629
|
+
# `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
|
6630
|
+
# @param filter [::String]
|
6631
|
+
# The filter expression that filters the valued resources in the response.
|
6632
|
+
# Supported fields:
|
6633
|
+
#
|
6634
|
+
# * `resource_value` supports =
|
6635
|
+
# * `resource_type` supports =
|
6636
|
+
# @param page_token [::String]
|
6637
|
+
# The value returned by the last `ListValuedResourcesResponse`; indicates
|
6638
|
+
# that this is a continuation of a prior `ListValuedResources` call, and
|
6639
|
+
# that the system should return the next page of data.
|
6640
|
+
# @param page_size [::Integer]
|
6641
|
+
# The maximum number of results to return in a single response. Default is
|
6642
|
+
# 10, minimum is 1, maximum is 1000.
|
6643
|
+
# @param order_by [::String]
|
6644
|
+
# Optional. The fields by which to order the valued resources response.
|
6645
|
+
#
|
6646
|
+
# Supported fields:
|
6647
|
+
#
|
6648
|
+
# * `exposed_score`
|
6649
|
+
#
|
6650
|
+
# * `resource_value`
|
6651
|
+
#
|
6652
|
+
# * `resource_type`
|
6653
|
+
#
|
6654
|
+
# * `resource`
|
6655
|
+
#
|
6656
|
+
# * `display_name`
|
6657
|
+
#
|
6658
|
+
# Values should be a comma separated list of fields. For example:
|
6659
|
+
# `exposed_score,resource_value`.
|
6660
|
+
#
|
6661
|
+
# The default sorting order is descending. To specify ascending or descending
|
6662
|
+
# order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for
|
6663
|
+
# example: `exposed_score DESC`.
|
6664
|
+
#
|
6665
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6666
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>]
|
6667
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6668
|
+
#
|
6669
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>]
|
6670
|
+
#
|
6671
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6672
|
+
#
|
6673
|
+
# @example Basic example
|
6674
|
+
# require "google/cloud/security_center/v1"
|
6675
|
+
#
|
6676
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6677
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6678
|
+
#
|
6679
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6680
|
+
# request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new
|
6681
|
+
#
|
6682
|
+
# # Call the list_valued_resources method.
|
6683
|
+
# result = client.list_valued_resources request
|
6684
|
+
#
|
6685
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
6686
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
6687
|
+
# result.each do |item|
|
6688
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource.
|
6689
|
+
# p item
|
6690
|
+
# end
|
6691
|
+
#
|
6692
|
+
def list_valued_resources request, options = nil
|
6693
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6694
|
+
|
6695
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest
|
6696
|
+
|
6697
|
+
# Converts hash and nil to an options object
|
6698
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6699
|
+
|
6700
|
+
# Customize the options with defaults
|
6701
|
+
metadata = @config.rpcs.list_valued_resources.metadata.to_h
|
6702
|
+
|
6703
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6704
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6705
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6706
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6707
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6708
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6709
|
+
|
6710
|
+
header_params = {}
|
6711
|
+
if request.parent
|
6712
|
+
header_params["parent"] = request.parent
|
6713
|
+
end
|
6714
|
+
|
6715
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6716
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6717
|
+
|
6718
|
+
options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout,
|
6719
|
+
metadata: metadata,
|
6720
|
+
retry_policy: @config.rpcs.list_valued_resources.retry_policy
|
6721
|
+
|
6722
|
+
options.apply_defaults timeout: @config.timeout,
|
6723
|
+
metadata: @config.metadata,
|
6724
|
+
retry_policy: @config.retry_policy
|
6725
|
+
|
6726
|
+
@security_center_stub.call_rpc :list_valued_resources, request, options: options do |response, operation|
|
6727
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_valued_resources, request, response, operation, options
|
6728
|
+
yield response, operation if block_given?
|
6729
|
+
return response
|
6730
|
+
end
|
6731
|
+
rescue ::GRPC::BadStatus => e
|
6732
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6733
|
+
end
|
6734
|
+
|
6735
|
+
##
|
6736
|
+
# Lists the attack paths for a set of simulation results or valued resources
|
6737
|
+
# and filter.
|
6738
|
+
#
|
6739
|
+
# @overload list_attack_paths(request, options = nil)
|
6740
|
+
# Pass arguments to `list_attack_paths` via a request object, either of type
|
6741
|
+
# {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash.
|
6742
|
+
#
|
6743
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash]
|
6744
|
+
# A request object representing the call parameters. Required. To specify no
|
6745
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6746
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6747
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
6748
|
+
#
|
6749
|
+
# @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil)
|
6750
|
+
# Pass arguments to `list_attack_paths` via keyword arguments. Note that at
|
6751
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6752
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6753
|
+
#
|
6754
|
+
# @param parent [::String]
|
6755
|
+
# Required. Name of parent to list attack paths.
|
6756
|
+
#
|
6757
|
+
# Valid formats:
|
6758
|
+
# `organizations/{organization}`,
|
6759
|
+
# `organizations/{organization}/simulations/{simulation}`
|
6760
|
+
# `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
|
6761
|
+
# `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
|
6762
|
+
# @param filter [::String]
|
6763
|
+
# The filter expression that filters the attack path in the response.
|
6764
|
+
# Supported fields:
|
6765
|
+
#
|
6766
|
+
# * `valued_resources` supports =
|
6767
|
+
# @param page_token [::String]
|
6768
|
+
# The value returned by the last `ListAttackPathsResponse`; indicates
|
6769
|
+
# that this is a continuation of a prior `ListAttackPaths` call, and
|
6770
|
+
# that the system should return the next page of data.
|
6771
|
+
# @param page_size [::Integer]
|
6772
|
+
# The maximum number of results to return in a single response. Default is
|
6773
|
+
# 10, minimum is 1, maximum is 1000.
|
6774
|
+
#
|
6775
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
6776
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>]
|
6777
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
6778
|
+
#
|
6779
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>]
|
6780
|
+
#
|
6781
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
6782
|
+
#
|
6783
|
+
# @example Basic example
|
6784
|
+
# require "google/cloud/security_center/v1"
|
6785
|
+
#
|
6786
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6787
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
6788
|
+
#
|
6789
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6790
|
+
# request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new
|
6791
|
+
#
|
6792
|
+
# # Call the list_attack_paths method.
|
6793
|
+
# result = client.list_attack_paths request
|
6794
|
+
#
|
6795
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
6796
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
6797
|
+
# result.each do |item|
|
6798
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath.
|
6799
|
+
# p item
|
6800
|
+
# end
|
6801
|
+
#
|
6802
|
+
def list_attack_paths request, options = nil
|
6803
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6804
|
+
|
6805
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest
|
6806
|
+
|
6807
|
+
# Converts hash and nil to an options object
|
6808
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6809
|
+
|
6810
|
+
# Customize the options with defaults
|
6811
|
+
metadata = @config.rpcs.list_attack_paths.metadata.to_h
|
6812
|
+
|
6813
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6814
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6815
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6816
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
6817
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6818
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6819
|
+
|
6820
|
+
header_params = {}
|
6821
|
+
if request.parent
|
6822
|
+
header_params["parent"] = request.parent
|
6823
|
+
end
|
6824
|
+
|
6825
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
6826
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
6827
|
+
|
6828
|
+
options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout,
|
6829
|
+
metadata: metadata,
|
6830
|
+
retry_policy: @config.rpcs.list_attack_paths.retry_policy
|
6831
|
+
|
6832
|
+
options.apply_defaults timeout: @config.timeout,
|
6833
|
+
metadata: @config.metadata,
|
6834
|
+
retry_policy: @config.retry_policy
|
6835
|
+
|
6836
|
+
@security_center_stub.call_rpc :list_attack_paths, request, options: options do |response, operation|
|
6837
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_attack_paths, request, response, operation, options
|
6838
|
+
yield response, operation if block_given?
|
6839
|
+
return response
|
6840
|
+
end
|
6841
|
+
rescue ::GRPC::BadStatus => e
|
6842
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6843
|
+
end
|
6844
|
+
|
6845
|
+
##
|
6846
|
+
# Configuration class for the SecurityCenter API.
|
6847
|
+
#
|
6848
|
+
# This class represents the configuration for SecurityCenter,
|
6849
|
+
# providing control over timeouts, retry behavior, logging, transport
|
6850
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
6851
|
+
# applied individually to specific RPCs. See
|
6852
|
+
# {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration::Rpcs}
|
6853
|
+
# for a list of RPCs that can be configured independently.
|
6854
|
+
#
|
6855
|
+
# Configuration can be applied globally to all clients, or to a single client
|
6856
|
+
# on construction.
|
6857
|
+
#
|
6858
|
+
# @example
|
6859
|
+
#
|
6860
|
+
# # Modify the global config, setting the timeout for
|
6861
|
+
# # bulk_mute_findings to 20 seconds,
|
6862
|
+
# # and all remaining timeouts to 10 seconds.
|
6863
|
+
# ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config|
|
6864
|
+
# config.timeout = 10.0
|
6865
|
+
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
6866
|
+
# end
|
6867
|
+
#
|
6868
|
+
# # Apply the above configuration only to a new client.
|
6869
|
+
# client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config|
|
6870
|
+
# config.timeout = 10.0
|
6871
|
+
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
6872
|
+
# end
|
6873
|
+
#
|
6874
|
+
# @!attribute [rw] endpoint
|
6875
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
6876
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
6877
|
+
# @return [::String,nil]
|
6878
|
+
# @!attribute [rw] credentials
|
6879
|
+
# Credentials to send with calls. You may provide any of the following types:
|
6880
|
+
# * (`String`) The path to a service account key file in JSON format
|
6881
|
+
# * (`Hash`) A service account key as a Hash
|
6882
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
6883
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
6884
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
6885
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
6886
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
6887
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
6888
|
+
# * (`nil`) indicating no credentials
|
6889
|
+
# @return [::Object]
|
6890
|
+
# @!attribute [rw] scope
|
6891
|
+
# The OAuth scopes
|
6892
|
+
# @return [::Array<::String>]
|
6893
|
+
# @!attribute [rw] lib_name
|
6894
|
+
# The library name as recorded in instrumentation and logging
|
6895
|
+
# @return [::String]
|
6896
|
+
# @!attribute [rw] lib_version
|
6897
|
+
# The library version as recorded in instrumentation and logging
|
6898
|
+
# @return [::String]
|
6899
|
+
# @!attribute [rw] channel_args
|
6900
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
6901
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
6902
|
+
# @return [::Hash]
|
6903
|
+
# @!attribute [rw] interceptors
|
6904
|
+
# An array of interceptors that are run before calls are executed.
|
6905
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
6906
|
+
# @!attribute [rw] timeout
|
6907
|
+
# The call timeout in seconds.
|
6908
|
+
# @return [::Numeric]
|
6909
|
+
# @!attribute [rw] metadata
|
6910
|
+
# Additional gRPC headers to be sent with the call.
|
6911
|
+
# @return [::Hash{::Symbol=>::String}]
|
6912
|
+
# @!attribute [rw] retry_policy
|
6913
|
+
# The retry policy. The value is a hash with the following keys:
|
6914
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
6915
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
6916
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
6917
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
6918
|
+
# trigger a retry.
|
6919
|
+
# @return [::Hash]
|
6920
|
+
# @!attribute [rw] quota_project
|
6921
|
+
# A separate project against which to charge quota.
|
6922
|
+
# @return [::String]
|
6923
|
+
# @!attribute [rw] universe_domain
|
6924
|
+
# The universe domain within which to make requests. This determines the
|
6925
|
+
# default endpoint URL. The default value of nil uses the environment
|
6926
|
+
# universe (usually the default "googleapis.com" universe).
|
6927
|
+
# @return [::String,nil]
|
6928
|
+
#
|
6929
|
+
class Configuration
|
6930
|
+
extend ::Gapic::Config
|
6931
|
+
|
6932
|
+
# @private
|
6933
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
6934
|
+
DEFAULT_ENDPOINT = "securitycenter.googleapis.com"
|
6935
|
+
|
6936
|
+
config_attr :endpoint, nil, ::String, nil
|
6937
|
+
config_attr :credentials, nil do |value|
|
6938
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
6939
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
6940
|
+
allowed.any? { |klass| klass === value }
|
6941
|
+
end
|
6942
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
6943
|
+
config_attr :lib_name, nil, ::String, nil
|
6944
|
+
config_attr :lib_version, nil, ::String, nil
|
6945
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
6946
|
+
config_attr :interceptors, nil, ::Array, nil
|
6947
|
+
config_attr :timeout, nil, ::Numeric, nil
|
6948
|
+
config_attr :metadata, nil, ::Hash, nil
|
5161
6949
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
5162
6950
|
config_attr :quota_project, nil, ::String, nil
|
5163
6951
|
config_attr :universe_domain, nil, ::String, nil
|
@@ -5253,6 +7041,16 @@ module Google
|
|
5253
7041
|
#
|
5254
7042
|
attr_reader :delete_security_health_analytics_custom_module
|
5255
7043
|
##
|
7044
|
+
# RPC-specific configuration for `get_simulation`
|
7045
|
+
# @return [::Gapic::Config::Method]
|
7046
|
+
#
|
7047
|
+
attr_reader :get_simulation
|
7048
|
+
##
|
7049
|
+
# RPC-specific configuration for `get_valued_resource`
|
7050
|
+
# @return [::Gapic::Config::Method]
|
7051
|
+
#
|
7052
|
+
attr_reader :get_valued_resource
|
7053
|
+
##
|
5256
7054
|
# RPC-specific configuration for `get_big_query_export`
|
5257
7055
|
# @return [::Gapic::Config::Method]
|
5258
7056
|
#
|
@@ -5432,6 +7230,86 @@ module Google
|
|
5432
7230
|
# @return [::Gapic::Config::Method]
|
5433
7231
|
#
|
5434
7232
|
attr_reader :list_big_query_exports
|
7233
|
+
##
|
7234
|
+
# RPC-specific configuration for `create_event_threat_detection_custom_module`
|
7235
|
+
# @return [::Gapic::Config::Method]
|
7236
|
+
#
|
7237
|
+
attr_reader :create_event_threat_detection_custom_module
|
7238
|
+
##
|
7239
|
+
# RPC-specific configuration for `delete_event_threat_detection_custom_module`
|
7240
|
+
# @return [::Gapic::Config::Method]
|
7241
|
+
#
|
7242
|
+
attr_reader :delete_event_threat_detection_custom_module
|
7243
|
+
##
|
7244
|
+
# RPC-specific configuration for `get_event_threat_detection_custom_module`
|
7245
|
+
# @return [::Gapic::Config::Method]
|
7246
|
+
#
|
7247
|
+
attr_reader :get_event_threat_detection_custom_module
|
7248
|
+
##
|
7249
|
+
# RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules`
|
7250
|
+
# @return [::Gapic::Config::Method]
|
7251
|
+
#
|
7252
|
+
attr_reader :list_descendant_event_threat_detection_custom_modules
|
7253
|
+
##
|
7254
|
+
# RPC-specific configuration for `list_event_threat_detection_custom_modules`
|
7255
|
+
# @return [::Gapic::Config::Method]
|
7256
|
+
#
|
7257
|
+
attr_reader :list_event_threat_detection_custom_modules
|
7258
|
+
##
|
7259
|
+
# RPC-specific configuration for `update_event_threat_detection_custom_module`
|
7260
|
+
# @return [::Gapic::Config::Method]
|
7261
|
+
#
|
7262
|
+
attr_reader :update_event_threat_detection_custom_module
|
7263
|
+
##
|
7264
|
+
# RPC-specific configuration for `validate_event_threat_detection_custom_module`
|
7265
|
+
# @return [::Gapic::Config::Method]
|
7266
|
+
#
|
7267
|
+
attr_reader :validate_event_threat_detection_custom_module
|
7268
|
+
##
|
7269
|
+
# RPC-specific configuration for `get_effective_event_threat_detection_custom_module`
|
7270
|
+
# @return [::Gapic::Config::Method]
|
7271
|
+
#
|
7272
|
+
attr_reader :get_effective_event_threat_detection_custom_module
|
7273
|
+
##
|
7274
|
+
# RPC-specific configuration for `list_effective_event_threat_detection_custom_modules`
|
7275
|
+
# @return [::Gapic::Config::Method]
|
7276
|
+
#
|
7277
|
+
attr_reader :list_effective_event_threat_detection_custom_modules
|
7278
|
+
##
|
7279
|
+
# RPC-specific configuration for `batch_create_resource_value_configs`
|
7280
|
+
# @return [::Gapic::Config::Method]
|
7281
|
+
#
|
7282
|
+
attr_reader :batch_create_resource_value_configs
|
7283
|
+
##
|
7284
|
+
# RPC-specific configuration for `delete_resource_value_config`
|
7285
|
+
# @return [::Gapic::Config::Method]
|
7286
|
+
#
|
7287
|
+
attr_reader :delete_resource_value_config
|
7288
|
+
##
|
7289
|
+
# RPC-specific configuration for `get_resource_value_config`
|
7290
|
+
# @return [::Gapic::Config::Method]
|
7291
|
+
#
|
7292
|
+
attr_reader :get_resource_value_config
|
7293
|
+
##
|
7294
|
+
# RPC-specific configuration for `list_resource_value_configs`
|
7295
|
+
# @return [::Gapic::Config::Method]
|
7296
|
+
#
|
7297
|
+
attr_reader :list_resource_value_configs
|
7298
|
+
##
|
7299
|
+
# RPC-specific configuration for `update_resource_value_config`
|
7300
|
+
# @return [::Gapic::Config::Method]
|
7301
|
+
#
|
7302
|
+
attr_reader :update_resource_value_config
|
7303
|
+
##
|
7304
|
+
# RPC-specific configuration for `list_valued_resources`
|
7305
|
+
# @return [::Gapic::Config::Method]
|
7306
|
+
#
|
7307
|
+
attr_reader :list_valued_resources
|
7308
|
+
##
|
7309
|
+
# RPC-specific configuration for `list_attack_paths`
|
7310
|
+
# @return [::Gapic::Config::Method]
|
7311
|
+
#
|
7312
|
+
attr_reader :list_attack_paths
|
5435
7313
|
|
5436
7314
|
# @private
|
5437
7315
|
def initialize parent_rpcs = nil
|
@@ -5453,6 +7331,10 @@ module Google
|
|
5453
7331
|
@delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
|
5454
7332
|
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
|
5455
7333
|
@delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config
|
7334
|
+
get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation
|
7335
|
+
@get_simulation = ::Gapic::Config::Method.new get_simulation_config
|
7336
|
+
get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource
|
7337
|
+
@get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config
|
5456
7338
|
get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
|
5457
7339
|
@get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
|
5458
7340
|
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
@@ -5525,6 +7407,38 @@ module Google
|
|
5525
7407
|
@update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
|
5526
7408
|
list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports
|
5527
7409
|
@list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config
|
7410
|
+
create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module
|
7411
|
+
@create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config
|
7412
|
+
delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module
|
7413
|
+
@delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config
|
7414
|
+
get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module
|
7415
|
+
@get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config
|
7416
|
+
list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules
|
7417
|
+
@list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config
|
7418
|
+
list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules
|
7419
|
+
@list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config
|
7420
|
+
update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module
|
7421
|
+
@update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config
|
7422
|
+
validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module
|
7423
|
+
@validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config
|
7424
|
+
get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module
|
7425
|
+
@get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config
|
7426
|
+
list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules
|
7427
|
+
@list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config
|
7428
|
+
batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs
|
7429
|
+
@batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config
|
7430
|
+
delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config
|
7431
|
+
@delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config
|
7432
|
+
get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config
|
7433
|
+
@get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config
|
7434
|
+
list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs
|
7435
|
+
@list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config
|
7436
|
+
update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config
|
7437
|
+
@update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config
|
7438
|
+
list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources
|
7439
|
+
@list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config
|
7440
|
+
list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths
|
7441
|
+
@list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config
|
5528
7442
|
|
5529
7443
|
yield self if block_given?
|
5530
7444
|
end
|