google-cloud-security_center-v1 1.0.0 → 1.2.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 +31 -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
@@ -295,15 +295,15 @@ module Google
|
|
295
295
|
# @param options [::Gapic::CallOptions, ::Hash]
|
296
296
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
297
297
|
#
|
298
|
-
# @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil)
|
298
|
+
# @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil)
|
299
299
|
# Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at
|
300
300
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
301
301
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
302
302
|
#
|
303
303
|
# @param parent [::String]
|
304
304
|
# Required. The parent, at which bulk action needs to be applied. Its format
|
305
|
-
# is
|
306
|
-
#
|
305
|
+
# is `organizations/[organization_id]`, `folders/[folder_id]`,
|
306
|
+
# `projects/[project_id]`.
|
307
307
|
# @param filter [::String]
|
308
308
|
# Expression that identifies findings that should be updated.
|
309
309
|
# The expression is a list of zero or more restrictions combined
|
@@ -328,6 +328,10 @@ module Google
|
|
328
328
|
# @param mute_annotation [::String]
|
329
329
|
# This can be a mute configuration name or any identifier for mute/unmute
|
330
330
|
# of findings based on the filter.
|
331
|
+
# @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState]
|
332
|
+
# Optional. All findings matching the given filter will have their mute state
|
333
|
+
# set to this value. The default value is `MUTED`. Setting this to
|
334
|
+
# `UNDEFINED` will clear the mute state on all matching findings.
|
331
335
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
332
336
|
# @yieldparam result [::Gapic::Operation]
|
333
337
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -418,9 +422,9 @@ module Google
|
|
418
422
|
#
|
419
423
|
# @param parent [::String]
|
420
424
|
# Required. Resource name of the new custom module's parent. Its format is
|
421
|
-
#
|
422
|
-
#
|
423
|
-
#
|
425
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
426
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
427
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
424
428
|
# @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
|
425
429
|
# Required. SecurityHealthAnalytics custom module to create. The provided
|
426
430
|
# name is ignored and reset with provided parent information and
|
@@ -504,7 +508,7 @@ module Google
|
|
504
508
|
#
|
505
509
|
# @param parent [::String]
|
506
510
|
# Required. Resource name of the new source's parent. Its format should be
|
507
|
-
#
|
511
|
+
# `organizations/[organization_id]`.
|
508
512
|
# @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash]
|
509
513
|
# Required. The Source being created, only the display_name and description
|
510
514
|
# will be used. All other fields will be ignored.
|
@@ -588,7 +592,7 @@ module Google
|
|
588
592
|
#
|
589
593
|
# @param parent [::String]
|
590
594
|
# Required. Resource name of the new finding's parent. Its format should be
|
591
|
-
#
|
595
|
+
# `organizations/[organization_id]/sources/[source_id]`.
|
592
596
|
# @param finding_id [::String]
|
593
597
|
# Required. Unique identifier provided by the client within the parent scope.
|
594
598
|
# It must be alphanumeric and less than or equal to 32 characters and
|
@@ -675,8 +679,8 @@ module Google
|
|
675
679
|
#
|
676
680
|
# @param parent [::String]
|
677
681
|
# Required. Resource name of the new mute configs's parent. Its format is
|
678
|
-
#
|
679
|
-
#
|
682
|
+
# `organizations/[organization_id]`, `folders/[folder_id]`, or
|
683
|
+
# `projects/[project_id]`.
|
680
684
|
# @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash]
|
681
685
|
# Required. The mute config being created.
|
682
686
|
# @param mute_config_id [::String]
|
@@ -763,8 +767,8 @@ module Google
|
|
763
767
|
#
|
764
768
|
# @param parent [::String]
|
765
769
|
# Required. Resource name of the new notification config's parent. Its format
|
766
|
-
# is
|
767
|
-
#
|
770
|
+
# is `organizations/[organization_id]`, `folders/[folder_id]`, or
|
771
|
+
# `projects/[project_id]`.
|
768
772
|
# @param config_id [::String]
|
769
773
|
# Required.
|
770
774
|
# Unique identifier provided by the client within the parent scope.
|
@@ -853,9 +857,12 @@ module Google
|
|
853
857
|
#
|
854
858
|
# @param name [::String]
|
855
859
|
# Required. Name of the mute config to delete. Its format is
|
856
|
-
# organizations
|
857
|
-
# folders
|
858
|
-
# projects
|
860
|
+
# `organizations/{organization}/muteConfigs/{config_id}`,
|
861
|
+
# `folders/{folder}/muteConfigs/{config_id}`,
|
862
|
+
# `projects/{project}/muteConfigs/{config_id}`,
|
863
|
+
# `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
|
864
|
+
# `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
|
865
|
+
# `projects/{project}/locations/global/muteConfigs/{config_id}`.
|
859
866
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
860
867
|
# @yieldparam result [::Google::Protobuf::Empty]
|
861
868
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -935,9 +942,9 @@ module Google
|
|
935
942
|
#
|
936
943
|
# @param name [::String]
|
937
944
|
# Required. Name of the notification config to delete. Its format is
|
938
|
-
#
|
939
|
-
#
|
940
|
-
# or
|
945
|
+
# `organizations/[organization_id]/notificationConfigs/[config_id]`,
|
946
|
+
# `folders/[folder_id]/notificationConfigs/[config_id]`,
|
947
|
+
# or `projects/[project_id]/notificationConfigs/[config_id]`.
|
941
948
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
942
949
|
# @yieldparam result [::Google::Protobuf::Empty]
|
943
950
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1019,10 +1026,10 @@ module Google
|
|
1019
1026
|
#
|
1020
1027
|
# @param name [::String]
|
1021
1028
|
# Required. Name of the custom module to delete. Its format is
|
1022
|
-
#
|
1023
|
-
#
|
1029
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1030
|
+
# `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1024
1031
|
# or
|
1025
|
-
#
|
1032
|
+
# `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
|
1026
1033
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1027
1034
|
# @yieldparam result [::Google::Protobuf::Empty]
|
1028
1035
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1082,6 +1089,172 @@ module Google
|
|
1082
1089
|
raise ::Google::Cloud::Error.from_error(e)
|
1083
1090
|
end
|
1084
1091
|
|
1092
|
+
##
|
1093
|
+
# Get the simulation by name or the latest simulation for the given
|
1094
|
+
# organization.
|
1095
|
+
#
|
1096
|
+
# @overload get_simulation(request, options = nil)
|
1097
|
+
# Pass arguments to `get_simulation` via a request object, either of type
|
1098
|
+
# {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash.
|
1099
|
+
#
|
1100
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash]
|
1101
|
+
# A request object representing the call parameters. Required. To specify no
|
1102
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1103
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1104
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1105
|
+
#
|
1106
|
+
# @overload get_simulation(name: nil)
|
1107
|
+
# Pass arguments to `get_simulation` via keyword arguments. Note that at
|
1108
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1109
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1110
|
+
#
|
1111
|
+
# @param name [::String]
|
1112
|
+
# Required. The organization name or simulation name of this simulation
|
1113
|
+
#
|
1114
|
+
# Valid format:
|
1115
|
+
# `organizations/{organization}/simulations/latest`
|
1116
|
+
# `organizations/{organization}/simulations/{simulation}`
|
1117
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1118
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation]
|
1119
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1120
|
+
#
|
1121
|
+
# @return [::Google::Cloud::SecurityCenter::V1::Simulation]
|
1122
|
+
#
|
1123
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1124
|
+
#
|
1125
|
+
# @example Basic example
|
1126
|
+
# require "google/cloud/security_center/v1"
|
1127
|
+
#
|
1128
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1129
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
1130
|
+
#
|
1131
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1132
|
+
# request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new
|
1133
|
+
#
|
1134
|
+
# # Call the get_simulation method.
|
1135
|
+
# result = client.get_simulation request
|
1136
|
+
#
|
1137
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation.
|
1138
|
+
# p result
|
1139
|
+
#
|
1140
|
+
def get_simulation request, options = nil
|
1141
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1142
|
+
|
1143
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest
|
1144
|
+
|
1145
|
+
# Converts hash and nil to an options object
|
1146
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1147
|
+
|
1148
|
+
# Customize the options with defaults
|
1149
|
+
call_metadata = @config.rpcs.get_simulation.metadata.to_h
|
1150
|
+
|
1151
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1152
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1153
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1154
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
1155
|
+
transports_version_send: [:rest]
|
1156
|
+
|
1157
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1158
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1159
|
+
|
1160
|
+
options.apply_defaults timeout: @config.rpcs.get_simulation.timeout,
|
1161
|
+
metadata: call_metadata,
|
1162
|
+
retry_policy: @config.rpcs.get_simulation.retry_policy
|
1163
|
+
|
1164
|
+
options.apply_defaults timeout: @config.timeout,
|
1165
|
+
metadata: @config.metadata,
|
1166
|
+
retry_policy: @config.retry_policy
|
1167
|
+
|
1168
|
+
@security_center_stub.get_simulation request, options do |result, operation|
|
1169
|
+
yield result, operation if block_given?
|
1170
|
+
return result
|
1171
|
+
end
|
1172
|
+
rescue ::Gapic::Rest::Error => e
|
1173
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1174
|
+
end
|
1175
|
+
|
1176
|
+
##
|
1177
|
+
# Get the valued resource by name
|
1178
|
+
#
|
1179
|
+
# @overload get_valued_resource(request, options = nil)
|
1180
|
+
# Pass arguments to `get_valued_resource` via a request object, either of type
|
1181
|
+
# {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash.
|
1182
|
+
#
|
1183
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash]
|
1184
|
+
# A request object representing the call parameters. Required. To specify no
|
1185
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1186
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1187
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1188
|
+
#
|
1189
|
+
# @overload get_valued_resource(name: nil)
|
1190
|
+
# Pass arguments to `get_valued_resource` via keyword arguments. Note that at
|
1191
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1192
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1193
|
+
#
|
1194
|
+
# @param name [::String]
|
1195
|
+
# Required. The name of this valued resource
|
1196
|
+
#
|
1197
|
+
# Valid format:
|
1198
|
+
# `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
|
1199
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1200
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource]
|
1201
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1202
|
+
#
|
1203
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ValuedResource]
|
1204
|
+
#
|
1205
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1206
|
+
#
|
1207
|
+
# @example Basic example
|
1208
|
+
# require "google/cloud/security_center/v1"
|
1209
|
+
#
|
1210
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1211
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
1212
|
+
#
|
1213
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1214
|
+
# request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new
|
1215
|
+
#
|
1216
|
+
# # Call the get_valued_resource method.
|
1217
|
+
# result = client.get_valued_resource request
|
1218
|
+
#
|
1219
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource.
|
1220
|
+
# p result
|
1221
|
+
#
|
1222
|
+
def get_valued_resource request, options = nil
|
1223
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1224
|
+
|
1225
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest
|
1226
|
+
|
1227
|
+
# Converts hash and nil to an options object
|
1228
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1229
|
+
|
1230
|
+
# Customize the options with defaults
|
1231
|
+
call_metadata = @config.rpcs.get_valued_resource.metadata.to_h
|
1232
|
+
|
1233
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1234
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1235
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1236
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
1237
|
+
transports_version_send: [:rest]
|
1238
|
+
|
1239
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1240
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1241
|
+
|
1242
|
+
options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout,
|
1243
|
+
metadata: call_metadata,
|
1244
|
+
retry_policy: @config.rpcs.get_valued_resource.retry_policy
|
1245
|
+
|
1246
|
+
options.apply_defaults timeout: @config.timeout,
|
1247
|
+
metadata: @config.metadata,
|
1248
|
+
retry_policy: @config.retry_policy
|
1249
|
+
|
1250
|
+
@security_center_stub.get_valued_resource request, options do |result, operation|
|
1251
|
+
yield result, operation if block_given?
|
1252
|
+
return result
|
1253
|
+
end
|
1254
|
+
rescue ::Gapic::Rest::Error => e
|
1255
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1256
|
+
end
|
1257
|
+
|
1085
1258
|
##
|
1086
1259
|
# Gets a BigQuery export.
|
1087
1260
|
#
|
@@ -1102,9 +1275,9 @@ module Google
|
|
1102
1275
|
#
|
1103
1276
|
# @param name [::String]
|
1104
1277
|
# Required. Name of the BigQuery export to retrieve. Its format is
|
1105
|
-
# organizations
|
1106
|
-
# folders
|
1107
|
-
# projects
|
1278
|
+
# `organizations/{organization}/bigQueryExports/{export_id}`,
|
1279
|
+
# `folders/{folder}/bigQueryExports/{export_id}`, or
|
1280
|
+
# `projects/{project}/bigQueryExports/{export_id}`
|
1108
1281
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1109
1282
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
1110
1283
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1267,9 +1440,12 @@ module Google
|
|
1267
1440
|
#
|
1268
1441
|
# @param name [::String]
|
1269
1442
|
# Required. Name of the mute config to retrieve. Its format is
|
1270
|
-
# organizations
|
1271
|
-
# folders
|
1272
|
-
# projects
|
1443
|
+
# `organizations/{organization}/muteConfigs/{config_id}`,
|
1444
|
+
# `folders/{folder}/muteConfigs/{config_id}`,
|
1445
|
+
# `projects/{project}/muteConfigs/{config_id}`,
|
1446
|
+
# `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
|
1447
|
+
# `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
|
1448
|
+
# `projects/{project}/locations/global/muteConfigs/{config_id}`.
|
1273
1449
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1274
1450
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig]
|
1275
1451
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1349,9 +1525,9 @@ module Google
|
|
1349
1525
|
#
|
1350
1526
|
# @param name [::String]
|
1351
1527
|
# Required. Name of the notification config to get. Its format is
|
1352
|
-
#
|
1353
|
-
#
|
1354
|
-
# or
|
1528
|
+
# `organizations/[organization_id]/notificationConfigs/[config_id]`,
|
1529
|
+
# `folders/[folder_id]/notificationConfigs/[config_id]`,
|
1530
|
+
# or `projects/[project_id]/notificationConfigs/[config_id]`.
|
1355
1531
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1356
1532
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
|
1357
1533
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1431,7 +1607,7 @@ module Google
|
|
1431
1607
|
#
|
1432
1608
|
# @param name [::String]
|
1433
1609
|
# Required. Name of the organization to get organization settings for. Its
|
1434
|
-
# format is
|
1610
|
+
# format is `organizations/[organization_id]/organizationSettings`.
|
1435
1611
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1436
1612
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
|
1437
1613
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1511,10 +1687,10 @@ module Google
|
|
1511
1687
|
#
|
1512
1688
|
# @param name [::String]
|
1513
1689
|
# Required. Name of the effective custom module to get. Its format is
|
1514
|
-
#
|
1515
|
-
#
|
1690
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
|
1691
|
+
# `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
|
1516
1692
|
# or
|
1517
|
-
#
|
1693
|
+
# `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
|
1518
1694
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1519
1695
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule]
|
1520
1696
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1594,10 +1770,10 @@ module Google
|
|
1594
1770
|
#
|
1595
1771
|
# @param name [::String]
|
1596
1772
|
# Required. Name of the custom module to get. Its format is
|
1597
|
-
#
|
1598
|
-
#
|
1773
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1774
|
+
# `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`,
|
1599
1775
|
# or
|
1600
|
-
#
|
1776
|
+
# `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
|
1601
1777
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1602
1778
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
1603
1779
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1677,7 +1853,7 @@ module Google
|
|
1677
1853
|
#
|
1678
1854
|
# @param name [::String]
|
1679
1855
|
# Required. Relative resource name of the source. Its format is
|
1680
|
-
#
|
1856
|
+
# `organizations/[organization_id]/source/[source_id]`.
|
1681
1857
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1682
1858
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source]
|
1683
1859
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1758,8 +1934,8 @@ module Google
|
|
1758
1934
|
#
|
1759
1935
|
# @param parent [::String]
|
1760
1936
|
# Required. The name of the parent to group the assets by. Its format is
|
1761
|
-
#
|
1762
|
-
#
|
1937
|
+
# `organizations/[organization_id]`, `folders/[folder_id]`, or
|
1938
|
+
# `projects/[project_id]`.
|
1763
1939
|
# @param filter [::String]
|
1764
1940
|
# Expression that defines the filter to apply across assets.
|
1765
1941
|
# The expression is a list of zero or more restrictions combined via logical
|
@@ -1972,12 +2148,12 @@ module Google
|
|
1972
2148
|
#
|
1973
2149
|
# @param parent [::String]
|
1974
2150
|
# Required. Name of the source to groupBy. Its format is
|
1975
|
-
#
|
1976
|
-
# folders/[folder_id]/sources/[source_id]
|
1977
|
-
# projects/[project_id]/sources/[source_id]
|
2151
|
+
# `organizations/[organization_id]/sources/[source_id]`,
|
2152
|
+
# `folders/[folder_id]/sources/[source_id]`, or
|
2153
|
+
# `projects/[project_id]/sources/[source_id]`. To groupBy across all sources
|
1978
2154
|
# provide a source_id of `-`. For example:
|
1979
|
-
# organizations
|
1980
|
-
# or projects
|
2155
|
+
# `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`,
|
2156
|
+
# or `projects/{project_id}/sources/-`
|
1981
2157
|
# @param filter [::String]
|
1982
2158
|
# Expression that defines the filter to apply across findings.
|
1983
2159
|
# The expression is a list of one or more restrictions combined via logical
|
@@ -2043,14 +2219,6 @@ module Google
|
|
2043
2219
|
# (including `state_change`). The string value should follow SQL syntax:
|
2044
2220
|
# comma separated list of fields. For example: "parent,resource_name".
|
2045
2221
|
#
|
2046
|
-
# The following fields are supported:
|
2047
|
-
#
|
2048
|
-
# * resource_name
|
2049
|
-
# * category
|
2050
|
-
# * state
|
2051
|
-
# * parent
|
2052
|
-
# * severity
|
2053
|
-
#
|
2054
2222
|
# The following fields are supported when compare_duration is set:
|
2055
2223
|
#
|
2056
2224
|
# * state_change
|
@@ -2185,8 +2353,8 @@ module Google
|
|
2185
2353
|
# Required. The name of the parent resource that contains the assets. The
|
2186
2354
|
# value that you can specify on parent depends on the method in which you
|
2187
2355
|
# specify parent. You can specify one of the following values:
|
2188
|
-
#
|
2189
|
-
#
|
2356
|
+
# `organizations/[organization_id]`, `folders/[folder_id]`, or
|
2357
|
+
# `projects/[project_id]`.
|
2190
2358
|
# @param filter [::String]
|
2191
2359
|
# Expression that defines the filter to apply across assets.
|
2192
2360
|
# The expression is a list of zero or more restrictions combined via logical
|
@@ -2398,9 +2566,9 @@ module Google
|
|
2398
2566
|
#
|
2399
2567
|
# @param parent [::String]
|
2400
2568
|
# Required. Name of parent to list descendant custom modules. Its format is
|
2401
|
-
#
|
2402
|
-
#
|
2403
|
-
#
|
2569
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
2570
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
2571
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
2404
2572
|
# @param page_size [::Integer]
|
2405
2573
|
# The maximum number of results to return in a single response. Default is
|
2406
2574
|
# 10, minimum is 1, maximum is 1000.
|
@@ -2493,12 +2661,12 @@ module Google
|
|
2493
2661
|
#
|
2494
2662
|
# @param parent [::String]
|
2495
2663
|
# Required. Name of the source the findings belong to. Its format is
|
2496
|
-
#
|
2497
|
-
# folders/[folder_id]/sources/[source_id]
|
2498
|
-
# projects/[project_id]/sources/[source_id]
|
2664
|
+
# `organizations/[organization_id]/sources/[source_id]`,
|
2665
|
+
# `folders/[folder_id]/sources/[source_id]`, or
|
2666
|
+
# `projects/[project_id]/sources/[source_id]`. To list across all sources
|
2499
2667
|
# provide a source_id of `-`. For example:
|
2500
|
-
# organizations
|
2501
|
-
# projects
|
2668
|
+
# `organizations/{organization_id}/sources/-`,
|
2669
|
+
# `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
|
2502
2670
|
# @param filter [::String]
|
2503
2671
|
# Expression that defines the filter to apply across findings.
|
2504
2672
|
# The expression is a list of one or more restrictions combined via logical
|
@@ -2710,8 +2878,8 @@ module Google
|
|
2710
2878
|
#
|
2711
2879
|
# @param parent [::String]
|
2712
2880
|
# Required. The parent, which owns the collection of mute configs. Its format
|
2713
|
-
# is
|
2714
|
-
#
|
2881
|
+
# is `organizations/[organization_id]`, `folders/[folder_id]`,
|
2882
|
+
# `projects/[project_id]`.
|
2715
2883
|
# @param page_size [::Integer]
|
2716
2884
|
# The maximum number of configs to return. The service may return fewer than
|
2717
2885
|
# this value.
|
@@ -2902,9 +3070,9 @@ module Google
|
|
2902
3070
|
#
|
2903
3071
|
# @param parent [::String]
|
2904
3072
|
# Required. Name of parent to list effective custom modules. Its format is
|
2905
|
-
#
|
2906
|
-
#
|
2907
|
-
#
|
3073
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
3074
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
3075
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
2908
3076
|
# @param page_size [::Integer]
|
2909
3077
|
# The maximum number of results to return in a single response. Default is
|
2910
3078
|
# 10, minimum is 1, maximum is 1000.
|
@@ -2996,9 +3164,9 @@ module Google
|
|
2996
3164
|
#
|
2997
3165
|
# @param parent [::String]
|
2998
3166
|
# Required. Name of parent to list custom modules. Its format is
|
2999
|
-
#
|
3000
|
-
#
|
3001
|
-
#
|
3167
|
+
# `organizations/{organization}/securityHealthAnalyticsSettings`,
|
3168
|
+
# `folders/{folder}/securityHealthAnalyticsSettings`, or
|
3169
|
+
# `projects/{project}/securityHealthAnalyticsSettings`
|
3002
3170
|
# @param page_size [::Integer]
|
3003
3171
|
# The maximum number of results to return in a single response. Default is
|
3004
3172
|
# 10, minimum is 1, maximum is 1000.
|
@@ -3088,8 +3256,8 @@ module Google
|
|
3088
3256
|
#
|
3089
3257
|
# @param parent [::String]
|
3090
3258
|
# Required. Resource name of the parent of sources to list. Its format should
|
3091
|
-
# be
|
3092
|
-
#
|
3259
|
+
# be `organizations/[organization_id]`, `folders/[folder_id]`, or
|
3260
|
+
# `projects/[project_id]`.
|
3093
3261
|
# @param page_token [::String]
|
3094
3262
|
# The value returned by the last `ListSourcesResponse`; indicates
|
3095
3263
|
# that this is a continuation of a prior `ListSources` call, and
|
@@ -3186,7 +3354,7 @@ module Google
|
|
3186
3354
|
#
|
3187
3355
|
# @param parent [::String]
|
3188
3356
|
# Required. Name of the organization to run asset discovery for. Its format
|
3189
|
-
# is
|
3357
|
+
# is `organizations/[organization_id]`.
|
3190
3358
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3191
3359
|
# @yieldparam result [::Gapic::Operation]
|
3192
3360
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3276,9 +3444,9 @@ module Google
|
|
3276
3444
|
# Required. The [relative resource
|
3277
3445
|
# name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
|
3278
3446
|
# of the finding. Example:
|
3279
|
-
#
|
3280
|
-
#
|
3281
|
-
#
|
3447
|
+
# `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
|
3448
|
+
# `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
|
3449
|
+
# `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
|
3282
3450
|
# @param state [::Google::Cloud::SecurityCenter::V1::Finding::State]
|
3283
3451
|
# Required. The desired State of the finding.
|
3284
3452
|
# @param start_time [::Google::Protobuf::Timestamp, ::Hash]
|
@@ -3364,9 +3532,9 @@ module Google
|
|
3364
3532
|
# Required. The [relative resource
|
3365
3533
|
# name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
|
3366
3534
|
# of the finding. Example:
|
3367
|
-
#
|
3368
|
-
#
|
3369
|
-
#
|
3535
|
+
# `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
|
3536
|
+
# `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
|
3537
|
+
# `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
|
3370
3538
|
# @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute]
|
3371
3539
|
# Required. The desired state of the Mute.
|
3372
3540
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
@@ -4141,7 +4309,9 @@ module Google
|
|
4141
4309
|
# @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
|
4142
4310
|
# Required. The SecurityHealthAnalytics custom module to update.
|
4143
4311
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4144
|
-
# The list of fields to
|
4312
|
+
# The list of fields to be updated. The only fields that can be updated are
|
4313
|
+
# `enablement_state` and `custom_config`. If empty or set to the wildcard
|
4314
|
+
# value `*`, both `enablement_state` and `custom_config` are updated.
|
4145
4315
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
4146
4316
|
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
|
4147
4317
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -4394,8 +4564,8 @@ module Google
|
|
4394
4564
|
#
|
4395
4565
|
# @param parent [::String]
|
4396
4566
|
# Required. The name of the parent resource of the new BigQuery export. Its
|
4397
|
-
# format is
|
4398
|
-
#
|
4567
|
+
# format is `organizations/[organization_id]`, `folders/[folder_id]`, or
|
4568
|
+
# `projects/[project_id]`.
|
4399
4569
|
# @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
|
4400
4570
|
# Required. The BigQuery export being created.
|
4401
4571
|
# @param big_query_export_id [::String]
|
@@ -4482,9 +4652,9 @@ module Google
|
|
4482
4652
|
#
|
4483
4653
|
# @param name [::String]
|
4484
4654
|
# Required. The name of the BigQuery export to delete. Its format is
|
4485
|
-
# organizations
|
4486
|
-
# folders
|
4487
|
-
# projects
|
4655
|
+
# `organizations/{organization}/bigQueryExports/{export_id}`,
|
4656
|
+
# `folders/{folder}/bigQueryExports/{export_id}`, or
|
4657
|
+
# `projects/{project}/bigQueryExports/{export_id}`
|
4488
4658
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
4489
4659
|
# @yieldparam result [::Google::Protobuf::Empty]
|
4490
4660
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -4650,8 +4820,8 @@ module Google
|
|
4650
4820
|
#
|
4651
4821
|
# @param parent [::String]
|
4652
4822
|
# Required. The parent, which owns the collection of BigQuery exports. Its
|
4653
|
-
# format is
|
4654
|
-
#
|
4823
|
+
# format is `organizations/[organization_id]`, `folders/[folder_id]`,
|
4824
|
+
# `projects/[project_id]`.
|
4655
4825
|
# @param page_size [::Integer]
|
4656
4826
|
# The maximum number of configs to return. The service may return fewer than
|
4657
4827
|
# this value.
|
@@ -4727,119 +4897,1611 @@ module Google
|
|
4727
4897
|
end
|
4728
4898
|
|
4729
4899
|
##
|
4730
|
-
#
|
4900
|
+
# Creates a resident Event Threat Detection custom module at the scope of the
|
4901
|
+
# given Resource Manager parent, and also creates inherited custom modules
|
4902
|
+
# for all descendants of the given parent. These modules are enabled by
|
4903
|
+
# default.
|
4731
4904
|
#
|
4732
|
-
#
|
4733
|
-
#
|
4734
|
-
#
|
4735
|
-
# applied individually to specific RPCs. See
|
4736
|
-
# {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration::Rpcs}
|
4737
|
-
# for a list of RPCs that can be configured independently.
|
4905
|
+
# @overload create_event_threat_detection_custom_module(request, options = nil)
|
4906
|
+
# Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type
|
4907
|
+
# {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
4738
4908
|
#
|
4739
|
-
#
|
4740
|
-
#
|
4909
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash]
|
4910
|
+
# A request object representing the call parameters. Required. To specify no
|
4911
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4912
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4913
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4741
4914
|
#
|
4742
|
-
# @
|
4915
|
+
# @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil)
|
4916
|
+
# Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at
|
4917
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4918
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4743
4919
|
#
|
4744
|
-
#
|
4745
|
-
#
|
4746
|
-
# # and all remaining timeouts to 10 seconds.
|
4747
|
-
# ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config|
|
4748
|
-
# config.timeout = 10.0
|
4749
|
-
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
4750
|
-
# end
|
4920
|
+
# @param parent [::String]
|
4921
|
+
# Required. The new custom module's parent.
|
4751
4922
|
#
|
4752
|
-
#
|
4753
|
-
# client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config|
|
4754
|
-
# config.timeout = 10.0
|
4755
|
-
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
4756
|
-
# end
|
4923
|
+
# Its format is:
|
4757
4924
|
#
|
4758
|
-
#
|
4759
|
-
#
|
4760
|
-
#
|
4761
|
-
# @
|
4762
|
-
#
|
4763
|
-
#
|
4764
|
-
#
|
4765
|
-
#
|
4766
|
-
#
|
4767
|
-
#
|
4768
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
4769
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
4770
|
-
# * (`nil`) indicating no credentials
|
4771
|
-
# @return [::Object]
|
4772
|
-
# @!attribute [rw] scope
|
4773
|
-
# The OAuth scopes
|
4774
|
-
# @return [::Array<::String>]
|
4775
|
-
# @!attribute [rw] lib_name
|
4776
|
-
# The library name as recorded in instrumentation and logging
|
4777
|
-
# @return [::String]
|
4778
|
-
# @!attribute [rw] lib_version
|
4779
|
-
# The library version as recorded in instrumentation and logging
|
4780
|
-
# @return [::String]
|
4781
|
-
# @!attribute [rw] timeout
|
4782
|
-
# The call timeout in seconds.
|
4783
|
-
# @return [::Numeric]
|
4784
|
-
# @!attribute [rw] metadata
|
4785
|
-
# Additional headers to be sent with the call.
|
4786
|
-
# @return [::Hash{::Symbol=>::String}]
|
4787
|
-
# @!attribute [rw] retry_policy
|
4788
|
-
# The retry policy. The value is a hash with the following keys:
|
4789
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
4790
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
4791
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
4792
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
4793
|
-
# trigger a retry.
|
4794
|
-
# @return [::Hash]
|
4795
|
-
# @!attribute [rw] quota_project
|
4796
|
-
# A separate project against which to charge quota.
|
4797
|
-
# @return [::String]
|
4798
|
-
# @!attribute [rw] universe_domain
|
4799
|
-
# The universe domain within which to make requests. This determines the
|
4800
|
-
# default endpoint URL. The default value of nil uses the environment
|
4801
|
-
# universe (usually the default "googleapis.com" universe).
|
4802
|
-
# @return [::String,nil]
|
4925
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
4926
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
4927
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
4928
|
+
# @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash]
|
4929
|
+
# Required. The module to create. The
|
4930
|
+
# event_threat_detection_custom_module.name will be ignored and server
|
4931
|
+
# generated.
|
4932
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4933
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
4934
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4803
4935
|
#
|
4804
|
-
|
4805
|
-
|
4936
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
4937
|
+
#
|
4938
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4939
|
+
#
|
4940
|
+
# @example Basic example
|
4941
|
+
# require "google/cloud/security_center/v1"
|
4942
|
+
#
|
4943
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4944
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
4945
|
+
#
|
4946
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4947
|
+
# request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new
|
4948
|
+
#
|
4949
|
+
# # Call the create_event_threat_detection_custom_module method.
|
4950
|
+
# result = client.create_event_threat_detection_custom_module request
|
4951
|
+
#
|
4952
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
4953
|
+
# p result
|
4954
|
+
#
|
4955
|
+
def create_event_threat_detection_custom_module request, options = nil
|
4956
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4806
4957
|
|
4807
|
-
|
4808
|
-
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
4809
|
-
DEFAULT_ENDPOINT = "securitycenter.googleapis.com"
|
4958
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest
|
4810
4959
|
|
4811
|
-
|
4812
|
-
|
4813
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
4814
|
-
allowed.any? { |klass| klass === value }
|
4815
|
-
end
|
4816
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
4817
|
-
config_attr :lib_name, nil, ::String, nil
|
4818
|
-
config_attr :lib_version, nil, ::String, nil
|
4819
|
-
config_attr :timeout, nil, ::Numeric, nil
|
4820
|
-
config_attr :metadata, nil, ::Hash, nil
|
4821
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4822
|
-
config_attr :quota_project, nil, ::String, nil
|
4823
|
-
config_attr :universe_domain, nil, ::String, nil
|
4960
|
+
# Converts hash and nil to an options object
|
4961
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4824
4962
|
|
4825
|
-
#
|
4826
|
-
|
4827
|
-
@parent_config = parent_config unless parent_config.nil?
|
4963
|
+
# Customize the options with defaults
|
4964
|
+
call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h
|
4828
4965
|
|
4829
|
-
|
4830
|
-
|
4966
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4967
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4968
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4969
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
4970
|
+
transports_version_send: [:rest]
|
4831
4971
|
|
4832
|
-
|
4833
|
-
|
4834
|
-
|
4835
|
-
|
4836
|
-
|
4837
|
-
|
4838
|
-
|
4839
|
-
|
4840
|
-
|
4841
|
-
|
4842
|
-
|
4972
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4973
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4974
|
+
|
4975
|
+
options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout,
|
4976
|
+
metadata: call_metadata,
|
4977
|
+
retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy
|
4978
|
+
|
4979
|
+
options.apply_defaults timeout: @config.timeout,
|
4980
|
+
metadata: @config.metadata,
|
4981
|
+
retry_policy: @config.retry_policy
|
4982
|
+
|
4983
|
+
@security_center_stub.create_event_threat_detection_custom_module request, options do |result, operation|
|
4984
|
+
yield result, operation if block_given?
|
4985
|
+
return result
|
4986
|
+
end
|
4987
|
+
rescue ::Gapic::Rest::Error => e
|
4988
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4989
|
+
end
|
4990
|
+
|
4991
|
+
##
|
4992
|
+
# Deletes the specified Event Threat Detection custom module and all of its
|
4993
|
+
# descendants in the Resource Manager hierarchy. This method is only
|
4994
|
+
# supported for resident custom modules.
|
4995
|
+
#
|
4996
|
+
# @overload delete_event_threat_detection_custom_module(request, options = nil)
|
4997
|
+
# Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type
|
4998
|
+
# {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
4999
|
+
#
|
5000
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash]
|
5001
|
+
# A request object representing the call parameters. Required. To specify no
|
5002
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5003
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5004
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5005
|
+
#
|
5006
|
+
# @overload delete_event_threat_detection_custom_module(name: nil)
|
5007
|
+
# Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5008
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5009
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5010
|
+
#
|
5011
|
+
# @param name [::String]
|
5012
|
+
# Required. Name of the custom module to delete.
|
5013
|
+
#
|
5014
|
+
# Its format is:
|
5015
|
+
#
|
5016
|
+
# * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
|
5017
|
+
# * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
|
5018
|
+
# * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
|
5019
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5020
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
5021
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5022
|
+
#
|
5023
|
+
# @return [::Google::Protobuf::Empty]
|
5024
|
+
#
|
5025
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5026
|
+
#
|
5027
|
+
# @example Basic example
|
5028
|
+
# require "google/cloud/security_center/v1"
|
5029
|
+
#
|
5030
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5031
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5032
|
+
#
|
5033
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5034
|
+
# request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new
|
5035
|
+
#
|
5036
|
+
# # Call the delete_event_threat_detection_custom_module method.
|
5037
|
+
# result = client.delete_event_threat_detection_custom_module request
|
5038
|
+
#
|
5039
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
5040
|
+
# p result
|
5041
|
+
#
|
5042
|
+
def delete_event_threat_detection_custom_module request, options = nil
|
5043
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5044
|
+
|
5045
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest
|
5046
|
+
|
5047
|
+
# Converts hash and nil to an options object
|
5048
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5049
|
+
|
5050
|
+
# Customize the options with defaults
|
5051
|
+
call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h
|
5052
|
+
|
5053
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5054
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5055
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5056
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5057
|
+
transports_version_send: [:rest]
|
5058
|
+
|
5059
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5060
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5061
|
+
|
5062
|
+
options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout,
|
5063
|
+
metadata: call_metadata,
|
5064
|
+
retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy
|
5065
|
+
|
5066
|
+
options.apply_defaults timeout: @config.timeout,
|
5067
|
+
metadata: @config.metadata,
|
5068
|
+
retry_policy: @config.retry_policy
|
5069
|
+
|
5070
|
+
@security_center_stub.delete_event_threat_detection_custom_module request, options do |result, operation|
|
5071
|
+
yield result, operation if block_given?
|
5072
|
+
return result
|
5073
|
+
end
|
5074
|
+
rescue ::Gapic::Rest::Error => e
|
5075
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5076
|
+
end
|
5077
|
+
|
5078
|
+
##
|
5079
|
+
# Gets an Event Threat Detection custom module.
|
5080
|
+
#
|
5081
|
+
# @overload get_event_threat_detection_custom_module(request, options = nil)
|
5082
|
+
# Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type
|
5083
|
+
# {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5084
|
+
#
|
5085
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash]
|
5086
|
+
# A request object representing the call parameters. Required. To specify no
|
5087
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5088
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5089
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5090
|
+
#
|
5091
|
+
# @overload get_event_threat_detection_custom_module(name: nil)
|
5092
|
+
# Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5093
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5094
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5095
|
+
#
|
5096
|
+
# @param name [::String]
|
5097
|
+
# Required. Name of the custom module to get.
|
5098
|
+
#
|
5099
|
+
# Its format is:
|
5100
|
+
#
|
5101
|
+
# * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
|
5102
|
+
# * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
|
5103
|
+
# * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
|
5104
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5105
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5106
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5107
|
+
#
|
5108
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5109
|
+
#
|
5110
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5111
|
+
#
|
5112
|
+
# @example Basic example
|
5113
|
+
# require "google/cloud/security_center/v1"
|
5114
|
+
#
|
5115
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5116
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5117
|
+
#
|
5118
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5119
|
+
# request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new
|
5120
|
+
#
|
5121
|
+
# # Call the get_event_threat_detection_custom_module method.
|
5122
|
+
# result = client.get_event_threat_detection_custom_module request
|
5123
|
+
#
|
5124
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5125
|
+
# p result
|
5126
|
+
#
|
5127
|
+
def get_event_threat_detection_custom_module request, options = nil
|
5128
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5129
|
+
|
5130
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest
|
5131
|
+
|
5132
|
+
# Converts hash and nil to an options object
|
5133
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5134
|
+
|
5135
|
+
# Customize the options with defaults
|
5136
|
+
call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h
|
5137
|
+
|
5138
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5139
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5140
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5141
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5142
|
+
transports_version_send: [:rest]
|
5143
|
+
|
5144
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5145
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5146
|
+
|
5147
|
+
options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout,
|
5148
|
+
metadata: call_metadata,
|
5149
|
+
retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy
|
5150
|
+
|
5151
|
+
options.apply_defaults timeout: @config.timeout,
|
5152
|
+
metadata: @config.metadata,
|
5153
|
+
retry_policy: @config.retry_policy
|
5154
|
+
|
5155
|
+
@security_center_stub.get_event_threat_detection_custom_module request, options do |result, operation|
|
5156
|
+
yield result, operation if block_given?
|
5157
|
+
return result
|
5158
|
+
end
|
5159
|
+
rescue ::Gapic::Rest::Error => e
|
5160
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5161
|
+
end
|
5162
|
+
|
5163
|
+
##
|
5164
|
+
# Lists all resident Event Threat Detection custom modules under the
|
5165
|
+
# given Resource Manager parent and its descendants.
|
5166
|
+
#
|
5167
|
+
# @overload list_descendant_event_threat_detection_custom_modules(request, options = nil)
|
5168
|
+
# Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type
|
5169
|
+
# {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
|
5170
|
+
#
|
5171
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash]
|
5172
|
+
# A request object representing the call parameters. Required. To specify no
|
5173
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5174
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5175
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5176
|
+
#
|
5177
|
+
# @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil)
|
5178
|
+
# Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at
|
5179
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5180
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5181
|
+
#
|
5182
|
+
# @param parent [::String]
|
5183
|
+
# Required. Name of the parent to list custom modules under.
|
5184
|
+
#
|
5185
|
+
# Its format is:
|
5186
|
+
#
|
5187
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5188
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5189
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5190
|
+
# @param page_token [::String]
|
5191
|
+
# A page token, received from a previous
|
5192
|
+
# `ListDescendantEventThreatDetectionCustomModules` call. Provide this to
|
5193
|
+
# retrieve the subsequent page.
|
5194
|
+
#
|
5195
|
+
# When paginating, all other parameters provided to
|
5196
|
+
# `ListDescendantEventThreatDetectionCustomModules` must match the call that
|
5197
|
+
# provided the page token.
|
5198
|
+
# @param page_size [::Integer]
|
5199
|
+
# The maximum number of modules to return. The service may return fewer than
|
5200
|
+
# this value.
|
5201
|
+
# If unspecified, at most 10 configs will be returned.
|
5202
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
5203
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5204
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5205
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5206
|
+
#
|
5207
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5208
|
+
#
|
5209
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5210
|
+
#
|
5211
|
+
# @example Basic example
|
5212
|
+
# require "google/cloud/security_center/v1"
|
5213
|
+
#
|
5214
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5215
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5216
|
+
#
|
5217
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5218
|
+
# request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new
|
5219
|
+
#
|
5220
|
+
# # Call the list_descendant_event_threat_detection_custom_modules method.
|
5221
|
+
# result = client.list_descendant_event_threat_detection_custom_modules request
|
5222
|
+
#
|
5223
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5224
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5225
|
+
# result.each do |item|
|
5226
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5227
|
+
# p item
|
5228
|
+
# end
|
5229
|
+
#
|
5230
|
+
def list_descendant_event_threat_detection_custom_modules request, options = nil
|
5231
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5232
|
+
|
5233
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest
|
5234
|
+
|
5235
|
+
# Converts hash and nil to an options object
|
5236
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5237
|
+
|
5238
|
+
# Customize the options with defaults
|
5239
|
+
call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h
|
5240
|
+
|
5241
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5242
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5243
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5244
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5245
|
+
transports_version_send: [:rest]
|
5246
|
+
|
5247
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5248
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5249
|
+
|
5250
|
+
options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout,
|
5251
|
+
metadata: call_metadata,
|
5252
|
+
retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy
|
5253
|
+
|
5254
|
+
options.apply_defaults timeout: @config.timeout,
|
5255
|
+
metadata: @config.metadata,
|
5256
|
+
retry_policy: @config.retry_policy
|
5257
|
+
|
5258
|
+
@security_center_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation|
|
5259
|
+
result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
|
5260
|
+
yield result, operation if block_given?
|
5261
|
+
return result
|
5262
|
+
end
|
5263
|
+
rescue ::Gapic::Rest::Error => e
|
5264
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5265
|
+
end
|
5266
|
+
|
5267
|
+
##
|
5268
|
+
# Lists all Event Threat Detection custom modules for the given
|
5269
|
+
# Resource Manager parent. This includes resident modules defined at the
|
5270
|
+
# scope of the parent along with modules inherited from ancestors.
|
5271
|
+
#
|
5272
|
+
# @overload list_event_threat_detection_custom_modules(request, options = nil)
|
5273
|
+
# Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type
|
5274
|
+
# {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
|
5275
|
+
#
|
5276
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash]
|
5277
|
+
# A request object representing the call parameters. Required. To specify no
|
5278
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5279
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5280
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5281
|
+
#
|
5282
|
+
# @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil)
|
5283
|
+
# Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at
|
5284
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5285
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5286
|
+
#
|
5287
|
+
# @param parent [::String]
|
5288
|
+
# Required. Name of the parent to list custom modules under.
|
5289
|
+
#
|
5290
|
+
# Its format is:
|
5291
|
+
#
|
5292
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5293
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5294
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5295
|
+
# @param page_token [::String]
|
5296
|
+
# A page token, received from a previous
|
5297
|
+
# `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the
|
5298
|
+
# subsequent page.
|
5299
|
+
#
|
5300
|
+
# When paginating, all other parameters provided to
|
5301
|
+
# `ListEventThreatDetectionCustomModules` must match the call that provided
|
5302
|
+
# the page token.
|
5303
|
+
# @param page_size [::Integer]
|
5304
|
+
# The maximum number of modules to return. The service may return fewer than
|
5305
|
+
# this value.
|
5306
|
+
# If unspecified, at most 10 configs will be returned.
|
5307
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
5308
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5309
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5310
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5311
|
+
#
|
5312
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>]
|
5313
|
+
#
|
5314
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5315
|
+
#
|
5316
|
+
# @example Basic example
|
5317
|
+
# require "google/cloud/security_center/v1"
|
5318
|
+
#
|
5319
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5320
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5321
|
+
#
|
5322
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5323
|
+
# request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new
|
5324
|
+
#
|
5325
|
+
# # Call the list_event_threat_detection_custom_modules method.
|
5326
|
+
# result = client.list_event_threat_detection_custom_modules request
|
5327
|
+
#
|
5328
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5329
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5330
|
+
# result.each do |item|
|
5331
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5332
|
+
# p item
|
5333
|
+
# end
|
5334
|
+
#
|
5335
|
+
def list_event_threat_detection_custom_modules request, options = nil
|
5336
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5337
|
+
|
5338
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest
|
5339
|
+
|
5340
|
+
# Converts hash and nil to an options object
|
5341
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5342
|
+
|
5343
|
+
# Customize the options with defaults
|
5344
|
+
call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h
|
5345
|
+
|
5346
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5347
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5348
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5349
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5350
|
+
transports_version_send: [:rest]
|
5351
|
+
|
5352
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5353
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5354
|
+
|
5355
|
+
options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout,
|
5356
|
+
metadata: call_metadata,
|
5357
|
+
retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy
|
5358
|
+
|
5359
|
+
options.apply_defaults timeout: @config.timeout,
|
5360
|
+
metadata: @config.metadata,
|
5361
|
+
retry_policy: @config.retry_policy
|
5362
|
+
|
5363
|
+
@security_center_stub.list_event_threat_detection_custom_modules request, options do |result, operation|
|
5364
|
+
result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
|
5365
|
+
yield result, operation if block_given?
|
5366
|
+
return result
|
5367
|
+
end
|
5368
|
+
rescue ::Gapic::Rest::Error => e
|
5369
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5370
|
+
end
|
5371
|
+
|
5372
|
+
##
|
5373
|
+
# Updates the Event Threat Detection custom module with the given name based
|
5374
|
+
# on the given update mask. Updating the enablement state is supported for
|
5375
|
+
# both resident and inherited modules (though resident modules cannot have an
|
5376
|
+
# enablement state of "inherited"). Updating the display name or
|
5377
|
+
# configuration of a module is supported for resident modules only. The type
|
5378
|
+
# of a module cannot be changed.
|
5379
|
+
#
|
5380
|
+
# @overload update_event_threat_detection_custom_module(request, options = nil)
|
5381
|
+
# Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type
|
5382
|
+
# {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5383
|
+
#
|
5384
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash]
|
5385
|
+
# A request object representing the call parameters. Required. To specify no
|
5386
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5387
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5388
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5389
|
+
#
|
5390
|
+
# @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil)
|
5391
|
+
# Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5392
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5393
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5394
|
+
#
|
5395
|
+
# @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash]
|
5396
|
+
# Required. The module being updated.
|
5397
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
5398
|
+
# The list of fields to be updated.
|
5399
|
+
# If empty all mutable fields will be updated.
|
5400
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5401
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5402
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5403
|
+
#
|
5404
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule]
|
5405
|
+
#
|
5406
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5407
|
+
#
|
5408
|
+
# @example Basic example
|
5409
|
+
# require "google/cloud/security_center/v1"
|
5410
|
+
#
|
5411
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5412
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5413
|
+
#
|
5414
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5415
|
+
# request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new
|
5416
|
+
#
|
5417
|
+
# # Call the update_event_threat_detection_custom_module method.
|
5418
|
+
# result = client.update_event_threat_detection_custom_module request
|
5419
|
+
#
|
5420
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.
|
5421
|
+
# p result
|
5422
|
+
#
|
5423
|
+
def update_event_threat_detection_custom_module request, options = nil
|
5424
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5425
|
+
|
5426
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest
|
5427
|
+
|
5428
|
+
# Converts hash and nil to an options object
|
5429
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5430
|
+
|
5431
|
+
# Customize the options with defaults
|
5432
|
+
call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h
|
5433
|
+
|
5434
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5435
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5436
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5437
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5438
|
+
transports_version_send: [:rest]
|
5439
|
+
|
5440
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5441
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5442
|
+
|
5443
|
+
options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout,
|
5444
|
+
metadata: call_metadata,
|
5445
|
+
retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy
|
5446
|
+
|
5447
|
+
options.apply_defaults timeout: @config.timeout,
|
5448
|
+
metadata: @config.metadata,
|
5449
|
+
retry_policy: @config.retry_policy
|
5450
|
+
|
5451
|
+
@security_center_stub.update_event_threat_detection_custom_module request, options do |result, operation|
|
5452
|
+
yield result, operation if block_given?
|
5453
|
+
return result
|
5454
|
+
end
|
5455
|
+
rescue ::Gapic::Rest::Error => e
|
5456
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5457
|
+
end
|
5458
|
+
|
5459
|
+
##
|
5460
|
+
# Validates the given Event Threat Detection custom module.
|
5461
|
+
#
|
5462
|
+
# @overload validate_event_threat_detection_custom_module(request, options = nil)
|
5463
|
+
# Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type
|
5464
|
+
# {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5465
|
+
#
|
5466
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash]
|
5467
|
+
# A request object representing the call parameters. Required. To specify no
|
5468
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5469
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5470
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5471
|
+
#
|
5472
|
+
# @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil)
|
5473
|
+
# Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5474
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5475
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5476
|
+
#
|
5477
|
+
# @param parent [::String]
|
5478
|
+
# Required. Resource name of the parent to validate the Custom Module under.
|
5479
|
+
#
|
5480
|
+
# Its format is:
|
5481
|
+
#
|
5482
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5483
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5484
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5485
|
+
# @param raw_text [::String]
|
5486
|
+
# Required. The raw text of the module's contents. Used to generate error
|
5487
|
+
# messages.
|
5488
|
+
# @param type [::String]
|
5489
|
+
# Required. The type of the module (e.g. CONFIGURABLE_BAD_IP).
|
5490
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5491
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse]
|
5492
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5493
|
+
#
|
5494
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse]
|
5495
|
+
#
|
5496
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5497
|
+
#
|
5498
|
+
# @example Basic example
|
5499
|
+
# require "google/cloud/security_center/v1"
|
5500
|
+
#
|
5501
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5502
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5503
|
+
#
|
5504
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5505
|
+
# request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new
|
5506
|
+
#
|
5507
|
+
# # Call the validate_event_threat_detection_custom_module method.
|
5508
|
+
# result = client.validate_event_threat_detection_custom_module request
|
5509
|
+
#
|
5510
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.
|
5511
|
+
# p result
|
5512
|
+
#
|
5513
|
+
def validate_event_threat_detection_custom_module request, options = nil
|
5514
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5515
|
+
|
5516
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest
|
5517
|
+
|
5518
|
+
# Converts hash and nil to an options object
|
5519
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5520
|
+
|
5521
|
+
# Customize the options with defaults
|
5522
|
+
call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h
|
5523
|
+
|
5524
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5525
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5526
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5527
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5528
|
+
transports_version_send: [:rest]
|
5529
|
+
|
5530
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5531
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5532
|
+
|
5533
|
+
options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout,
|
5534
|
+
metadata: call_metadata,
|
5535
|
+
retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy
|
5536
|
+
|
5537
|
+
options.apply_defaults timeout: @config.timeout,
|
5538
|
+
metadata: @config.metadata,
|
5539
|
+
retry_policy: @config.retry_policy
|
5540
|
+
|
5541
|
+
@security_center_stub.validate_event_threat_detection_custom_module request, options do |result, operation|
|
5542
|
+
yield result, operation if block_given?
|
5543
|
+
return result
|
5544
|
+
end
|
5545
|
+
rescue ::Gapic::Rest::Error => e
|
5546
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5547
|
+
end
|
5548
|
+
|
5549
|
+
##
|
5550
|
+
# Gets an effective Event Threat Detection custom module at the given level.
|
5551
|
+
#
|
5552
|
+
# @overload get_effective_event_threat_detection_custom_module(request, options = nil)
|
5553
|
+
# Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type
|
5554
|
+
# {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
|
5555
|
+
#
|
5556
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash]
|
5557
|
+
# A request object representing the call parameters. Required. To specify no
|
5558
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5559
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5560
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5561
|
+
#
|
5562
|
+
# @overload get_effective_event_threat_detection_custom_module(name: nil)
|
5563
|
+
# Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at
|
5564
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5565
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5566
|
+
#
|
5567
|
+
# @param name [::String]
|
5568
|
+
# Required. The resource name of the effective Event Threat Detection custom
|
5569
|
+
# module.
|
5570
|
+
#
|
5571
|
+
# Its format is:
|
5572
|
+
#
|
5573
|
+
# * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
|
5574
|
+
# * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
|
5575
|
+
# * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
|
5576
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5577
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule]
|
5578
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5579
|
+
#
|
5580
|
+
# @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule]
|
5581
|
+
#
|
5582
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5583
|
+
#
|
5584
|
+
# @example Basic example
|
5585
|
+
# require "google/cloud/security_center/v1"
|
5586
|
+
#
|
5587
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5588
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5589
|
+
#
|
5590
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5591
|
+
# request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new
|
5592
|
+
#
|
5593
|
+
# # Call the get_effective_event_threat_detection_custom_module method.
|
5594
|
+
# result = client.get_effective_event_threat_detection_custom_module request
|
5595
|
+
#
|
5596
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.
|
5597
|
+
# p result
|
5598
|
+
#
|
5599
|
+
def get_effective_event_threat_detection_custom_module request, options = nil
|
5600
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5601
|
+
|
5602
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest
|
5603
|
+
|
5604
|
+
# Converts hash and nil to an options object
|
5605
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5606
|
+
|
5607
|
+
# Customize the options with defaults
|
5608
|
+
call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h
|
5609
|
+
|
5610
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5611
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5612
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5613
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5614
|
+
transports_version_send: [:rest]
|
5615
|
+
|
5616
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5617
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5618
|
+
|
5619
|
+
options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout,
|
5620
|
+
metadata: call_metadata,
|
5621
|
+
retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy
|
5622
|
+
|
5623
|
+
options.apply_defaults timeout: @config.timeout,
|
5624
|
+
metadata: @config.metadata,
|
5625
|
+
retry_policy: @config.retry_policy
|
5626
|
+
|
5627
|
+
@security_center_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation|
|
5628
|
+
yield result, operation if block_given?
|
5629
|
+
return result
|
5630
|
+
end
|
5631
|
+
rescue ::Gapic::Rest::Error => e
|
5632
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5633
|
+
end
|
5634
|
+
|
5635
|
+
##
|
5636
|
+
# Lists all effective Event Threat Detection custom modules for the
|
5637
|
+
# given parent. This includes resident modules defined at the scope of the
|
5638
|
+
# parent along with modules inherited from its ancestors.
|
5639
|
+
#
|
5640
|
+
# @overload list_effective_event_threat_detection_custom_modules(request, options = nil)
|
5641
|
+
# Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type
|
5642
|
+
# {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
|
5643
|
+
#
|
5644
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash]
|
5645
|
+
# A request object representing the call parameters. Required. To specify no
|
5646
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5647
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5648
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5649
|
+
#
|
5650
|
+
# @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil)
|
5651
|
+
# Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at
|
5652
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5653
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5654
|
+
#
|
5655
|
+
# @param parent [::String]
|
5656
|
+
# Required. Name of the parent to list custom modules for.
|
5657
|
+
#
|
5658
|
+
# Its format is:
|
5659
|
+
#
|
5660
|
+
# * `organizations/{organization}/eventThreatDetectionSettings`.
|
5661
|
+
# * `folders/{folder}/eventThreatDetectionSettings`.
|
5662
|
+
# * `projects/{project}/eventThreatDetectionSettings`.
|
5663
|
+
# @param page_token [::String]
|
5664
|
+
# A page token, received from a previous
|
5665
|
+
# `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to
|
5666
|
+
# retrieve the subsequent page.
|
5667
|
+
#
|
5668
|
+
# When paginating, all other parameters provided to
|
5669
|
+
# `ListEffectiveEventThreatDetectionCustomModules` must match the call that
|
5670
|
+
# provided the page token.
|
5671
|
+
# @param page_size [::Integer]
|
5672
|
+
# The maximum number of modules to return. The service may return fewer than
|
5673
|
+
# this value.
|
5674
|
+
# If unspecified, at most 10 configs will be returned.
|
5675
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
5676
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5677
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>]
|
5678
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5679
|
+
#
|
5680
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>]
|
5681
|
+
#
|
5682
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5683
|
+
#
|
5684
|
+
# @example Basic example
|
5685
|
+
# require "google/cloud/security_center/v1"
|
5686
|
+
#
|
5687
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5688
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5689
|
+
#
|
5690
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5691
|
+
# request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new
|
5692
|
+
#
|
5693
|
+
# # Call the list_effective_event_threat_detection_custom_modules method.
|
5694
|
+
# result = client.list_effective_event_threat_detection_custom_modules request
|
5695
|
+
#
|
5696
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5697
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5698
|
+
# result.each do |item|
|
5699
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.
|
5700
|
+
# p item
|
5701
|
+
# end
|
5702
|
+
#
|
5703
|
+
def list_effective_event_threat_detection_custom_modules request, options = nil
|
5704
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5705
|
+
|
5706
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest
|
5707
|
+
|
5708
|
+
# Converts hash and nil to an options object
|
5709
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5710
|
+
|
5711
|
+
# Customize the options with defaults
|
5712
|
+
call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h
|
5713
|
+
|
5714
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5715
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5716
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5717
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5718
|
+
transports_version_send: [:rest]
|
5719
|
+
|
5720
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5721
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5722
|
+
|
5723
|
+
options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout,
|
5724
|
+
metadata: call_metadata,
|
5725
|
+
retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy
|
5726
|
+
|
5727
|
+
options.apply_defaults timeout: @config.timeout,
|
5728
|
+
metadata: @config.metadata,
|
5729
|
+
retry_policy: @config.retry_policy
|
5730
|
+
|
5731
|
+
@security_center_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation|
|
5732
|
+
result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options
|
5733
|
+
yield result, operation if block_given?
|
5734
|
+
return result
|
5735
|
+
end
|
5736
|
+
rescue ::Gapic::Rest::Error => e
|
5737
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5738
|
+
end
|
5739
|
+
|
5740
|
+
##
|
5741
|
+
# Creates a ResourceValueConfig for an organization. Maps user's tags to
|
5742
|
+
# difference resource values for use by the attack path simulation.
|
5743
|
+
#
|
5744
|
+
# @overload batch_create_resource_value_configs(request, options = nil)
|
5745
|
+
# Pass arguments to `batch_create_resource_value_configs` via a request object, either of type
|
5746
|
+
# {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash.
|
5747
|
+
#
|
5748
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash]
|
5749
|
+
# A request object representing the call parameters. Required. To specify no
|
5750
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5751
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5752
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5753
|
+
#
|
5754
|
+
# @overload batch_create_resource_value_configs(parent: nil, requests: nil)
|
5755
|
+
# Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at
|
5756
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5757
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5758
|
+
#
|
5759
|
+
# @param parent [::String]
|
5760
|
+
# Required. Resource name of the new ResourceValueConfig's parent.
|
5761
|
+
# The parent field in the CreateResourceValueConfigRequest
|
5762
|
+
# messages must either be empty or match this field.
|
5763
|
+
# @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>]
|
5764
|
+
# Required. The resource value configs to be created.
|
5765
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5766
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse]
|
5767
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5768
|
+
#
|
5769
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse]
|
5770
|
+
#
|
5771
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5772
|
+
#
|
5773
|
+
# @example Basic example
|
5774
|
+
# require "google/cloud/security_center/v1"
|
5775
|
+
#
|
5776
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5777
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5778
|
+
#
|
5779
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5780
|
+
# request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new
|
5781
|
+
#
|
5782
|
+
# # Call the batch_create_resource_value_configs method.
|
5783
|
+
# result = client.batch_create_resource_value_configs request
|
5784
|
+
#
|
5785
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.
|
5786
|
+
# p result
|
5787
|
+
#
|
5788
|
+
def batch_create_resource_value_configs request, options = nil
|
5789
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5790
|
+
|
5791
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest
|
5792
|
+
|
5793
|
+
# Converts hash and nil to an options object
|
5794
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5795
|
+
|
5796
|
+
# Customize the options with defaults
|
5797
|
+
call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h
|
5798
|
+
|
5799
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5800
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5801
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5802
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5803
|
+
transports_version_send: [:rest]
|
5804
|
+
|
5805
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5806
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5807
|
+
|
5808
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout,
|
5809
|
+
metadata: call_metadata,
|
5810
|
+
retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy
|
5811
|
+
|
5812
|
+
options.apply_defaults timeout: @config.timeout,
|
5813
|
+
metadata: @config.metadata,
|
5814
|
+
retry_policy: @config.retry_policy
|
5815
|
+
|
5816
|
+
@security_center_stub.batch_create_resource_value_configs request, options do |result, operation|
|
5817
|
+
yield result, operation if block_given?
|
5818
|
+
return result
|
5819
|
+
end
|
5820
|
+
rescue ::Gapic::Rest::Error => e
|
5821
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5822
|
+
end
|
5823
|
+
|
5824
|
+
##
|
5825
|
+
# Deletes a ResourceValueConfig.
|
5826
|
+
#
|
5827
|
+
# @overload delete_resource_value_config(request, options = nil)
|
5828
|
+
# Pass arguments to `delete_resource_value_config` via a request object, either of type
|
5829
|
+
# {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash.
|
5830
|
+
#
|
5831
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash]
|
5832
|
+
# A request object representing the call parameters. Required. To specify no
|
5833
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5834
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5835
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5836
|
+
#
|
5837
|
+
# @overload delete_resource_value_config(name: nil)
|
5838
|
+
# Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at
|
5839
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5840
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5841
|
+
#
|
5842
|
+
# @param name [::String]
|
5843
|
+
# Required. Name of the ResourceValueConfig to delete
|
5844
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5845
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
5846
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5847
|
+
#
|
5848
|
+
# @return [::Google::Protobuf::Empty]
|
5849
|
+
#
|
5850
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5851
|
+
#
|
5852
|
+
# @example Basic example
|
5853
|
+
# require "google/cloud/security_center/v1"
|
5854
|
+
#
|
5855
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5856
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5857
|
+
#
|
5858
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5859
|
+
# request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new
|
5860
|
+
#
|
5861
|
+
# # Call the delete_resource_value_config method.
|
5862
|
+
# result = client.delete_resource_value_config request
|
5863
|
+
#
|
5864
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
5865
|
+
# p result
|
5866
|
+
#
|
5867
|
+
def delete_resource_value_config request, options = nil
|
5868
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5869
|
+
|
5870
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest
|
5871
|
+
|
5872
|
+
# Converts hash and nil to an options object
|
5873
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5874
|
+
|
5875
|
+
# Customize the options with defaults
|
5876
|
+
call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h
|
5877
|
+
|
5878
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5879
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5880
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5881
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5882
|
+
transports_version_send: [:rest]
|
5883
|
+
|
5884
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5885
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5886
|
+
|
5887
|
+
options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout,
|
5888
|
+
metadata: call_metadata,
|
5889
|
+
retry_policy: @config.rpcs.delete_resource_value_config.retry_policy
|
5890
|
+
|
5891
|
+
options.apply_defaults timeout: @config.timeout,
|
5892
|
+
metadata: @config.metadata,
|
5893
|
+
retry_policy: @config.retry_policy
|
5894
|
+
|
5895
|
+
@security_center_stub.delete_resource_value_config request, options do |result, operation|
|
5896
|
+
yield result, operation if block_given?
|
5897
|
+
return result
|
5898
|
+
end
|
5899
|
+
rescue ::Gapic::Rest::Error => e
|
5900
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5901
|
+
end
|
5902
|
+
|
5903
|
+
##
|
5904
|
+
# Gets a ResourceValueConfig.
|
5905
|
+
#
|
5906
|
+
# @overload get_resource_value_config(request, options = nil)
|
5907
|
+
# Pass arguments to `get_resource_value_config` via a request object, either of type
|
5908
|
+
# {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash.
|
5909
|
+
#
|
5910
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash]
|
5911
|
+
# A request object representing the call parameters. Required. To specify no
|
5912
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5913
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5914
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5915
|
+
#
|
5916
|
+
# @overload get_resource_value_config(name: nil)
|
5917
|
+
# Pass arguments to `get_resource_value_config` via keyword arguments. Note that at
|
5918
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5919
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5920
|
+
#
|
5921
|
+
# @param name [::String]
|
5922
|
+
# Required. Name of the resource value config to retrieve. Its format is
|
5923
|
+
# `organizations/{organization}/resourceValueConfigs/{config_id}`.
|
5924
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5925
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
5926
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5927
|
+
#
|
5928
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
5929
|
+
#
|
5930
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5931
|
+
#
|
5932
|
+
# @example Basic example
|
5933
|
+
# require "google/cloud/security_center/v1"
|
5934
|
+
#
|
5935
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5936
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
5937
|
+
#
|
5938
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5939
|
+
# request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new
|
5940
|
+
#
|
5941
|
+
# # Call the get_resource_value_config method.
|
5942
|
+
# result = client.get_resource_value_config request
|
5943
|
+
#
|
5944
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig.
|
5945
|
+
# p result
|
5946
|
+
#
|
5947
|
+
def get_resource_value_config request, options = nil
|
5948
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5949
|
+
|
5950
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest
|
5951
|
+
|
5952
|
+
# Converts hash and nil to an options object
|
5953
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5954
|
+
|
5955
|
+
# Customize the options with defaults
|
5956
|
+
call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h
|
5957
|
+
|
5958
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5959
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5960
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5961
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
5962
|
+
transports_version_send: [:rest]
|
5963
|
+
|
5964
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5965
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5966
|
+
|
5967
|
+
options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout,
|
5968
|
+
metadata: call_metadata,
|
5969
|
+
retry_policy: @config.rpcs.get_resource_value_config.retry_policy
|
5970
|
+
|
5971
|
+
options.apply_defaults timeout: @config.timeout,
|
5972
|
+
metadata: @config.metadata,
|
5973
|
+
retry_policy: @config.retry_policy
|
5974
|
+
|
5975
|
+
@security_center_stub.get_resource_value_config request, options do |result, operation|
|
5976
|
+
yield result, operation if block_given?
|
5977
|
+
return result
|
5978
|
+
end
|
5979
|
+
rescue ::Gapic::Rest::Error => e
|
5980
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5981
|
+
end
|
5982
|
+
|
5983
|
+
##
|
5984
|
+
# Lists all ResourceValueConfigs.
|
5985
|
+
#
|
5986
|
+
# @overload list_resource_value_configs(request, options = nil)
|
5987
|
+
# Pass arguments to `list_resource_value_configs` via a request object, either of type
|
5988
|
+
# {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash.
|
5989
|
+
#
|
5990
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash]
|
5991
|
+
# A request object representing the call parameters. Required. To specify no
|
5992
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5993
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5994
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5995
|
+
#
|
5996
|
+
# @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil)
|
5997
|
+
# Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at
|
5998
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5999
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6000
|
+
#
|
6001
|
+
# @param parent [::String]
|
6002
|
+
# Required. The parent, which owns the collection of resource value configs.
|
6003
|
+
# Its format is
|
6004
|
+
# `organizations/[organization_id]`
|
6005
|
+
# @param page_size [::Integer]
|
6006
|
+
# The number of results to return. The service may return fewer than
|
6007
|
+
# this value.
|
6008
|
+
# If unspecified, at most 10 configs will be returned.
|
6009
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
6010
|
+
# @param page_token [::String]
|
6011
|
+
# A page token, received from a previous `ListResourceValueConfigs` call.
|
6012
|
+
# Provide this to retrieve the subsequent page.
|
6013
|
+
#
|
6014
|
+
# When paginating, all other parameters provided to
|
6015
|
+
# `ListResourceValueConfigs` must match the call that provided the
|
6016
|
+
# page token.
|
6017
|
+
#
|
6018
|
+
# page_size can be specified, and the new page_size will be used.
|
6019
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
6020
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>]
|
6021
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
6022
|
+
#
|
6023
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>]
|
6024
|
+
#
|
6025
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
6026
|
+
#
|
6027
|
+
# @example Basic example
|
6028
|
+
# require "google/cloud/security_center/v1"
|
6029
|
+
#
|
6030
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6031
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
6032
|
+
#
|
6033
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6034
|
+
# request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new
|
6035
|
+
#
|
6036
|
+
# # Call the list_resource_value_configs method.
|
6037
|
+
# result = client.list_resource_value_configs request
|
6038
|
+
#
|
6039
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
6040
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
6041
|
+
# result.each do |item|
|
6042
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.
|
6043
|
+
# p item
|
6044
|
+
# end
|
6045
|
+
#
|
6046
|
+
def list_resource_value_configs request, options = nil
|
6047
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6048
|
+
|
6049
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest
|
6050
|
+
|
6051
|
+
# Converts hash and nil to an options object
|
6052
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6053
|
+
|
6054
|
+
# Customize the options with defaults
|
6055
|
+
call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h
|
6056
|
+
|
6057
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6058
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6059
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6060
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
6061
|
+
transports_version_send: [:rest]
|
6062
|
+
|
6063
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6064
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6065
|
+
|
6066
|
+
options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout,
|
6067
|
+
metadata: call_metadata,
|
6068
|
+
retry_policy: @config.rpcs.list_resource_value_configs.retry_policy
|
6069
|
+
|
6070
|
+
options.apply_defaults timeout: @config.timeout,
|
6071
|
+
metadata: @config.metadata,
|
6072
|
+
retry_policy: @config.retry_policy
|
6073
|
+
|
6074
|
+
@security_center_stub.list_resource_value_configs request, options do |result, operation|
|
6075
|
+
result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options
|
6076
|
+
yield result, operation if block_given?
|
6077
|
+
return result
|
6078
|
+
end
|
6079
|
+
rescue ::Gapic::Rest::Error => e
|
6080
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6081
|
+
end
|
6082
|
+
|
6083
|
+
##
|
6084
|
+
# Updates an existing ResourceValueConfigs with new rules.
|
6085
|
+
#
|
6086
|
+
# @overload update_resource_value_config(request, options = nil)
|
6087
|
+
# Pass arguments to `update_resource_value_config` via a request object, either of type
|
6088
|
+
# {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash.
|
6089
|
+
#
|
6090
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash]
|
6091
|
+
# A request object representing the call parameters. Required. To specify no
|
6092
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6093
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6094
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
6095
|
+
#
|
6096
|
+
# @overload update_resource_value_config(resource_value_config: nil, update_mask: nil)
|
6097
|
+
# Pass arguments to `update_resource_value_config` via keyword arguments. Note that at
|
6098
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6099
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6100
|
+
#
|
6101
|
+
# @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash]
|
6102
|
+
# Required. The resource value config being updated.
|
6103
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
6104
|
+
# The list of fields to be updated.
|
6105
|
+
# If empty all mutable fields will be updated.
|
6106
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
6107
|
+
# @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
6108
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
6109
|
+
#
|
6110
|
+
# @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig]
|
6111
|
+
#
|
6112
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
6113
|
+
#
|
6114
|
+
# @example Basic example
|
6115
|
+
# require "google/cloud/security_center/v1"
|
6116
|
+
#
|
6117
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6118
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
6119
|
+
#
|
6120
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6121
|
+
# request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new
|
6122
|
+
#
|
6123
|
+
# # Call the update_resource_value_config method.
|
6124
|
+
# result = client.update_resource_value_config request
|
6125
|
+
#
|
6126
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig.
|
6127
|
+
# p result
|
6128
|
+
#
|
6129
|
+
def update_resource_value_config request, options = nil
|
6130
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6131
|
+
|
6132
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest
|
6133
|
+
|
6134
|
+
# Converts hash and nil to an options object
|
6135
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6136
|
+
|
6137
|
+
# Customize the options with defaults
|
6138
|
+
call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h
|
6139
|
+
|
6140
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6141
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6142
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6143
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
6144
|
+
transports_version_send: [:rest]
|
6145
|
+
|
6146
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6147
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6148
|
+
|
6149
|
+
options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout,
|
6150
|
+
metadata: call_metadata,
|
6151
|
+
retry_policy: @config.rpcs.update_resource_value_config.retry_policy
|
6152
|
+
|
6153
|
+
options.apply_defaults timeout: @config.timeout,
|
6154
|
+
metadata: @config.metadata,
|
6155
|
+
retry_policy: @config.retry_policy
|
6156
|
+
|
6157
|
+
@security_center_stub.update_resource_value_config request, options do |result, operation|
|
6158
|
+
yield result, operation if block_given?
|
6159
|
+
return result
|
6160
|
+
end
|
6161
|
+
rescue ::Gapic::Rest::Error => e
|
6162
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6163
|
+
end
|
6164
|
+
|
6165
|
+
##
|
6166
|
+
# Lists the valued resources for a set of simulation results and filter.
|
6167
|
+
#
|
6168
|
+
# @overload list_valued_resources(request, options = nil)
|
6169
|
+
# Pass arguments to `list_valued_resources` via a request object, either of type
|
6170
|
+
# {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash.
|
6171
|
+
#
|
6172
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash]
|
6173
|
+
# A request object representing the call parameters. Required. To specify no
|
6174
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6175
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6176
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
6177
|
+
#
|
6178
|
+
# @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil)
|
6179
|
+
# Pass arguments to `list_valued_resources` via keyword arguments. Note that at
|
6180
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6181
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6182
|
+
#
|
6183
|
+
# @param parent [::String]
|
6184
|
+
# Required. Name of parent to list valued resources.
|
6185
|
+
#
|
6186
|
+
# Valid formats:
|
6187
|
+
# `organizations/{organization}`,
|
6188
|
+
# `organizations/{organization}/simulations/{simulation}`
|
6189
|
+
# `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
|
6190
|
+
# @param filter [::String]
|
6191
|
+
# The filter expression that filters the valued resources in the response.
|
6192
|
+
# Supported fields:
|
6193
|
+
#
|
6194
|
+
# * `resource_value` supports =
|
6195
|
+
# * `resource_type` supports =
|
6196
|
+
# @param page_token [::String]
|
6197
|
+
# The value returned by the last `ListValuedResourcesResponse`; indicates
|
6198
|
+
# that this is a continuation of a prior `ListValuedResources` call, and
|
6199
|
+
# that the system should return the next page of data.
|
6200
|
+
# @param page_size [::Integer]
|
6201
|
+
# The maximum number of results to return in a single response. Default is
|
6202
|
+
# 10, minimum is 1, maximum is 1000.
|
6203
|
+
# @param order_by [::String]
|
6204
|
+
# Optional. The fields by which to order the valued resources response.
|
6205
|
+
#
|
6206
|
+
# Supported fields:
|
6207
|
+
#
|
6208
|
+
# * `exposed_score`
|
6209
|
+
#
|
6210
|
+
# * `resource_value`
|
6211
|
+
#
|
6212
|
+
# * `resource_type`
|
6213
|
+
#
|
6214
|
+
# * `resource`
|
6215
|
+
#
|
6216
|
+
# * `display_name`
|
6217
|
+
#
|
6218
|
+
# Values should be a comma separated list of fields. For example:
|
6219
|
+
# `exposed_score,resource_value`.
|
6220
|
+
#
|
6221
|
+
# The default sorting order is descending. To specify ascending or descending
|
6222
|
+
# order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for
|
6223
|
+
# example: `exposed_score DESC`.
|
6224
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
6225
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>]
|
6226
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
6227
|
+
#
|
6228
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>]
|
6229
|
+
#
|
6230
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
6231
|
+
#
|
6232
|
+
# @example Basic example
|
6233
|
+
# require "google/cloud/security_center/v1"
|
6234
|
+
#
|
6235
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6236
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
6237
|
+
#
|
6238
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6239
|
+
# request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new
|
6240
|
+
#
|
6241
|
+
# # Call the list_valued_resources method.
|
6242
|
+
# result = client.list_valued_resources request
|
6243
|
+
#
|
6244
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
6245
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
6246
|
+
# result.each do |item|
|
6247
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource.
|
6248
|
+
# p item
|
6249
|
+
# end
|
6250
|
+
#
|
6251
|
+
def list_valued_resources request, options = nil
|
6252
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6253
|
+
|
6254
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest
|
6255
|
+
|
6256
|
+
# Converts hash and nil to an options object
|
6257
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6258
|
+
|
6259
|
+
# Customize the options with defaults
|
6260
|
+
call_metadata = @config.rpcs.list_valued_resources.metadata.to_h
|
6261
|
+
|
6262
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6263
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6264
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6265
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
6266
|
+
transports_version_send: [:rest]
|
6267
|
+
|
6268
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6269
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6270
|
+
|
6271
|
+
options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout,
|
6272
|
+
metadata: call_metadata,
|
6273
|
+
retry_policy: @config.rpcs.list_valued_resources.retry_policy
|
6274
|
+
|
6275
|
+
options.apply_defaults timeout: @config.timeout,
|
6276
|
+
metadata: @config.metadata,
|
6277
|
+
retry_policy: @config.retry_policy
|
6278
|
+
|
6279
|
+
@security_center_stub.list_valued_resources request, options do |result, operation|
|
6280
|
+
result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options
|
6281
|
+
yield result, operation if block_given?
|
6282
|
+
return result
|
6283
|
+
end
|
6284
|
+
rescue ::Gapic::Rest::Error => e
|
6285
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6286
|
+
end
|
6287
|
+
|
6288
|
+
##
|
6289
|
+
# Lists the attack paths for a set of simulation results or valued resources
|
6290
|
+
# and filter.
|
6291
|
+
#
|
6292
|
+
# @overload list_attack_paths(request, options = nil)
|
6293
|
+
# Pass arguments to `list_attack_paths` via a request object, either of type
|
6294
|
+
# {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash.
|
6295
|
+
#
|
6296
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash]
|
6297
|
+
# A request object representing the call parameters. Required. To specify no
|
6298
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
6299
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
6300
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
6301
|
+
#
|
6302
|
+
# @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil)
|
6303
|
+
# Pass arguments to `list_attack_paths` via keyword arguments. Note that at
|
6304
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
6305
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
6306
|
+
#
|
6307
|
+
# @param parent [::String]
|
6308
|
+
# Required. Name of parent to list attack paths.
|
6309
|
+
#
|
6310
|
+
# Valid formats:
|
6311
|
+
# `organizations/{organization}`,
|
6312
|
+
# `organizations/{organization}/simulations/{simulation}`
|
6313
|
+
# `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
|
6314
|
+
# `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
|
6315
|
+
# @param filter [::String]
|
6316
|
+
# The filter expression that filters the attack path in the response.
|
6317
|
+
# Supported fields:
|
6318
|
+
#
|
6319
|
+
# * `valued_resources` supports =
|
6320
|
+
# @param page_token [::String]
|
6321
|
+
# The value returned by the last `ListAttackPathsResponse`; indicates
|
6322
|
+
# that this is a continuation of a prior `ListAttackPaths` call, and
|
6323
|
+
# that the system should return the next page of data.
|
6324
|
+
# @param page_size [::Integer]
|
6325
|
+
# The maximum number of results to return in a single response. Default is
|
6326
|
+
# 10, minimum is 1, maximum is 1000.
|
6327
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
6328
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>]
|
6329
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
6330
|
+
#
|
6331
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>]
|
6332
|
+
#
|
6333
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
6334
|
+
#
|
6335
|
+
# @example Basic example
|
6336
|
+
# require "google/cloud/security_center/v1"
|
6337
|
+
#
|
6338
|
+
# # Create a client object. The client can be reused for multiple calls.
|
6339
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
|
6340
|
+
#
|
6341
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
6342
|
+
# request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new
|
6343
|
+
#
|
6344
|
+
# # Call the list_attack_paths method.
|
6345
|
+
# result = client.list_attack_paths request
|
6346
|
+
#
|
6347
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
6348
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
6349
|
+
# result.each do |item|
|
6350
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath.
|
6351
|
+
# p item
|
6352
|
+
# end
|
6353
|
+
#
|
6354
|
+
def list_attack_paths request, options = nil
|
6355
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
6356
|
+
|
6357
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest
|
6358
|
+
|
6359
|
+
# Converts hash and nil to an options object
|
6360
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
6361
|
+
|
6362
|
+
# Customize the options with defaults
|
6363
|
+
call_metadata = @config.rpcs.list_attack_paths.metadata.to_h
|
6364
|
+
|
6365
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
6366
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
6367
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
6368
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
|
6369
|
+
transports_version_send: [:rest]
|
6370
|
+
|
6371
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
6372
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
6373
|
+
|
6374
|
+
options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout,
|
6375
|
+
metadata: call_metadata,
|
6376
|
+
retry_policy: @config.rpcs.list_attack_paths.retry_policy
|
6377
|
+
|
6378
|
+
options.apply_defaults timeout: @config.timeout,
|
6379
|
+
metadata: @config.metadata,
|
6380
|
+
retry_policy: @config.retry_policy
|
6381
|
+
|
6382
|
+
@security_center_stub.list_attack_paths request, options do |result, operation|
|
6383
|
+
result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options
|
6384
|
+
yield result, operation if block_given?
|
6385
|
+
return result
|
6386
|
+
end
|
6387
|
+
rescue ::Gapic::Rest::Error => e
|
6388
|
+
raise ::Google::Cloud::Error.from_error(e)
|
6389
|
+
end
|
6390
|
+
|
6391
|
+
##
|
6392
|
+
# Configuration class for the SecurityCenter REST API.
|
6393
|
+
#
|
6394
|
+
# This class represents the configuration for SecurityCenter REST,
|
6395
|
+
# providing control over timeouts, retry behavior, logging, transport
|
6396
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
6397
|
+
# applied individually to specific RPCs. See
|
6398
|
+
# {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration::Rpcs}
|
6399
|
+
# for a list of RPCs that can be configured independently.
|
6400
|
+
#
|
6401
|
+
# Configuration can be applied globally to all clients, or to a single client
|
6402
|
+
# on construction.
|
6403
|
+
#
|
6404
|
+
# @example
|
6405
|
+
#
|
6406
|
+
# # Modify the global config, setting the timeout for
|
6407
|
+
# # bulk_mute_findings to 20 seconds,
|
6408
|
+
# # and all remaining timeouts to 10 seconds.
|
6409
|
+
# ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config|
|
6410
|
+
# config.timeout = 10.0
|
6411
|
+
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
6412
|
+
# end
|
6413
|
+
#
|
6414
|
+
# # Apply the above configuration only to a new client.
|
6415
|
+
# client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config|
|
6416
|
+
# config.timeout = 10.0
|
6417
|
+
# config.rpcs.bulk_mute_findings.timeout = 20.0
|
6418
|
+
# end
|
6419
|
+
#
|
6420
|
+
# @!attribute [rw] endpoint
|
6421
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
6422
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
6423
|
+
# @return [::String,nil]
|
6424
|
+
# @!attribute [rw] credentials
|
6425
|
+
# Credentials to send with calls. You may provide any of the following types:
|
6426
|
+
# * (`String`) The path to a service account key file in JSON format
|
6427
|
+
# * (`Hash`) A service account key as a Hash
|
6428
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
6429
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
6430
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
6431
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
6432
|
+
# * (`nil`) indicating no credentials
|
6433
|
+
# @return [::Object]
|
6434
|
+
# @!attribute [rw] scope
|
6435
|
+
# The OAuth scopes
|
6436
|
+
# @return [::Array<::String>]
|
6437
|
+
# @!attribute [rw] lib_name
|
6438
|
+
# The library name as recorded in instrumentation and logging
|
6439
|
+
# @return [::String]
|
6440
|
+
# @!attribute [rw] lib_version
|
6441
|
+
# The library version as recorded in instrumentation and logging
|
6442
|
+
# @return [::String]
|
6443
|
+
# @!attribute [rw] timeout
|
6444
|
+
# The call timeout in seconds.
|
6445
|
+
# @return [::Numeric]
|
6446
|
+
# @!attribute [rw] metadata
|
6447
|
+
# Additional headers to be sent with the call.
|
6448
|
+
# @return [::Hash{::Symbol=>::String}]
|
6449
|
+
# @!attribute [rw] retry_policy
|
6450
|
+
# The retry policy. The value is a hash with the following keys:
|
6451
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
6452
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
6453
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
6454
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
6455
|
+
# trigger a retry.
|
6456
|
+
# @return [::Hash]
|
6457
|
+
# @!attribute [rw] quota_project
|
6458
|
+
# A separate project against which to charge quota.
|
6459
|
+
# @return [::String]
|
6460
|
+
# @!attribute [rw] universe_domain
|
6461
|
+
# The universe domain within which to make requests. This determines the
|
6462
|
+
# default endpoint URL. The default value of nil uses the environment
|
6463
|
+
# universe (usually the default "googleapis.com" universe).
|
6464
|
+
# @return [::String,nil]
|
6465
|
+
#
|
6466
|
+
class Configuration
|
6467
|
+
extend ::Gapic::Config
|
6468
|
+
|
6469
|
+
# @private
|
6470
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
6471
|
+
DEFAULT_ENDPOINT = "securitycenter.googleapis.com"
|
6472
|
+
|
6473
|
+
config_attr :endpoint, nil, ::String, nil
|
6474
|
+
config_attr :credentials, nil do |value|
|
6475
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
6476
|
+
allowed.any? { |klass| klass === value }
|
6477
|
+
end
|
6478
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
6479
|
+
config_attr :lib_name, nil, ::String, nil
|
6480
|
+
config_attr :lib_version, nil, ::String, nil
|
6481
|
+
config_attr :timeout, nil, ::Numeric, nil
|
6482
|
+
config_attr :metadata, nil, ::Hash, nil
|
6483
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
6484
|
+
config_attr :quota_project, nil, ::String, nil
|
6485
|
+
config_attr :universe_domain, nil, ::String, nil
|
6486
|
+
|
6487
|
+
# @private
|
6488
|
+
def initialize parent_config = nil
|
6489
|
+
@parent_config = parent_config unless parent_config.nil?
|
6490
|
+
|
6491
|
+
yield self if block_given?
|
6492
|
+
end
|
6493
|
+
|
6494
|
+
##
|
6495
|
+
# Configurations for individual RPCs
|
6496
|
+
# @return [Rpcs]
|
6497
|
+
#
|
6498
|
+
def rpcs
|
6499
|
+
@rpcs ||= begin
|
6500
|
+
parent_rpcs = nil
|
6501
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
6502
|
+
Rpcs.new parent_rpcs
|
6503
|
+
end
|
6504
|
+
end
|
4843
6505
|
|
4844
6506
|
##
|
4845
6507
|
# Configuration RPC class for the SecurityCenter API.
|
@@ -4905,6 +6567,16 @@ module Google
|
|
4905
6567
|
#
|
4906
6568
|
attr_reader :delete_security_health_analytics_custom_module
|
4907
6569
|
##
|
6570
|
+
# RPC-specific configuration for `get_simulation`
|
6571
|
+
# @return [::Gapic::Config::Method]
|
6572
|
+
#
|
6573
|
+
attr_reader :get_simulation
|
6574
|
+
##
|
6575
|
+
# RPC-specific configuration for `get_valued_resource`
|
6576
|
+
# @return [::Gapic::Config::Method]
|
6577
|
+
#
|
6578
|
+
attr_reader :get_valued_resource
|
6579
|
+
##
|
4908
6580
|
# RPC-specific configuration for `get_big_query_export`
|
4909
6581
|
# @return [::Gapic::Config::Method]
|
4910
6582
|
#
|
@@ -5084,6 +6756,86 @@ module Google
|
|
5084
6756
|
# @return [::Gapic::Config::Method]
|
5085
6757
|
#
|
5086
6758
|
attr_reader :list_big_query_exports
|
6759
|
+
##
|
6760
|
+
# RPC-specific configuration for `create_event_threat_detection_custom_module`
|
6761
|
+
# @return [::Gapic::Config::Method]
|
6762
|
+
#
|
6763
|
+
attr_reader :create_event_threat_detection_custom_module
|
6764
|
+
##
|
6765
|
+
# RPC-specific configuration for `delete_event_threat_detection_custom_module`
|
6766
|
+
# @return [::Gapic::Config::Method]
|
6767
|
+
#
|
6768
|
+
attr_reader :delete_event_threat_detection_custom_module
|
6769
|
+
##
|
6770
|
+
# RPC-specific configuration for `get_event_threat_detection_custom_module`
|
6771
|
+
# @return [::Gapic::Config::Method]
|
6772
|
+
#
|
6773
|
+
attr_reader :get_event_threat_detection_custom_module
|
6774
|
+
##
|
6775
|
+
# RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules`
|
6776
|
+
# @return [::Gapic::Config::Method]
|
6777
|
+
#
|
6778
|
+
attr_reader :list_descendant_event_threat_detection_custom_modules
|
6779
|
+
##
|
6780
|
+
# RPC-specific configuration for `list_event_threat_detection_custom_modules`
|
6781
|
+
# @return [::Gapic::Config::Method]
|
6782
|
+
#
|
6783
|
+
attr_reader :list_event_threat_detection_custom_modules
|
6784
|
+
##
|
6785
|
+
# RPC-specific configuration for `update_event_threat_detection_custom_module`
|
6786
|
+
# @return [::Gapic::Config::Method]
|
6787
|
+
#
|
6788
|
+
attr_reader :update_event_threat_detection_custom_module
|
6789
|
+
##
|
6790
|
+
# RPC-specific configuration for `validate_event_threat_detection_custom_module`
|
6791
|
+
# @return [::Gapic::Config::Method]
|
6792
|
+
#
|
6793
|
+
attr_reader :validate_event_threat_detection_custom_module
|
6794
|
+
##
|
6795
|
+
# RPC-specific configuration for `get_effective_event_threat_detection_custom_module`
|
6796
|
+
# @return [::Gapic::Config::Method]
|
6797
|
+
#
|
6798
|
+
attr_reader :get_effective_event_threat_detection_custom_module
|
6799
|
+
##
|
6800
|
+
# RPC-specific configuration for `list_effective_event_threat_detection_custom_modules`
|
6801
|
+
# @return [::Gapic::Config::Method]
|
6802
|
+
#
|
6803
|
+
attr_reader :list_effective_event_threat_detection_custom_modules
|
6804
|
+
##
|
6805
|
+
# RPC-specific configuration for `batch_create_resource_value_configs`
|
6806
|
+
# @return [::Gapic::Config::Method]
|
6807
|
+
#
|
6808
|
+
attr_reader :batch_create_resource_value_configs
|
6809
|
+
##
|
6810
|
+
# RPC-specific configuration for `delete_resource_value_config`
|
6811
|
+
# @return [::Gapic::Config::Method]
|
6812
|
+
#
|
6813
|
+
attr_reader :delete_resource_value_config
|
6814
|
+
##
|
6815
|
+
# RPC-specific configuration for `get_resource_value_config`
|
6816
|
+
# @return [::Gapic::Config::Method]
|
6817
|
+
#
|
6818
|
+
attr_reader :get_resource_value_config
|
6819
|
+
##
|
6820
|
+
# RPC-specific configuration for `list_resource_value_configs`
|
6821
|
+
# @return [::Gapic::Config::Method]
|
6822
|
+
#
|
6823
|
+
attr_reader :list_resource_value_configs
|
6824
|
+
##
|
6825
|
+
# RPC-specific configuration for `update_resource_value_config`
|
6826
|
+
# @return [::Gapic::Config::Method]
|
6827
|
+
#
|
6828
|
+
attr_reader :update_resource_value_config
|
6829
|
+
##
|
6830
|
+
# RPC-specific configuration for `list_valued_resources`
|
6831
|
+
# @return [::Gapic::Config::Method]
|
6832
|
+
#
|
6833
|
+
attr_reader :list_valued_resources
|
6834
|
+
##
|
6835
|
+
# RPC-specific configuration for `list_attack_paths`
|
6836
|
+
# @return [::Gapic::Config::Method]
|
6837
|
+
#
|
6838
|
+
attr_reader :list_attack_paths
|
5087
6839
|
|
5088
6840
|
# @private
|
5089
6841
|
def initialize parent_rpcs = nil
|
@@ -5105,6 +6857,10 @@ module Google
|
|
5105
6857
|
@delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
|
5106
6858
|
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
|
5107
6859
|
@delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config
|
6860
|
+
get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation
|
6861
|
+
@get_simulation = ::Gapic::Config::Method.new get_simulation_config
|
6862
|
+
get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource
|
6863
|
+
@get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config
|
5108
6864
|
get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
|
5109
6865
|
@get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
|
5110
6866
|
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
@@ -5177,6 +6933,38 @@ module Google
|
|
5177
6933
|
@update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
|
5178
6934
|
list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports
|
5179
6935
|
@list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config
|
6936
|
+
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
|
6937
|
+
@create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config
|
6938
|
+
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
|
6939
|
+
@delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config
|
6940
|
+
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
|
6941
|
+
@get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config
|
6942
|
+
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
|
6943
|
+
@list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config
|
6944
|
+
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
|
6945
|
+
@list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config
|
6946
|
+
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
|
6947
|
+
@update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config
|
6948
|
+
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
|
6949
|
+
@validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config
|
6950
|
+
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
|
6951
|
+
@get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config
|
6952
|
+
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
|
6953
|
+
@list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config
|
6954
|
+
batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs
|
6955
|
+
@batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config
|
6956
|
+
delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config
|
6957
|
+
@delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config
|
6958
|
+
get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config
|
6959
|
+
@get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config
|
6960
|
+
list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs
|
6961
|
+
@list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config
|
6962
|
+
update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config
|
6963
|
+
@update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config
|
6964
|
+
list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources
|
6965
|
+
@list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config
|
6966
|
+
list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths
|
6967
|
+
@list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config
|
5180
6968
|
|
5181
6969
|
yield self if block_given?
|
5182
6970
|
end
|