google-cloud-security_center-v1 0.12.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/security_center/v1/security_center/client.rb +537 -29
  3. data/lib/google/cloud/security_center/v1/security_center/paths.rb +52 -0
  4. data/lib/google/cloud/security_center/v1/version.rb +1 -1
  5. data/lib/google/cloud/security_center/v1.rb +2 -0
  6. data/lib/google/cloud/securitycenter/v1/access_pb.rb +0 -1
  7. data/lib/google/cloud/securitycenter/v1/asset_pb.rb +0 -1
  8. data/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb +32 -0
  9. data/lib/google/cloud/securitycenter/v1/external_system_pb.rb +0 -1
  10. data/lib/google/cloud/securitycenter/v1/finding_pb.rb +6 -1
  11. data/lib/google/cloud/securitycenter/v1/folder_pb.rb +0 -1
  12. data/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb +30 -0
  13. data/lib/google/cloud/securitycenter/v1/indicator_pb.rb +0 -1
  14. data/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb +78 -0
  15. data/lib/google/cloud/securitycenter/v1/mute_config_pb.rb +0 -1
  16. data/lib/google/cloud/securitycenter/v1/notification_config_pb.rb +0 -1
  17. data/lib/google/cloud/securitycenter/v1/notification_message_pb.rb +0 -1
  18. data/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb +0 -1
  19. data/lib/google/cloud/securitycenter/v1/resource_pb.rb +2 -3
  20. data/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb +0 -1
  21. data/lib/google/cloud/securitycenter/v1/security_marks_pb.rb +0 -1
  22. data/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb +34 -3
  23. data/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +14 -0
  24. data/lib/google/cloud/securitycenter/v1/source_pb.rb +0 -1
  25. data/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb +1 -1
  26. data/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb +92 -0
  27. data/proto_docs/google/cloud/securitycenter/v1/external_system.rb +2 -1
  28. data/proto_docs/google/cloud/securitycenter/v1/finding.rb +19 -4
  29. data/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb +56 -0
  30. data/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb +201 -0
  31. data/proto_docs/google/cloud/securitycenter/v1/resource.rb +7 -7
  32. data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +129 -34
  33. data/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +3 -0
  34. data/proto_docs/google/iam/v1/iam_policy.rb +8 -1
  35. data/proto_docs/google/iam/v1/options.rb +14 -4
  36. data/proto_docs/google/iam/v1/policy.rb +208 -38
  37. metadata +12 -12
@@ -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 is
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 will be
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 ignored as
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 is
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 account
665
- # will be ignored as they are both output only fields on this resource.
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
  #
@@ -925,7 +1014,7 @@ module Google
925
1014
  # See the operation documentation for the appropriate value for this field.
926
1015
  # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
927
1016
  # OPTIONAL: A `GetPolicyOptions` object for specifying options to
928
- # `GetIamPolicy`. This field is only used by Cloud IAM.
1017
+ # `GetIamPolicy`.
929
1018
  #
930
1019
  # @yield [response, operation] Access the result along with the RPC operation
931
1020
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -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 format is
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. The string
1428
- # value should follow SQL syntax: comma separated list of fields. For
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 (including
1651
- # `state_change`). The string value should follow SQL syntax: comma separated
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 is
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 be
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 is
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]
@@ -2829,7 +2918,7 @@ module Google
2829
2918
  # @param options [::Gapic::CallOptions, ::Hash]
2830
2919
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2831
2920
  #
2832
- # @overload set_iam_policy(resource: nil, policy: nil)
2921
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
2833
2922
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
2834
2923
  # least one keyword argument is required. To specify no parameters, or to keep all
2835
2924
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2842,6 +2931,12 @@ module Google
2842
2931
  # the policy is limited to a few 10s of KB. An empty policy is a
2843
2932
  # valid policy but certain Cloud Platform services (such as Projects)
2844
2933
  # might reject them.
2934
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2935
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
2936
+ # the fields in the mask will be modified. If no mask is provided, the
2937
+ # following default mask is used:
2938
+ #
2939
+ # `paths: "bindings, etag"`
2845
2940
  #
2846
2941
  # @yield [response, operation] Access the result along with the RPC operation
2847
2942
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -3107,8 +3202,8 @@ module Google
3107
3202
  # the default parameter values, pass an empty Hash as a request object (see above).
3108
3203
  #
3109
3204
  # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
3110
- # Required. The finding resource to update or create if it does not already exist.
3111
- # parent, security_marks, and update_time will be ignored.
3205
+ # Required. The finding resource to update or create if it does not already
3206
+ # exist. parent, security_marks, and update_time will be ignored.
3112
3207
  #
3113
3208
  # In the case of creation, the finding id portion of the name must be
3114
3209
  # alphanumeric and less than or equal to 32 characters and greater than 0
@@ -3572,7 +3667,7 @@ module Google
3572
3667
  # The time at which the updated SecurityMarks take effect.
3573
3668
  # If not set uses current server time. Updates will be applied to the
3574
3669
  # SecurityMarks that are active immediately preceding this time. Must be
3575
- # smaller or equal to the server time.
3670
+ # earlier or equal to the server time.
3576
3671
  #
3577
3672
  # @yield [response, operation] Access the result along with the RPC operation
3578
3673
  # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
@@ -3638,6 +3733,384 @@ module Google
3638
3733
  raise ::Google::Cloud::Error.from_error(e)
3639
3734
  end
3640
3735
 
3736
+ ##
3737
+ # Creates a big query export.
3738
+ #
3739
+ # @overload create_big_query_export(request, options = nil)
3740
+ # Pass arguments to `create_big_query_export` via a request object, either of type
3741
+ # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash.
3742
+ #
3743
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash]
3744
+ # A request object representing the call parameters. Required. To specify no
3745
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3746
+ # @param options [::Gapic::CallOptions, ::Hash]
3747
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3748
+ #
3749
+ # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil)
3750
+ # Pass arguments to `create_big_query_export` via keyword arguments. Note that at
3751
+ # least one keyword argument is required. To specify no parameters, or to keep all
3752
+ # the default parameter values, pass an empty Hash as a request object (see above).
3753
+ #
3754
+ # @param parent [::String]
3755
+ # Required. Resource name of the new big query export's parent. Its format is
3756
+ # "organizations/[organization_id]", "folders/[folder_id]", or
3757
+ # "projects/[project_id]".
3758
+ # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
3759
+ # Required. The big query export being created.
3760
+ # @param big_query_export_id [::String]
3761
+ # Required. Unique identifier provided by the client within the parent scope.
3762
+ # It must consist of lower case letters, numbers, and hyphen, with the first
3763
+ # character a letter, the last a letter or a number, and a 63 character
3764
+ # maximum.
3765
+ #
3766
+ # @yield [response, operation] Access the result along with the RPC operation
3767
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3768
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3769
+ #
3770
+ # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3771
+ #
3772
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3773
+ #
3774
+ # @example Basic example
3775
+ # require "google/cloud/security_center/v1"
3776
+ #
3777
+ # # Create a client object. The client can be reused for multiple calls.
3778
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3779
+ #
3780
+ # # Create a request. To set request fields, pass in keyword arguments.
3781
+ # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new
3782
+ #
3783
+ # # Call the create_big_query_export method.
3784
+ # result = client.create_big_query_export request
3785
+ #
3786
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
3787
+ # p result
3788
+ #
3789
+ def create_big_query_export request, options = nil
3790
+ raise ::ArgumentError, "request must be provided" if request.nil?
3791
+
3792
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest
3793
+
3794
+ # Converts hash and nil to an options object
3795
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3796
+
3797
+ # Customize the options with defaults
3798
+ metadata = @config.rpcs.create_big_query_export.metadata.to_h
3799
+
3800
+ # Set x-goog-api-client and x-goog-user-project headers
3801
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3802
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3803
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
3804
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3805
+
3806
+ header_params = {}
3807
+ if request.parent
3808
+ header_params["parent"] = request.parent
3809
+ end
3810
+
3811
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3812
+ metadata[:"x-goog-request-params"] ||= request_params_header
3813
+
3814
+ options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout,
3815
+ metadata: metadata,
3816
+ retry_policy: @config.rpcs.create_big_query_export.retry_policy
3817
+
3818
+ options.apply_defaults timeout: @config.timeout,
3819
+ metadata: @config.metadata,
3820
+ retry_policy: @config.retry_policy
3821
+
3822
+ @security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation|
3823
+ yield response, operation if block_given?
3824
+ return response
3825
+ end
3826
+ rescue ::GRPC::BadStatus => e
3827
+ raise ::Google::Cloud::Error.from_error(e)
3828
+ end
3829
+
3830
+ ##
3831
+ # Deletes an existing big query export.
3832
+ #
3833
+ # @overload delete_big_query_export(request, options = nil)
3834
+ # Pass arguments to `delete_big_query_export` via a request object, either of type
3835
+ # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash.
3836
+ #
3837
+ # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash]
3838
+ # A request object representing the call parameters. Required. To specify no
3839
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3840
+ # @param options [::Gapic::CallOptions, ::Hash]
3841
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3842
+ #
3843
+ # @overload delete_big_query_export(name: nil)
3844
+ # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at
3845
+ # least one keyword argument is required. To specify no parameters, or to keep all
3846
+ # the default parameter values, pass an empty Hash as a request object (see above).
3847
+ #
3848
+ # @param name [::String]
3849
+ # Required. Name of the big query export to delete. Its format is
3850
+ # organizations/\\{organization}/bigQueryExports/\\{export_id},
3851
+ # folders/\\{folder}/bigQueryExports/\\{export_id}, or
3852
+ # projects/\\{project}/bigQueryExports/\\{export_id}
3853
+ #
3854
+ # @yield [response, operation] Access the result along with the RPC operation
3855
+ # @yieldparam response [::Google::Protobuf::Empty]
3856
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3857
+ #
3858
+ # @return [::Google::Protobuf::Empty]
3859
+ #
3860
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3861
+ #
3862
+ # @example Basic example
3863
+ # require "google/cloud/security_center/v1"
3864
+ #
3865
+ # # Create a client object. The client can be reused for multiple calls.
3866
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3867
+ #
3868
+ # # Create a request. To set request fields, pass in keyword arguments.
3869
+ # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new
3870
+ #
3871
+ # # Call the delete_big_query_export method.
3872
+ # result = client.delete_big_query_export request
3873
+ #
3874
+ # # The returned object is of type Google::Protobuf::Empty.
3875
+ # p result
3876
+ #
3877
+ def delete_big_query_export request, options = nil
3878
+ raise ::ArgumentError, "request must be provided" if request.nil?
3879
+
3880
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest
3881
+
3882
+ # Converts hash and nil to an options object
3883
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3884
+
3885
+ # Customize the options with defaults
3886
+ metadata = @config.rpcs.delete_big_query_export.metadata.to_h
3887
+
3888
+ # Set x-goog-api-client and x-goog-user-project headers
3889
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3890
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3891
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
3892
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3893
+
3894
+ header_params = {}
3895
+ if request.name
3896
+ header_params["name"] = request.name
3897
+ end
3898
+
3899
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3900
+ metadata[:"x-goog-request-params"] ||= request_params_header
3901
+
3902
+ options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout,
3903
+ metadata: metadata,
3904
+ retry_policy: @config.rpcs.delete_big_query_export.retry_policy
3905
+
3906
+ options.apply_defaults timeout: @config.timeout,
3907
+ metadata: @config.metadata,
3908
+ retry_policy: @config.retry_policy
3909
+
3910
+ @security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation|
3911
+ yield response, operation if block_given?
3912
+ return response
3913
+ end
3914
+ rescue ::GRPC::BadStatus => e
3915
+ raise ::Google::Cloud::Error.from_error(e)
3916
+ end
3917
+
3918
+ ##
3919
+ # Updates a BigQuery export.
3920
+ #
3921
+ # @overload update_big_query_export(request, options = nil)
3922
+ # Pass arguments to `update_big_query_export` via a request object, either of type
3923
+ # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash.
3924
+ #
3925
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash]
3926
+ # A request object representing the call parameters. Required. To specify no
3927
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3928
+ # @param options [::Gapic::CallOptions, ::Hash]
3929
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3930
+ #
3931
+ # @overload update_big_query_export(big_query_export: nil, update_mask: nil)
3932
+ # Pass arguments to `update_big_query_export` via keyword arguments. Note that at
3933
+ # least one keyword argument is required. To specify no parameters, or to keep all
3934
+ # the default parameter values, pass an empty Hash as a request object (see above).
3935
+ #
3936
+ # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
3937
+ # Required. The BigQuery export being updated.
3938
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3939
+ # The list of fields to be updated.
3940
+ # If empty all mutable fields will be updated.
3941
+ #
3942
+ # @yield [response, operation] Access the result along with the RPC operation
3943
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3944
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3945
+ #
3946
+ # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3947
+ #
3948
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3949
+ #
3950
+ # @example Basic example
3951
+ # require "google/cloud/security_center/v1"
3952
+ #
3953
+ # # Create a client object. The client can be reused for multiple calls.
3954
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3955
+ #
3956
+ # # Create a request. To set request fields, pass in keyword arguments.
3957
+ # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new
3958
+ #
3959
+ # # Call the update_big_query_export method.
3960
+ # result = client.update_big_query_export request
3961
+ #
3962
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport.
3963
+ # p result
3964
+ #
3965
+ def update_big_query_export request, options = nil
3966
+ raise ::ArgumentError, "request must be provided" if request.nil?
3967
+
3968
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest
3969
+
3970
+ # Converts hash and nil to an options object
3971
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3972
+
3973
+ # Customize the options with defaults
3974
+ metadata = @config.rpcs.update_big_query_export.metadata.to_h
3975
+
3976
+ # Set x-goog-api-client and x-goog-user-project headers
3977
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3978
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3979
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
3980
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3981
+
3982
+ header_params = {}
3983
+ if request.big_query_export&.name
3984
+ header_params["big_query_export.name"] = request.big_query_export.name
3985
+ end
3986
+
3987
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3988
+ metadata[:"x-goog-request-params"] ||= request_params_header
3989
+
3990
+ options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout,
3991
+ metadata: metadata,
3992
+ retry_policy: @config.rpcs.update_big_query_export.retry_policy
3993
+
3994
+ options.apply_defaults timeout: @config.timeout,
3995
+ metadata: @config.metadata,
3996
+ retry_policy: @config.retry_policy
3997
+
3998
+ @security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation|
3999
+ yield response, operation if block_given?
4000
+ return response
4001
+ end
4002
+ rescue ::GRPC::BadStatus => e
4003
+ raise ::Google::Cloud::Error.from_error(e)
4004
+ end
4005
+
4006
+ ##
4007
+ # Lists BigQuery exports. Note that when requesting BigQuery exports at a
4008
+ # given level all exports under that level are also returned e.g. if
4009
+ # requesting BigQuery exports under a folder, then all BigQuery exports
4010
+ # immediately under the folder plus the ones created under the projects
4011
+ # within the folder are returned.
4012
+ #
4013
+ # @overload list_big_query_exports(request, options = nil)
4014
+ # Pass arguments to `list_big_query_exports` via a request object, either of type
4015
+ # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash.
4016
+ #
4017
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash]
4018
+ # A request object representing the call parameters. Required. To specify no
4019
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4020
+ # @param options [::Gapic::CallOptions, ::Hash]
4021
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4022
+ #
4023
+ # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil)
4024
+ # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at
4025
+ # least one keyword argument is required. To specify no parameters, or to keep all
4026
+ # the default parameter values, pass an empty Hash as a request object (see above).
4027
+ #
4028
+ # @param parent [::String]
4029
+ # Required. The parent, which owns the collection of BigQuery exports. Its
4030
+ # format is "organizations/[organization_id]", "folders/[folder_id]",
4031
+ # "projects/[project_id]".
4032
+ # @param page_size [::Integer]
4033
+ # The maximum number of configs to return. The service may return fewer than
4034
+ # this value.
4035
+ # If unspecified, at most 10 configs will be returned.
4036
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
4037
+ # @param page_token [::String]
4038
+ # A page token, received from a previous `ListBigQueryExports` call.
4039
+ # Provide this to retrieve the subsequent page.
4040
+ # When paginating, all other parameters provided to `ListBigQueryExports`
4041
+ # must match the call that provided the page token.
4042
+ #
4043
+ # @yield [response, operation] Access the result along with the RPC operation
4044
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
4045
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4046
+ #
4047
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
4048
+ #
4049
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4050
+ #
4051
+ # @example Basic example
4052
+ # require "google/cloud/security_center/v1"
4053
+ #
4054
+ # # Create a client object. The client can be reused for multiple calls.
4055
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
4056
+ #
4057
+ # # Create a request. To set request fields, pass in keyword arguments.
4058
+ # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new
4059
+ #
4060
+ # # Call the list_big_query_exports method.
4061
+ # result = client.list_big_query_exports request
4062
+ #
4063
+ # # The returned object is of type Gapic::PagedEnumerable. You can
4064
+ # # iterate over all elements by calling #each, and the enumerable
4065
+ # # will lazily make API calls to fetch subsequent pages. Other
4066
+ # # methods are also available for managing paging directly.
4067
+ # result.each do |response|
4068
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport.
4069
+ # p response
4070
+ # end
4071
+ #
4072
+ def list_big_query_exports request, options = nil
4073
+ raise ::ArgumentError, "request must be provided" if request.nil?
4074
+
4075
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest
4076
+
4077
+ # Converts hash and nil to an options object
4078
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4079
+
4080
+ # Customize the options with defaults
4081
+ metadata = @config.rpcs.list_big_query_exports.metadata.to_h
4082
+
4083
+ # Set x-goog-api-client and x-goog-user-project headers
4084
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4085
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4086
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
4087
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4088
+
4089
+ header_params = {}
4090
+ if request.parent
4091
+ header_params["parent"] = request.parent
4092
+ end
4093
+
4094
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4095
+ metadata[:"x-goog-request-params"] ||= request_params_header
4096
+
4097
+ options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout,
4098
+ metadata: metadata,
4099
+ retry_policy: @config.rpcs.list_big_query_exports.retry_policy
4100
+
4101
+ options.apply_defaults timeout: @config.timeout,
4102
+ metadata: @config.metadata,
4103
+ retry_policy: @config.retry_policy
4104
+
4105
+ @security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation|
4106
+ response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options
4107
+ yield response, operation if block_given?
4108
+ return response
4109
+ end
4110
+ rescue ::GRPC::BadStatus => e
4111
+ raise ::Google::Cloud::Error.from_error(e)
4112
+ end
4113
+
3641
4114
  ##
3642
4115
  # Configuration class for the SecurityCenter API.
3643
4116
  #
@@ -3809,6 +4282,11 @@ module Google
3809
4282
  #
3810
4283
  attr_reader :delete_notification_config
3811
4284
  ##
4285
+ # RPC-specific configuration for `get_big_query_export`
4286
+ # @return [::Gapic::Config::Method]
4287
+ #
4288
+ attr_reader :get_big_query_export
4289
+ ##
3812
4290
  # RPC-specific configuration for `get_iam_policy`
3813
4291
  # @return [::Gapic::Config::Method]
3814
4292
  #
@@ -3928,6 +4406,26 @@ module Google
3928
4406
  # @return [::Gapic::Config::Method]
3929
4407
  #
3930
4408
  attr_reader :update_security_marks
4409
+ ##
4410
+ # RPC-specific configuration for `create_big_query_export`
4411
+ # @return [::Gapic::Config::Method]
4412
+ #
4413
+ attr_reader :create_big_query_export
4414
+ ##
4415
+ # RPC-specific configuration for `delete_big_query_export`
4416
+ # @return [::Gapic::Config::Method]
4417
+ #
4418
+ attr_reader :delete_big_query_export
4419
+ ##
4420
+ # RPC-specific configuration for `update_big_query_export`
4421
+ # @return [::Gapic::Config::Method]
4422
+ #
4423
+ attr_reader :update_big_query_export
4424
+ ##
4425
+ # RPC-specific configuration for `list_big_query_exports`
4426
+ # @return [::Gapic::Config::Method]
4427
+ #
4428
+ attr_reader :list_big_query_exports
3931
4429
 
3932
4430
  # @private
3933
4431
  def initialize parent_rpcs = nil
@@ -3945,6 +4443,8 @@ module Google
3945
4443
  @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
3946
4444
  delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
3947
4445
  @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
4446
+ get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
4447
+ @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
3948
4448
  get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
3949
4449
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
3950
4450
  get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config
@@ -3993,6 +4493,14 @@ module Google
3993
4493
  @update_source = ::Gapic::Config::Method.new update_source_config
3994
4494
  update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks
3995
4495
  @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config
4496
+ create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export
4497
+ @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config
4498
+ delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export
4499
+ @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config
4500
+ update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export
4501
+ @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
4502
+ list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports
4503
+ @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config
3996
4504
 
3997
4505
  yield self if block_given?
3998
4506
  end