google-cloud-security_center-v1 0.12.1 → 0.15.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/lib/google/cloud/security_center/v1/security_center/client.rb +510 -3
- 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 +0 -1
- 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/connection_pb.rb +35 -0
- data/lib/google/cloud/securitycenter/v1/external_system_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/finding_pb.rb +9 -1
- data/lib/google/cloud/securitycenter/v1/folder_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb +30 -0
- data/lib/google/cloud/securitycenter/v1/indicator_pb.rb +0 -1
- data/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb +78 -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 +2 -3
- 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 +34 -3
- 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/bigquery_export.rb +92 -0
- data/proto_docs/google/cloud/securitycenter/v1/connection.rb +70 -0
- data/proto_docs/google/cloud/securitycenter/v1/external_system.rb +2 -1
- data/proto_docs/google/cloud/securitycenter/v1/finding.rb +21 -2
- data/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb +56 -0
- data/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb +201 -0
- data/proto_docs/google/cloud/securitycenter/v1/resource.rb +7 -7
- data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +102 -8
- data/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +3 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +8 -1
- data/proto_docs/google/iam/v1/options.rb +14 -4
- data/proto_docs/google/iam/v1/policy.rb +208 -38
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e076d4ef7cbe91cbc324dcaac83a995972beea85684c518ac3668a447df1c8a
|
4
|
+
data.tar.gz: d16d7825935dce6d4ec720d16331465f5d0d6e81e44a180402c9f6d4c58a0985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d21ed604c50aea3a14d0a48228189c03757043ec36e16092875c327e9755dffcec94481bbc3cc257b3f9164538e643e4775d6ee73d7e0e072861a6dbed9213a
|
7
|
+
data.tar.gz: f5ab76e336bd03be585a10e49e479d2adc37d4c176c689b5547dcd6adfe12ecf4430d9d4e7043e03a2edfb8204ee45841394c43a92e7915218b8529da06c3dc6
|
@@ -902,6 +902,94 @@ module Google
|
|
902
902
|
raise ::Google::Cloud::Error.from_error(e)
|
903
903
|
end
|
904
904
|
|
905
|
+
##
|
906
|
+
# Gets a big query export.
|
907
|
+
#
|
908
|
+
# @overload get_big_query_export(request, options = nil)
|
909
|
+
# Pass arguments to `get_big_query_export` via a request object, either of type
|
910
|
+
# {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash.
|
911
|
+
#
|
912
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash]
|
913
|
+
# A request object representing the call parameters. Required. To specify no
|
914
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
915
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
916
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
917
|
+
#
|
918
|
+
# @overload get_big_query_export(name: nil)
|
919
|
+
# Pass arguments to `get_big_query_export` via keyword arguments. Note that at
|
920
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
921
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
922
|
+
#
|
923
|
+
# @param name [::String]
|
924
|
+
# Required. Name of the big query export to retrieve. Its format is
|
925
|
+
# organizations/\\{organization}/bigQueryExports/\\{export_id},
|
926
|
+
# folders/\\{folder}/bigQueryExports/\\{export_id}, or
|
927
|
+
# projects/\\{project}/bigQueryExports/\\{export_id}
|
928
|
+
#
|
929
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
930
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
931
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
932
|
+
#
|
933
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
934
|
+
#
|
935
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
936
|
+
#
|
937
|
+
# @example Basic example
|
938
|
+
# require "google/cloud/security_center/v1"
|
939
|
+
#
|
940
|
+
# # Create a client object. The client can be reused for multiple calls.
|
941
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
942
|
+
#
|
943
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
944
|
+
# request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new
|
945
|
+
#
|
946
|
+
# # Call the get_big_query_export method.
|
947
|
+
# result = client.get_big_query_export request
|
948
|
+
#
|
949
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
950
|
+
# p result
|
951
|
+
#
|
952
|
+
def get_big_query_export request, options = nil
|
953
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
954
|
+
|
955
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest
|
956
|
+
|
957
|
+
# Converts hash and nil to an options object
|
958
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
959
|
+
|
960
|
+
# Customize the options with defaults
|
961
|
+
metadata = @config.rpcs.get_big_query_export.metadata.to_h
|
962
|
+
|
963
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
964
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
965
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
966
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
967
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
968
|
+
|
969
|
+
header_params = {}
|
970
|
+
if request.name
|
971
|
+
header_params["name"] = request.name
|
972
|
+
end
|
973
|
+
|
974
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
975
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
976
|
+
|
977
|
+
options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout,
|
978
|
+
metadata: metadata,
|
979
|
+
retry_policy: @config.rpcs.get_big_query_export.retry_policy
|
980
|
+
|
981
|
+
options.apply_defaults timeout: @config.timeout,
|
982
|
+
metadata: @config.metadata,
|
983
|
+
retry_policy: @config.retry_policy
|
984
|
+
|
985
|
+
@security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation|
|
986
|
+
yield response, operation if block_given?
|
987
|
+
return response
|
988
|
+
end
|
989
|
+
rescue ::GRPC::BadStatus => e
|
990
|
+
raise ::Google::Cloud::Error.from_error(e)
|
991
|
+
end
|
992
|
+
|
905
993
|
##
|
906
994
|
# Gets the access control policy on the specified Source.
|
907
995
|
#
|
@@ -925,7 +1013,7 @@ module Google
|
|
925
1013
|
# See the operation documentation for the appropriate value for this field.
|
926
1014
|
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
927
1015
|
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
928
|
-
# `GetIamPolicy`.
|
1016
|
+
# `GetIamPolicy`.
|
929
1017
|
#
|
930
1018
|
# @yield [response, operation] Access the result along with the RPC operation
|
931
1019
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -2829,7 +2917,7 @@ module Google
|
|
2829
2917
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2830
2918
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2831
2919
|
#
|
2832
|
-
# @overload set_iam_policy(resource: nil, policy: nil)
|
2920
|
+
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
2833
2921
|
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
2834
2922
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2835
2923
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2842,6 +2930,12 @@ module Google
|
|
2842
2930
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
2843
2931
|
# valid policy but certain Cloud Platform services (such as Projects)
|
2844
2932
|
# might reject them.
|
2933
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2934
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
2935
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
2936
|
+
# following default mask is used:
|
2937
|
+
#
|
2938
|
+
# `paths: "bindings, etag"`
|
2845
2939
|
#
|
2846
2940
|
# @yield [response, operation] Access the result along with the RPC operation
|
2847
2941
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -3572,7 +3666,7 @@ module Google
|
|
3572
3666
|
# The time at which the updated SecurityMarks take effect.
|
3573
3667
|
# If not set uses current server time. Updates will be applied to the
|
3574
3668
|
# SecurityMarks that are active immediately preceding this time. Must be
|
3575
|
-
#
|
3669
|
+
# earlier or equal to the server time.
|
3576
3670
|
#
|
3577
3671
|
# @yield [response, operation] Access the result along with the RPC operation
|
3578
3672
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
|
@@ -3638,6 +3732,384 @@ module Google
|
|
3638
3732
|
raise ::Google::Cloud::Error.from_error(e)
|
3639
3733
|
end
|
3640
3734
|
|
3735
|
+
##
|
3736
|
+
# Creates a big query export.
|
3737
|
+
#
|
3738
|
+
# @overload create_big_query_export(request, options = nil)
|
3739
|
+
# Pass arguments to `create_big_query_export` via a request object, either of type
|
3740
|
+
# {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash.
|
3741
|
+
#
|
3742
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash]
|
3743
|
+
# A request object representing the call parameters. Required. To specify no
|
3744
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3745
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3746
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3747
|
+
#
|
3748
|
+
# @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil)
|
3749
|
+
# Pass arguments to `create_big_query_export` via keyword arguments. Note that at
|
3750
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3751
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3752
|
+
#
|
3753
|
+
# @param parent [::String]
|
3754
|
+
# Required. Resource name of the new big query export's parent. Its format is
|
3755
|
+
# "organizations/[organization_id]", "folders/[folder_id]", or
|
3756
|
+
# "projects/[project_id]".
|
3757
|
+
# @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
|
3758
|
+
# Required. The big query export being created.
|
3759
|
+
# @param big_query_export_id [::String]
|
3760
|
+
# Required. Unique identifier provided by the client within the parent scope.
|
3761
|
+
# It must consist of lower case letters, numbers, and hyphen, with the first
|
3762
|
+
# character a letter, the last a letter or a number, and a 63 character
|
3763
|
+
# maximum.
|
3764
|
+
#
|
3765
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3766
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3767
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3768
|
+
#
|
3769
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3770
|
+
#
|
3771
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3772
|
+
#
|
3773
|
+
# @example Basic example
|
3774
|
+
# require "google/cloud/security_center/v1"
|
3775
|
+
#
|
3776
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3777
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3778
|
+
#
|
3779
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3780
|
+
# request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new
|
3781
|
+
#
|
3782
|
+
# # Call the create_big_query_export method.
|
3783
|
+
# result = client.create_big_query_export request
|
3784
|
+
#
|
3785
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
3786
|
+
# p result
|
3787
|
+
#
|
3788
|
+
def create_big_query_export request, options = nil
|
3789
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3790
|
+
|
3791
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest
|
3792
|
+
|
3793
|
+
# Converts hash and nil to an options object
|
3794
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3795
|
+
|
3796
|
+
# Customize the options with defaults
|
3797
|
+
metadata = @config.rpcs.create_big_query_export.metadata.to_h
|
3798
|
+
|
3799
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3800
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3801
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3802
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3803
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3804
|
+
|
3805
|
+
header_params = {}
|
3806
|
+
if request.parent
|
3807
|
+
header_params["parent"] = request.parent
|
3808
|
+
end
|
3809
|
+
|
3810
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3811
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3812
|
+
|
3813
|
+
options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout,
|
3814
|
+
metadata: metadata,
|
3815
|
+
retry_policy: @config.rpcs.create_big_query_export.retry_policy
|
3816
|
+
|
3817
|
+
options.apply_defaults timeout: @config.timeout,
|
3818
|
+
metadata: @config.metadata,
|
3819
|
+
retry_policy: @config.retry_policy
|
3820
|
+
|
3821
|
+
@security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation|
|
3822
|
+
yield response, operation if block_given?
|
3823
|
+
return response
|
3824
|
+
end
|
3825
|
+
rescue ::GRPC::BadStatus => e
|
3826
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3827
|
+
end
|
3828
|
+
|
3829
|
+
##
|
3830
|
+
# Deletes an existing big query export.
|
3831
|
+
#
|
3832
|
+
# @overload delete_big_query_export(request, options = nil)
|
3833
|
+
# Pass arguments to `delete_big_query_export` via a request object, either of type
|
3834
|
+
# {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash.
|
3835
|
+
#
|
3836
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash]
|
3837
|
+
# A request object representing the call parameters. Required. To specify no
|
3838
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3839
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3840
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3841
|
+
#
|
3842
|
+
# @overload delete_big_query_export(name: nil)
|
3843
|
+
# Pass arguments to `delete_big_query_export` via keyword arguments. Note that at
|
3844
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3845
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3846
|
+
#
|
3847
|
+
# @param name [::String]
|
3848
|
+
# Required. Name of the big query export to delete. Its format is
|
3849
|
+
# organizations/\\{organization}/bigQueryExports/\\{export_id},
|
3850
|
+
# folders/\\{folder}/bigQueryExports/\\{export_id}, or
|
3851
|
+
# projects/\\{project}/bigQueryExports/\\{export_id}
|
3852
|
+
#
|
3853
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3854
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
3855
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3856
|
+
#
|
3857
|
+
# @return [::Google::Protobuf::Empty]
|
3858
|
+
#
|
3859
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3860
|
+
#
|
3861
|
+
# @example Basic example
|
3862
|
+
# require "google/cloud/security_center/v1"
|
3863
|
+
#
|
3864
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3865
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3866
|
+
#
|
3867
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3868
|
+
# request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new
|
3869
|
+
#
|
3870
|
+
# # Call the delete_big_query_export method.
|
3871
|
+
# result = client.delete_big_query_export request
|
3872
|
+
#
|
3873
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3874
|
+
# p result
|
3875
|
+
#
|
3876
|
+
def delete_big_query_export request, options = nil
|
3877
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3878
|
+
|
3879
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest
|
3880
|
+
|
3881
|
+
# Converts hash and nil to an options object
|
3882
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3883
|
+
|
3884
|
+
# Customize the options with defaults
|
3885
|
+
metadata = @config.rpcs.delete_big_query_export.metadata.to_h
|
3886
|
+
|
3887
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3888
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3889
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3890
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3891
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3892
|
+
|
3893
|
+
header_params = {}
|
3894
|
+
if request.name
|
3895
|
+
header_params["name"] = request.name
|
3896
|
+
end
|
3897
|
+
|
3898
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3899
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3900
|
+
|
3901
|
+
options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout,
|
3902
|
+
metadata: metadata,
|
3903
|
+
retry_policy: @config.rpcs.delete_big_query_export.retry_policy
|
3904
|
+
|
3905
|
+
options.apply_defaults timeout: @config.timeout,
|
3906
|
+
metadata: @config.metadata,
|
3907
|
+
retry_policy: @config.retry_policy
|
3908
|
+
|
3909
|
+
@security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation|
|
3910
|
+
yield response, operation if block_given?
|
3911
|
+
return response
|
3912
|
+
end
|
3913
|
+
rescue ::GRPC::BadStatus => e
|
3914
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3915
|
+
end
|
3916
|
+
|
3917
|
+
##
|
3918
|
+
# Updates a BigQuery export.
|
3919
|
+
#
|
3920
|
+
# @overload update_big_query_export(request, options = nil)
|
3921
|
+
# Pass arguments to `update_big_query_export` via a request object, either of type
|
3922
|
+
# {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash.
|
3923
|
+
#
|
3924
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash]
|
3925
|
+
# A request object representing the call parameters. Required. To specify no
|
3926
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3927
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3928
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3929
|
+
#
|
3930
|
+
# @overload update_big_query_export(big_query_export: nil, update_mask: nil)
|
3931
|
+
# Pass arguments to `update_big_query_export` via keyword arguments. Note that at
|
3932
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3933
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3934
|
+
#
|
3935
|
+
# @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
|
3936
|
+
# Required. The BigQuery export being updated.
|
3937
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3938
|
+
# The list of fields to be updated.
|
3939
|
+
# If empty all mutable fields will be updated.
|
3940
|
+
#
|
3941
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3942
|
+
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3943
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3944
|
+
#
|
3945
|
+
# @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
|
3946
|
+
#
|
3947
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3948
|
+
#
|
3949
|
+
# @example Basic example
|
3950
|
+
# require "google/cloud/security_center/v1"
|
3951
|
+
#
|
3952
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3953
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
3954
|
+
#
|
3955
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3956
|
+
# request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new
|
3957
|
+
#
|
3958
|
+
# # Call the update_big_query_export method.
|
3959
|
+
# result = client.update_big_query_export request
|
3960
|
+
#
|
3961
|
+
# # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
3962
|
+
# p result
|
3963
|
+
#
|
3964
|
+
def update_big_query_export request, options = nil
|
3965
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3966
|
+
|
3967
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest
|
3968
|
+
|
3969
|
+
# Converts hash and nil to an options object
|
3970
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3971
|
+
|
3972
|
+
# Customize the options with defaults
|
3973
|
+
metadata = @config.rpcs.update_big_query_export.metadata.to_h
|
3974
|
+
|
3975
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3976
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3977
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3978
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
3979
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3980
|
+
|
3981
|
+
header_params = {}
|
3982
|
+
if request.big_query_export&.name
|
3983
|
+
header_params["big_query_export.name"] = request.big_query_export.name
|
3984
|
+
end
|
3985
|
+
|
3986
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3987
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3988
|
+
|
3989
|
+
options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout,
|
3990
|
+
metadata: metadata,
|
3991
|
+
retry_policy: @config.rpcs.update_big_query_export.retry_policy
|
3992
|
+
|
3993
|
+
options.apply_defaults timeout: @config.timeout,
|
3994
|
+
metadata: @config.metadata,
|
3995
|
+
retry_policy: @config.retry_policy
|
3996
|
+
|
3997
|
+
@security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation|
|
3998
|
+
yield response, operation if block_given?
|
3999
|
+
return response
|
4000
|
+
end
|
4001
|
+
rescue ::GRPC::BadStatus => e
|
4002
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4003
|
+
end
|
4004
|
+
|
4005
|
+
##
|
4006
|
+
# Lists BigQuery exports. Note that when requesting BigQuery exports at a
|
4007
|
+
# given level all exports under that level are also returned e.g. if
|
4008
|
+
# requesting BigQuery exports under a folder, then all BigQuery exports
|
4009
|
+
# immediately under the folder plus the ones created under the projects
|
4010
|
+
# within the folder are returned.
|
4011
|
+
#
|
4012
|
+
# @overload list_big_query_exports(request, options = nil)
|
4013
|
+
# Pass arguments to `list_big_query_exports` via a request object, either of type
|
4014
|
+
# {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash.
|
4015
|
+
#
|
4016
|
+
# @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash]
|
4017
|
+
# A request object representing the call parameters. Required. To specify no
|
4018
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4019
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4020
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4021
|
+
#
|
4022
|
+
# @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil)
|
4023
|
+
# Pass arguments to `list_big_query_exports` via keyword arguments. Note that at
|
4024
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4025
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4026
|
+
#
|
4027
|
+
# @param parent [::String]
|
4028
|
+
# Required. The parent, which owns the collection of BigQuery exports. Its format is
|
4029
|
+
# "organizations/[organization_id]", "folders/[folder_id]",
|
4030
|
+
# "projects/[project_id]".
|
4031
|
+
# @param page_size [::Integer]
|
4032
|
+
# The maximum number of configs to return. The service may return fewer than
|
4033
|
+
# this value.
|
4034
|
+
# If unspecified, at most 10 configs will be returned.
|
4035
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
4036
|
+
# @param page_token [::String]
|
4037
|
+
# A page token, received from a previous `ListBigQueryExports` call.
|
4038
|
+
# Provide this to retrieve the subsequent page.
|
4039
|
+
# When paginating, all other parameters provided to `ListBigQueryExports`
|
4040
|
+
# must match the call that provided the page token.
|
4041
|
+
#
|
4042
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4043
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
|
4044
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4045
|
+
#
|
4046
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
|
4047
|
+
#
|
4048
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4049
|
+
#
|
4050
|
+
# @example Basic example
|
4051
|
+
# require "google/cloud/security_center/v1"
|
4052
|
+
#
|
4053
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4054
|
+
# client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
|
4055
|
+
#
|
4056
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4057
|
+
# request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new
|
4058
|
+
#
|
4059
|
+
# # Call the list_big_query_exports method.
|
4060
|
+
# result = client.list_big_query_exports request
|
4061
|
+
#
|
4062
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4063
|
+
# # iterate over all elements by calling #each, and the enumerable
|
4064
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
4065
|
+
# # methods are also available for managing paging directly.
|
4066
|
+
# result.each do |response|
|
4067
|
+
# # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport.
|
4068
|
+
# p response
|
4069
|
+
# end
|
4070
|
+
#
|
4071
|
+
def list_big_query_exports request, options = nil
|
4072
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4073
|
+
|
4074
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest
|
4075
|
+
|
4076
|
+
# Converts hash and nil to an options object
|
4077
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4078
|
+
|
4079
|
+
# Customize the options with defaults
|
4080
|
+
metadata = @config.rpcs.list_big_query_exports.metadata.to_h
|
4081
|
+
|
4082
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4083
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4084
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4085
|
+
gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
|
4086
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4087
|
+
|
4088
|
+
header_params = {}
|
4089
|
+
if request.parent
|
4090
|
+
header_params["parent"] = request.parent
|
4091
|
+
end
|
4092
|
+
|
4093
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4094
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4095
|
+
|
4096
|
+
options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout,
|
4097
|
+
metadata: metadata,
|
4098
|
+
retry_policy: @config.rpcs.list_big_query_exports.retry_policy
|
4099
|
+
|
4100
|
+
options.apply_defaults timeout: @config.timeout,
|
4101
|
+
metadata: @config.metadata,
|
4102
|
+
retry_policy: @config.retry_policy
|
4103
|
+
|
4104
|
+
@security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation|
|
4105
|
+
response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options
|
4106
|
+
yield response, operation if block_given?
|
4107
|
+
return response
|
4108
|
+
end
|
4109
|
+
rescue ::GRPC::BadStatus => e
|
4110
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4111
|
+
end
|
4112
|
+
|
3641
4113
|
##
|
3642
4114
|
# Configuration class for the SecurityCenter API.
|
3643
4115
|
#
|
@@ -3809,6 +4281,11 @@ module Google
|
|
3809
4281
|
#
|
3810
4282
|
attr_reader :delete_notification_config
|
3811
4283
|
##
|
4284
|
+
# RPC-specific configuration for `get_big_query_export`
|
4285
|
+
# @return [::Gapic::Config::Method]
|
4286
|
+
#
|
4287
|
+
attr_reader :get_big_query_export
|
4288
|
+
##
|
3812
4289
|
# RPC-specific configuration for `get_iam_policy`
|
3813
4290
|
# @return [::Gapic::Config::Method]
|
3814
4291
|
#
|
@@ -3928,6 +4405,26 @@ module Google
|
|
3928
4405
|
# @return [::Gapic::Config::Method]
|
3929
4406
|
#
|
3930
4407
|
attr_reader :update_security_marks
|
4408
|
+
##
|
4409
|
+
# RPC-specific configuration for `create_big_query_export`
|
4410
|
+
# @return [::Gapic::Config::Method]
|
4411
|
+
#
|
4412
|
+
attr_reader :create_big_query_export
|
4413
|
+
##
|
4414
|
+
# RPC-specific configuration for `delete_big_query_export`
|
4415
|
+
# @return [::Gapic::Config::Method]
|
4416
|
+
#
|
4417
|
+
attr_reader :delete_big_query_export
|
4418
|
+
##
|
4419
|
+
# RPC-specific configuration for `update_big_query_export`
|
4420
|
+
# @return [::Gapic::Config::Method]
|
4421
|
+
#
|
4422
|
+
attr_reader :update_big_query_export
|
4423
|
+
##
|
4424
|
+
# RPC-specific configuration for `list_big_query_exports`
|
4425
|
+
# @return [::Gapic::Config::Method]
|
4426
|
+
#
|
4427
|
+
attr_reader :list_big_query_exports
|
3931
4428
|
|
3932
4429
|
# @private
|
3933
4430
|
def initialize parent_rpcs = nil
|
@@ -3945,6 +4442,8 @@ module Google
|
|
3945
4442
|
@delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
|
3946
4443
|
delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
|
3947
4444
|
@delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
|
4445
|
+
get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
|
4446
|
+
@get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
|
3948
4447
|
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
3949
4448
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
3950
4449
|
get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config
|
@@ -3993,6 +4492,14 @@ module Google
|
|
3993
4492
|
@update_source = ::Gapic::Config::Method.new update_source_config
|
3994
4493
|
update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks
|
3995
4494
|
@update_security_marks = ::Gapic::Config::Method.new update_security_marks_config
|
4495
|
+
create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export
|
4496
|
+
@create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config
|
4497
|
+
delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export
|
4498
|
+
@delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config
|
4499
|
+
update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export
|
4500
|
+
@update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
|
4501
|
+
list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports
|
4502
|
+
@list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config
|
3996
4503
|
|
3997
4504
|
yield self if block_given?
|
3998
4505
|
end
|
@@ -24,6 +24,58 @@ module Google
|
|
24
24
|
module SecurityCenter
|
25
25
|
# Path helper methods for the SecurityCenter API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified BigQueryExport resource string.
|
29
|
+
#
|
30
|
+
# @overload big_query_export_path(organization:, export:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `organizations/{organization}/bigQueryExports/{export}`
|
34
|
+
#
|
35
|
+
# @param organization [String]
|
36
|
+
# @param export [String]
|
37
|
+
#
|
38
|
+
# @overload big_query_export_path(folder:, export:)
|
39
|
+
# The resource will be in the following format:
|
40
|
+
#
|
41
|
+
# `folders/{folder}/bigQueryExports/{export}`
|
42
|
+
#
|
43
|
+
# @param folder [String]
|
44
|
+
# @param export [String]
|
45
|
+
#
|
46
|
+
# @overload big_query_export_path(project:, export:)
|
47
|
+
# The resource will be in the following format:
|
48
|
+
#
|
49
|
+
# `projects/{project}/bigQueryExports/{export}`
|
50
|
+
#
|
51
|
+
# @param project [String]
|
52
|
+
# @param export [String]
|
53
|
+
#
|
54
|
+
# @return [::String]
|
55
|
+
def big_query_export_path **args
|
56
|
+
resources = {
|
57
|
+
"export:organization" => (proc do |organization:, export:|
|
58
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
59
|
+
|
60
|
+
"organizations/#{organization}/bigQueryExports/#{export}"
|
61
|
+
end),
|
62
|
+
"export:folder" => (proc do |folder:, export:|
|
63
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
64
|
+
|
65
|
+
"folders/#{folder}/bigQueryExports/#{export}"
|
66
|
+
end),
|
67
|
+
"export:project" => (proc do |project:, export:|
|
68
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
69
|
+
|
70
|
+
"projects/#{project}/bigQueryExports/#{export}"
|
71
|
+
end)
|
72
|
+
}
|
73
|
+
|
74
|
+
resource = resources[args.keys.sort.join(":")]
|
75
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
76
|
+
resource.call(**args)
|
77
|
+
end
|
78
|
+
|
27
79
|
##
|
28
80
|
# Create a fully-qualified ExternalSystem resource string.
|
29
81
|
#
|