google-cloud-security_center-v1 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/security_center/v1/security_center/client.rb +530 -27
- data/lib/google/cloud/security_center/v1/security_center/paths.rb +52 -0
- data/lib/google/cloud/security_center/v1/version.rb +1 -1
- data/lib/google/cloud/security_center/v1.rb +2 -0
- data/lib/google/cloud/securitycenter/v1/access_pb.rb +31 -0
- data/lib/google/cloud/securitycenter/v1/asset_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb +32 -0
- data/lib/google/cloud/securitycenter/v1/external_system_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/finding_pb.rb +5 -1
- data/lib/google/cloud/securitycenter/v1/folder_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/indicator_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb +76 -0
- data/lib/google/cloud/securitycenter/v1/mute_config_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/notification_config_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/notification_message_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/resource_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/security_marks_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb +31 -0
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +14 -0
- data/lib/google/cloud/securitycenter/v1/source_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb +1 -1
- data/proto_docs/google/cloud/securitycenter/v1/access.rb +61 -0
- data/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb +92 -0
- data/proto_docs/google/cloud/securitycenter/v1/finding.rb +23 -9
- data/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb +194 -0
- data/proto_docs/google/cloud/securitycenter/v1/resource.rb +1 -1
- data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +124 -28
- data/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +3 -0
- metadata +9 -3
@@ -257,8 +257,8 @@ module Google
|
|
257
257
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
258
258
|
#
|
259
259
|
# @param parent [::String]
|
260
|
-
# Required. The parent, at which bulk action needs to be applied. Its format
|
261
|
-
# "organizations/[organization_id]", "folders/[folder_id]",
|
260
|
+
# Required. The parent, at which bulk action needs to be applied. Its format
|
261
|
+
# is "organizations/[organization_id]", "folders/[folder_id]",
|
262
262
|
# "projects/[project_id]".
|
263
263
|
# @param filter [::String]
|
264
264
|
# Expression that identifies findings that should be updated.
|
@@ -379,8 +379,8 @@ module Google
|
|
379
379
|
# Required. Resource name of the new source's parent. Its format should be
|
380
380
|
# "organizations/[organization_id]".
|
381
381
|
# @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash]
|
382
|
-
# Required. The Source being created, only the display_name and description
|
383
|
-
# used. All other fields will be ignored.
|
382
|
+
# Required. The Source being created, only the display_name and description
|
383
|
+
# will be used. All other fields will be ignored.
|
384
384
|
#
|
385
385
|
# @yield [response, operation] Access the result along with the RPC operation
|
386
386
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source]
|
@@ -473,8 +473,8 @@ module Google
|
|
473
473
|
# It must be alphanumeric and less than or equal to 32 characters and
|
474
474
|
# greater than 0 characters in length.
|
475
475
|
# @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
|
476
|
-
# Required. The Finding being created. The name and security_marks will be
|
477
|
-
# they are both output only fields on this resource.
|
476
|
+
# Required. The Finding being created. The name and security_marks will be
|
477
|
+
# ignored as they are both output only fields on this resource.
|
478
478
|
#
|
479
479
|
# @yield [response, operation] Access the result along with the RPC operation
|
480
480
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding]
|
@@ -653,16 +653,17 @@ module Google
|
|
653
653
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
654
654
|
#
|
655
655
|
# @param parent [::String]
|
656
|
-
# Required. Resource name of the new notification config's parent. Its format
|
657
|
-
# "organizations/[organization_id]".
|
656
|
+
# Required. Resource name of the new notification config's parent. Its format
|
657
|
+
# is "organizations/[organization_id]".
|
658
658
|
# @param config_id [::String]
|
659
659
|
# Required.
|
660
660
|
# Unique identifier provided by the client within the parent scope.
|
661
661
|
# It must be between 1 and 128 characters, and contains alphanumeric
|
662
662
|
# characters, underscores or hyphens only.
|
663
663
|
# @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash]
|
664
|
-
# Required. The notification config being created. The name and the service
|
665
|
-
# will be ignored as they are both output only fields on this
|
664
|
+
# Required. The notification config being created. The name and the service
|
665
|
+
# account will be ignored as they are both output only fields on this
|
666
|
+
# resource.
|
666
667
|
#
|
667
668
|
# @yield [response, operation] Access the result along with the RPC operation
|
668
669
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
|
@@ -902,6 +903,94 @@ module Google
|
|
902
903
|
raise ::Google::Cloud::Error.from_error(e)
|
903
904
|
end
|
904
905
|
|
906
|
+
##
|
907
|
+
# Gets a big query export.
|
908
|
+
#
|
909
|
+
# @overload get_big_query_export(request, options = nil)
|
910
|
+
# Pass arguments to `get_big_query_export` via a request object, either of type
|
911
|
+
# {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash.
|
912
|
+
#
|
913
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash]
|
914
|
+
# A request object representing the call parameters. Required. To specify no
|
915
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
916
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
917
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
918
|
+
#
|
919
|
+
# @overload get_big_query_export(name: nil)
|
920
|
+
# Pass arguments to `get_big_query_export` via keyword arguments. Note that at
|
921
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
922
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
923
|
+
#
|
924
|
+
# @param name [::String]
|
925
|
+
# Required. Name of the big query export to retrieve. Its format is
|
926
|
+
# organizations/\\{organization}/bigQueryExports/\\{export_id},
|
927
|
+
# folders/\\{folder}/bigQueryExports/\\{export_id}, or
|
928
|
+
# projects/\\{project}/bigQueryExports/\\{export_id}
|
929
|
+
#
|
930
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
931
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
932
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
933
|
+
#
|
934
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
935
|
+
#
|
936
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
937
|
+
#
|
938
|
+
# @example Basic example
|
939
|
+
# require "google/cloud/security_center/v1"
|
940
|
+
#
|
941
|
+
# # Create a client object. The client can be reused for multiple calls.
|
942
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
943
|
+
#
|
944
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
945
|
+
# request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new
|
946
|
+
#
|
947
|
+
# # Call the get_big_query_export method.
|
948
|
+
# result = client.get_big_query_export request
|
949
|
+
#
|
950
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
951
|
+
# p result
|
952
|
+
#
|
953
|
+
def get_big_query_export request, options = nil
|
954
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
955
|
+
|
956
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest
|
957
|
+
|
958
|
+
# Converts hash and nil to an options object
|
959
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
960
|
+
|
961
|
+
# Customize the options with defaults
|
962
|
+
metadata = @config.rpcs.get_big_query_export.metadata.to_h
|
963
|
+
|
964
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
965
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
966
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
967
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
968
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
969
|
+
|
970
|
+
header_params = {}
|
971
|
+
if request.name
|
972
|
+
header_params["name"] = request.name
|
973
|
+
end
|
974
|
+
|
975
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
976
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
977
|
+
|
978
|
+
options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout,
|
979
|
+
metadata: metadata,
|
980
|
+
retry_policy: @config.rpcs.get_big_query_export.retry_policy
|
981
|
+
|
982
|
+
options.apply_defaults timeout: @config.timeout,
|
983
|
+
metadata: @config.metadata,
|
984
|
+
retry_policy: @config.retry_policy
|
985
|
+
|
986
|
+
@security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation|
|
987
|
+
yield response, operation if block_given?
|
988
|
+
return response
|
989
|
+
end
|
990
|
+
rescue ::GRPC::BadStatus => e
|
991
|
+
raise ::Google::Cloud::Error.from_error(e)
|
992
|
+
end
|
993
|
+
|
905
994
|
##
|
906
995
|
# Gets the access control policy on the specified Source.
|
907
996
|
#
|
@@ -1184,8 +1273,8 @@ module Google
|
|
1184
1273
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1185
1274
|
#
|
1186
1275
|
# @param name [::String]
|
1187
|
-
# Required. Name of the organization to get organization settings for. Its
|
1188
|
-
# "organizations/[organization_id]/organizationSettings".
|
1276
|
+
# Required. Name of the organization to get organization settings for. Its
|
1277
|
+
# format is "organizations/[organization_id]/organizationSettings".
|
1189
1278
|
#
|
1190
1279
|
# @yield [response, operation] Access the result along with the RPC operation
|
1191
1280
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
|
@@ -1424,9 +1513,9 @@ module Google
|
|
1424
1513
|
# Use a negated partial match on the empty string to filter based on a
|
1425
1514
|
# property not existing: `-resource_properties.my_property : ""`
|
1426
1515
|
# @param group_by [::String]
|
1427
|
-
# Required. Expression that defines what assets fields to use for grouping.
|
1428
|
-
# value should follow SQL syntax: comma separated list of fields.
|
1429
|
-
# example:
|
1516
|
+
# Required. Expression that defines what assets fields to use for grouping.
|
1517
|
+
# The string value should follow SQL syntax: comma separated list of fields.
|
1518
|
+
# For example:
|
1430
1519
|
# "security_center_properties.resource_project,security_center_properties.project".
|
1431
1520
|
#
|
1432
1521
|
# The following fields are supported when compare_duration is not set:
|
@@ -1647,9 +1736,9 @@ module Google
|
|
1647
1736
|
# * resource.project_display_name: `=`, `:`
|
1648
1737
|
# * resource.type: `=`, `:`
|
1649
1738
|
# @param group_by [::String]
|
1650
|
-
# Required. Expression that defines what assets fields to use for grouping
|
1651
|
-
# `state_change`). The string value should follow SQL syntax:
|
1652
|
-
# list of fields. For example: "parent,resource_name".
|
1739
|
+
# Required. Expression that defines what assets fields to use for grouping
|
1740
|
+
# (including `state_change`). The string value should follow SQL syntax:
|
1741
|
+
# comma separated list of fields. For example: "parent,resource_name".
|
1653
1742
|
#
|
1654
1743
|
# The following fields are supported:
|
1655
1744
|
#
|
@@ -2246,8 +2335,8 @@ module Google
|
|
2246
2335
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2247
2336
|
#
|
2248
2337
|
# @param parent [::String]
|
2249
|
-
# Required. The parent, which owns the collection of mute configs. Its format
|
2250
|
-
# "organizations/[organization_id]", "folders/[folder_id]",
|
2338
|
+
# Required. The parent, which owns the collection of mute configs. Its format
|
2339
|
+
# is "organizations/[organization_id]", "folders/[folder_id]",
|
2251
2340
|
# "projects/[project_id]".
|
2252
2341
|
# @param page_size [::Integer]
|
2253
2342
|
# The maximum number of configs to return. The service may return fewer than
|
@@ -2451,8 +2540,8 @@ module Google
|
|
2451
2540
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2452
2541
|
#
|
2453
2542
|
# @param parent [::String]
|
2454
|
-
# Required. Resource name of the parent of sources to list. Its format should
|
2455
|
-
# "organizations/[organization_id], folders/[folder_id], or
|
2543
|
+
# Required. Resource name of the parent of sources to list. Its format should
|
2544
|
+
# be "organizations/[organization_id], folders/[folder_id], or
|
2456
2545
|
# projects/[project_id]".
|
2457
2546
|
# @param page_token [::String]
|
2458
2547
|
# The value returned by the last `ListSourcesResponse`; indicates
|
@@ -2557,8 +2646,8 @@ module Google
|
|
2557
2646
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2558
2647
|
#
|
2559
2648
|
# @param parent [::String]
|
2560
|
-
# Required. Name of the organization to run asset discovery for. Its format
|
2561
|
-
# "organizations/[organization_id]".
|
2649
|
+
# Required. Name of the organization to run asset discovery for. Its format
|
2650
|
+
# is "organizations/[organization_id]".
|
2562
2651
|
#
|
2563
2652
|
# @yield [response, operation] Access the result along with the RPC operation
|
2564
2653
|
# @yieldparam response [::Gapic::Operation]
|
@@ -3107,8 +3196,8 @@ module Google
|
|
3107
3196
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3108
3197
|
#
|
3109
3198
|
# @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
|
3110
|
-
# Required. The finding resource to update or create if it does not already
|
3111
|
-
# parent, security_marks, and update_time will be ignored.
|
3199
|
+
# Required. The finding resource to update or create if it does not already
|
3200
|
+
# exist. parent, security_marks, and update_time will be ignored.
|
3112
3201
|
#
|
3113
3202
|
# In the case of creation, the finding id portion of the name must be
|
3114
3203
|
# alphanumeric and less than or equal to 32 characters and greater than 0
|
@@ -3571,7 +3660,8 @@ module Google
|
|
3571
3660
|
# @param start_time [::Google::Protobuf::Timestamp, ::Hash]
|
3572
3661
|
# The time at which the updated SecurityMarks take effect.
|
3573
3662
|
# If not set uses current server time. Updates will be applied to the
|
3574
|
-
# SecurityMarks that are active immediately preceding this time.
|
3663
|
+
# SecurityMarks that are active immediately preceding this time. Must be
|
3664
|
+
# smaller or equal to the server time.
|
3575
3665
|
#
|
3576
3666
|
# @yield [response, operation] Access the result along with the RPC operation
|
3577
3667
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
|
@@ -3637,6 +3727,384 @@ module Google
|
|
3637
3727
|
raise ::Google::Cloud::Error.from_error(e)
|
3638
3728
|
end
|
3639
3729
|
|
3730
|
+
##
|
3731
|
+
# Creates a big query export.
|
3732
|
+
#
|
3733
|
+
# @overload create_big_query_export(request, options = nil)
|
3734
|
+
# Pass arguments to `create_big_query_export` via a request object, either of type
|
3735
|
+
# {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash.
|
3736
|
+
#
|
3737
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash]
|
3738
|
+
# A request object representing the call parameters. Required. To specify no
|
3739
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3740
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3741
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3742
|
+
#
|
3743
|
+
# @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil)
|
3744
|
+
# Pass arguments to `create_big_query_export` via keyword arguments. Note that at
|
3745
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3746
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3747
|
+
#
|
3748
|
+
# @param parent [::String]
|
3749
|
+
# Required. Resource name of the new big query export's parent. Its format is
|
3750
|
+
# "organizations/[organization_id]", "folders/[folder_id]", or
|
3751
|
+
# "projects/[project_id]".
|
3752
|
+
# @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
|
3753
|
+
# Required. The big query export being created.
|
3754
|
+
# @param big_query_export_id [::String]
|
3755
|
+
# Required. Unique identifier provided by the client within the parent scope.
|
3756
|
+
# It must consist of lower case letters, numbers, and hyphen, with the first
|
3757
|
+
# character a letter, the last a letter or a number, and a 63 character
|
3758
|
+
# maximum.
|
3759
|
+
#
|
3760
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3761
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3762
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3763
|
+
#
|
3764
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3765
|
+
#
|
3766
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3767
|
+
#
|
3768
|
+
# @example Basic example
|
3769
|
+
# require "google/cloud/security_center/v1"
|
3770
|
+
#
|
3771
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3772
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3773
|
+
#
|
3774
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3775
|
+
# request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new
|
3776
|
+
#
|
3777
|
+
# # Call the create_big_query_export method.
|
3778
|
+
# result = client.create_big_query_export request
|
3779
|
+
#
|
3780
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
3781
|
+
# p result
|
3782
|
+
#
|
3783
|
+
def create_big_query_export request, options = nil
|
3784
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3785
|
+
|
3786
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest
|
3787
|
+
|
3788
|
+
# Converts hash and nil to an options object
|
3789
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3790
|
+
|
3791
|
+
# Customize the options with defaults
|
3792
|
+
metadata = @config.rpcs.create_big_query_export.metadata.to_h
|
3793
|
+
|
3794
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3795
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3796
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3797
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3798
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3799
|
+
|
3800
|
+
header_params = {}
|
3801
|
+
if request.parent
|
3802
|
+
header_params["parent"] = request.parent
|
3803
|
+
end
|
3804
|
+
|
3805
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3806
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3807
|
+
|
3808
|
+
options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout,
|
3809
|
+
metadata: metadata,
|
3810
|
+
retry_policy: @config.rpcs.create_big_query_export.retry_policy
|
3811
|
+
|
3812
|
+
options.apply_defaults timeout: @config.timeout,
|
3813
|
+
metadata: @config.metadata,
|
3814
|
+
retry_policy: @config.retry_policy
|
3815
|
+
|
3816
|
+
@security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation|
|
3817
|
+
yield response, operation if block_given?
|
3818
|
+
return response
|
3819
|
+
end
|
3820
|
+
rescue ::GRPC::BadStatus => e
|
3821
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3822
|
+
end
|
3823
|
+
|
3824
|
+
##
|
3825
|
+
# Deletes an existing big query export.
|
3826
|
+
#
|
3827
|
+
# @overload delete_big_query_export(request, options = nil)
|
3828
|
+
# Pass arguments to `delete_big_query_export` via a request object, either of type
|
3829
|
+
# {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash.
|
3830
|
+
#
|
3831
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash]
|
3832
|
+
# A request object representing the call parameters. Required. To specify no
|
3833
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3834
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3835
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3836
|
+
#
|
3837
|
+
# @overload delete_big_query_export(name: nil)
|
3838
|
+
# Pass arguments to `delete_big_query_export` via keyword arguments. Note that at
|
3839
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3840
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3841
|
+
#
|
3842
|
+
# @param name [::String]
|
3843
|
+
# Required. Name of the big query export to delete. Its format is
|
3844
|
+
# organizations/\\{organization}/bigQueryExports/\\{export_id},
|
3845
|
+
# folders/\\{folder}/bigQueryExports/\\{export_id}, or
|
3846
|
+
# projects/\\{project}/bigQueryExports/\\{export_id}
|
3847
|
+
#
|
3848
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3849
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
3850
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3851
|
+
#
|
3852
|
+
# @return [::Google::Protobuf::Empty]
|
3853
|
+
#
|
3854
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3855
|
+
#
|
3856
|
+
# @example Basic example
|
3857
|
+
# require "google/cloud/security_center/v1"
|
3858
|
+
#
|
3859
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3860
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3861
|
+
#
|
3862
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3863
|
+
# request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new
|
3864
|
+
#
|
3865
|
+
# # Call the delete_big_query_export method.
|
3866
|
+
# result = client.delete_big_query_export request
|
3867
|
+
#
|
3868
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3869
|
+
# p result
|
3870
|
+
#
|
3871
|
+
def delete_big_query_export request, options = nil
|
3872
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3873
|
+
|
3874
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest
|
3875
|
+
|
3876
|
+
# Converts hash and nil to an options object
|
3877
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3878
|
+
|
3879
|
+
# Customize the options with defaults
|
3880
|
+
metadata = @config.rpcs.delete_big_query_export.metadata.to_h
|
3881
|
+
|
3882
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3883
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3884
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3885
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3886
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3887
|
+
|
3888
|
+
header_params = {}
|
3889
|
+
if request.name
|
3890
|
+
header_params["name"] = request.name
|
3891
|
+
end
|
3892
|
+
|
3893
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3894
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3895
|
+
|
3896
|
+
options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout,
|
3897
|
+
metadata: metadata,
|
3898
|
+
retry_policy: @config.rpcs.delete_big_query_export.retry_policy
|
3899
|
+
|
3900
|
+
options.apply_defaults timeout: @config.timeout,
|
3901
|
+
metadata: @config.metadata,
|
3902
|
+
retry_policy: @config.retry_policy
|
3903
|
+
|
3904
|
+
@security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation|
|
3905
|
+
yield response, operation if block_given?
|
3906
|
+
return response
|
3907
|
+
end
|
3908
|
+
rescue ::GRPC::BadStatus => e
|
3909
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3910
|
+
end
|
3911
|
+
|
3912
|
+
##
|
3913
|
+
# Updates a BigQuery export.
|
3914
|
+
#
|
3915
|
+
# @overload update_big_query_export(request, options = nil)
|
3916
|
+
# Pass arguments to `update_big_query_export` via a request object, either of type
|
3917
|
+
# {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash.
|
3918
|
+
#
|
3919
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash]
|
3920
|
+
# A request object representing the call parameters. Required. To specify no
|
3921
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3922
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3923
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3924
|
+
#
|
3925
|
+
# @overload update_big_query_export(big_query_export: nil, update_mask: nil)
|
3926
|
+
# Pass arguments to `update_big_query_export` via keyword arguments. Note that at
|
3927
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3928
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3929
|
+
#
|
3930
|
+
# @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
|
3931
|
+
# Required. The BigQuery export being updated.
|
3932
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3933
|
+
# The list of fields to be updated.
|
3934
|
+
# If empty all mutable fields will be updated.
|
3935
|
+
#
|
3936
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3937
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3938
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3939
|
+
#
|
3940
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3941
|
+
#
|
3942
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3943
|
+
#
|
3944
|
+
# @example Basic example
|
3945
|
+
# require "google/cloud/security_center/v1"
|
3946
|
+
#
|
3947
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3948
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3949
|
+
#
|
3950
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3951
|
+
# request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new
|
3952
|
+
#
|
3953
|
+
# # Call the update_big_query_export method.
|
3954
|
+
# result = client.update_big_query_export request
|
3955
|
+
#
|
3956
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
3957
|
+
# p result
|
3958
|
+
#
|
3959
|
+
def update_big_query_export request, options = nil
|
3960
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3961
|
+
|
3962
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest
|
3963
|
+
|
3964
|
+
# Converts hash and nil to an options object
|
3965
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3966
|
+
|
3967
|
+
# Customize the options with defaults
|
3968
|
+
metadata = @config.rpcs.update_big_query_export.metadata.to_h
|
3969
|
+
|
3970
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3971
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3972
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3973
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3974
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3975
|
+
|
3976
|
+
header_params = {}
|
3977
|
+
if request.big_query_export&.name
|
3978
|
+
header_params["big_query_export.name"] = request.big_query_export.name
|
3979
|
+
end
|
3980
|
+
|
3981
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3982
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3983
|
+
|
3984
|
+
options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout,
|
3985
|
+
metadata: metadata,
|
3986
|
+
retry_policy: @config.rpcs.update_big_query_export.retry_policy
|
3987
|
+
|
3988
|
+
options.apply_defaults timeout: @config.timeout,
|
3989
|
+
metadata: @config.metadata,
|
3990
|
+
retry_policy: @config.retry_policy
|
3991
|
+
|
3992
|
+
@security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation|
|
3993
|
+
yield response, operation if block_given?
|
3994
|
+
return response
|
3995
|
+
end
|
3996
|
+
rescue ::GRPC::BadStatus => e
|
3997
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3998
|
+
end
|
3999
|
+
|
4000
|
+
##
|
4001
|
+
# Lists BigQuery exports. Note that when requesting BigQuery exports at a
|
4002
|
+
# given level all exports under that level are also returned e.g. if
|
4003
|
+
# requesting BigQuery exports under a folder, then all BigQuery exports
|
4004
|
+
# immediately under the folder plus the ones created under the projects
|
4005
|
+
# within the folder are returned.
|
4006
|
+
#
|
4007
|
+
# @overload list_big_query_exports(request, options = nil)
|
4008
|
+
# Pass arguments to `list_big_query_exports` via a request object, either of type
|
4009
|
+
# {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash.
|
4010
|
+
#
|
4011
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash]
|
4012
|
+
# A request object representing the call parameters. Required. To specify no
|
4013
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4014
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4015
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4016
|
+
#
|
4017
|
+
# @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil)
|
4018
|
+
# Pass arguments to `list_big_query_exports` via keyword arguments. Note that at
|
4019
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4020
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4021
|
+
#
|
4022
|
+
# @param parent [::String]
|
4023
|
+
# Required. The parent, which owns the collection of BigQuery exports. Its
|
4024
|
+
# format is "organizations/[organization_id]", "folders/[folder_id]",
|
4025
|
+
# "projects/[project_id]".
|
4026
|
+
# @param page_size [::Integer]
|
4027
|
+
# The maximum number of configs to return. The service may return fewer than
|
4028
|
+
# this value.
|
4029
|
+
# If unspecified, at most 10 configs will be returned.
|
4030
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
4031
|
+
# @param page_token [::String]
|
4032
|
+
# A page token, received from a previous `ListBigQueryExports` call.
|
4033
|
+
# Provide this to retrieve the subsequent page.
|
4034
|
+
# When paginating, all other parameters provided to `ListBigQueryExports`
|
4035
|
+
# must match the call that provided the page token.
|
4036
|
+
#
|
4037
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4038
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
|
4039
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4040
|
+
#
|
4041
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
|
4042
|
+
#
|
4043
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4044
|
+
#
|
4045
|
+
# @example Basic example
|
4046
|
+
# require "google/cloud/security_center/v1"
|
4047
|
+
#
|
4048
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4049
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
4050
|
+
#
|
4051
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4052
|
+
# request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new
|
4053
|
+
#
|
4054
|
+
# # Call the list_big_query_exports method.
|
4055
|
+
# result = client.list_big_query_exports request
|
4056
|
+
#
|
4057
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4058
|
+
# # iterate over all elements by calling #each, and the enumerable
|
4059
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
4060
|
+
# # methods are also available for managing paging directly.
|
4061
|
+
# result.each do |response|
|
4062
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
4063
|
+
# p response
|
4064
|
+
# end
|
4065
|
+
#
|
4066
|
+
def list_big_query_exports request, options = nil
|
4067
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4068
|
+
|
4069
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest
|
4070
|
+
|
4071
|
+
# Converts hash and nil to an options object
|
4072
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4073
|
+
|
4074
|
+
# Customize the options with defaults
|
4075
|
+
metadata = @config.rpcs.list_big_query_exports.metadata.to_h
|
4076
|
+
|
4077
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4078
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4079
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4080
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
4081
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4082
|
+
|
4083
|
+
header_params = {}
|
4084
|
+
if request.parent
|
4085
|
+
header_params["parent"] = request.parent
|
4086
|
+
end
|
4087
|
+
|
4088
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4089
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4090
|
+
|
4091
|
+
options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout,
|
4092
|
+
metadata: metadata,
|
4093
|
+
retry_policy: @config.rpcs.list_big_query_exports.retry_policy
|
4094
|
+
|
4095
|
+
options.apply_defaults timeout: @config.timeout,
|
4096
|
+
metadata: @config.metadata,
|
4097
|
+
retry_policy: @config.retry_policy
|
4098
|
+
|
4099
|
+
@security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation|
|
4100
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options
|
4101
|
+
yield response, operation if block_given?
|
4102
|
+
return response
|
4103
|
+
end
|
4104
|
+
rescue ::GRPC::BadStatus => e
|
4105
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4106
|
+
end
|
4107
|
+
|
3640
4108
|
##
|
3641
4109
|
# Configuration class for the SecurityCenter API.
|
3642
4110
|
#
|
@@ -3808,6 +4276,11 @@ module Google
|
|
3808
4276
|
#
|
3809
4277
|
attr_reader :delete_notification_config
|
3810
4278
|
##
|
4279
|
+
# RPC-specific configuration for `get_big_query_export`
|
4280
|
+
# @return [::Gapic::Config::Method]
|
4281
|
+
#
|
4282
|
+
attr_reader :get_big_query_export
|
4283
|
+
##
|
3811
4284
|
# RPC-specific configuration for `get_iam_policy`
|
3812
4285
|
# @return [::Gapic::Config::Method]
|
3813
4286
|
#
|
@@ -3927,6 +4400,26 @@ module Google
|
|
3927
4400
|
# @return [::Gapic::Config::Method]
|
3928
4401
|
#
|
3929
4402
|
attr_reader :update_security_marks
|
4403
|
+
##
|
4404
|
+
# RPC-specific configuration for `create_big_query_export`
|
4405
|
+
# @return [::Gapic::Config::Method]
|
4406
|
+
#
|
4407
|
+
attr_reader :create_big_query_export
|
4408
|
+
##
|
4409
|
+
# RPC-specific configuration for `delete_big_query_export`
|
4410
|
+
# @return [::Gapic::Config::Method]
|
4411
|
+
#
|
4412
|
+
attr_reader :delete_big_query_export
|
4413
|
+
##
|
4414
|
+
# RPC-specific configuration for `update_big_query_export`
|
4415
|
+
# @return [::Gapic::Config::Method]
|
4416
|
+
#
|
4417
|
+
attr_reader :update_big_query_export
|
4418
|
+
##
|
4419
|
+
# RPC-specific configuration for `list_big_query_exports`
|
4420
|
+
# @return [::Gapic::Config::Method]
|
4421
|
+
#
|
4422
|
+
attr_reader :list_big_query_exports
|
3930
4423
|
|
3931
4424
|
# @private
|
3932
4425
|
def initialize parent_rpcs = nil
|
@@ -3944,6 +4437,8 @@ module Google
|
|
3944
4437
|
@delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
|
3945
4438
|
delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
|
3946
4439
|
@delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
|
4440
|
+
get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
|
4441
|
+
@get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
|
3947
4442
|
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
3948
4443
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
3949
4444
|
get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config
|
@@ -3992,6 +4487,14 @@ module Google
|
|
3992
4487
|
@update_source = ::Gapic::Config::Method.new update_source_config
|
3993
4488
|
update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks
|
3994
4489
|
@update_security_marks = ::Gapic::Config::Method.new update_security_marks_config
|
4490
|
+
create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export
|
4491
|
+
@create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config
|
4492
|
+
delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export
|
4493
|
+
@delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config
|
4494
|
+
update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export
|
4495
|
+
@update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
|
4496
|
+
list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports
|
4497
|
+
@list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config
|
3995
4498
|
|
3996
4499
|
yield self if block_given?
|
3997
4500
|
end
|