google-cloud-dlp-v2 0.7.2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/dlp/v2/dlp_service/client.rb +844 -183
- data/lib/google/cloud/dlp/v2/version.rb +1 -1
- data/lib/google/privacy/dlp/v2/dlp_pb.rb +11 -2
- data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +2 -11
- data/lib/google/privacy/dlp/v2/storage_pb.rb +5 -3
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/privacy/dlp/v2/dlp.rb +62 -32
- data/proto_docs/google/privacy/dlp/v2/storage.rb +19 -11
- metadata +5 -5
@@ -49,13 +49,12 @@ module Google
|
|
49
49
|
# See {::Google::Cloud::Dlp::V2::DlpService::Client::Configuration}
|
50
50
|
# for a description of the configuration fields.
|
51
51
|
#
|
52
|
-
#
|
52
|
+
# @example
|
53
53
|
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
# end
|
54
|
+
# # Modify the configuration for all DlpService clients
|
55
|
+
# ::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config|
|
56
|
+
# config.timeout = 10.0
|
57
|
+
# end
|
59
58
|
#
|
60
59
|
# @yield [config] Configure the Client client.
|
61
60
|
# @yieldparam config [Client::Configuration]
|
@@ -230,19 +229,15 @@ module Google
|
|
230
229
|
##
|
231
230
|
# Create a new DlpService client object.
|
232
231
|
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
# To create a new DlpService client with the default
|
236
|
-
# configuration:
|
237
|
-
#
|
238
|
-
# client = ::Google::Cloud::Dlp::V2::DlpService::Client.new
|
232
|
+
# @example
|
239
233
|
#
|
240
|
-
#
|
241
|
-
#
|
234
|
+
# # Create a client using the default configuration
|
235
|
+
# client = ::Google::Cloud::Dlp::V2::DlpService::Client.new
|
242
236
|
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
237
|
+
# # Create a client using a custom configuration
|
238
|
+
# client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config|
|
239
|
+
# config.timeout = 10.0
|
240
|
+
# end
|
246
241
|
#
|
247
242
|
# @yield [config] Configure the DlpService client.
|
248
243
|
# @yieldparam config [Client::Configuration]
|
@@ -262,10 +257,9 @@ module Google
|
|
262
257
|
|
263
258
|
# Create credentials
|
264
259
|
credentials = @config.credentials
|
265
|
-
# Use self-signed JWT if the
|
260
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
266
261
|
# but only if the default endpoint does not have a region prefix.
|
267
|
-
enable_self_signed_jwt = @config.
|
268
|
-
@config.endpoint == Client.configure.endpoint &&
|
262
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
269
263
|
!@config.endpoint.split(".").first.include?("-")
|
270
264
|
credentials ||= Credentials.default scope: @config.scope,
|
271
265
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -351,6 +345,21 @@ module Google
|
|
351
345
|
#
|
352
346
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
353
347
|
#
|
348
|
+
# @example Basic example
|
349
|
+
# require "google/cloud/dlp/v2"
|
350
|
+
#
|
351
|
+
# # Create a client object. The client can be reused for multiple calls.
|
352
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
353
|
+
#
|
354
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
355
|
+
# request = Google::Cloud::Dlp::V2::InspectContentRequest.new
|
356
|
+
#
|
357
|
+
# # Call the inspect_content method.
|
358
|
+
# result = client.inspect_content request
|
359
|
+
#
|
360
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse.
|
361
|
+
# p result
|
362
|
+
#
|
354
363
|
def inspect_content request, options = nil
|
355
364
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
356
365
|
|
@@ -368,16 +377,20 @@ module Google
|
|
368
377
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
369
378
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
370
379
|
|
371
|
-
header_params = {
|
372
|
-
|
373
|
-
|
380
|
+
header_params = {}
|
381
|
+
if request.parent
|
382
|
+
header_params["parent"] = request.parent
|
383
|
+
end
|
384
|
+
|
374
385
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
375
386
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
376
387
|
|
377
388
|
options.apply_defaults timeout: @config.rpcs.inspect_content.timeout,
|
378
389
|
metadata: metadata,
|
379
390
|
retry_policy: @config.rpcs.inspect_content.retry_policy
|
380
|
-
|
391
|
+
|
392
|
+
options.apply_defaults timeout: @config.timeout,
|
393
|
+
metadata: @config.metadata,
|
381
394
|
retry_policy: @config.retry_policy
|
382
395
|
|
383
396
|
@dlp_service_stub.call_rpc :inspect_content, request, options: options do |response, operation|
|
@@ -450,6 +463,21 @@ module Google
|
|
450
463
|
#
|
451
464
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
452
465
|
#
|
466
|
+
# @example Basic example
|
467
|
+
# require "google/cloud/dlp/v2"
|
468
|
+
#
|
469
|
+
# # Create a client object. The client can be reused for multiple calls.
|
470
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
471
|
+
#
|
472
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
473
|
+
# request = Google::Cloud::Dlp::V2::RedactImageRequest.new
|
474
|
+
#
|
475
|
+
# # Call the redact_image method.
|
476
|
+
# result = client.redact_image request
|
477
|
+
#
|
478
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse.
|
479
|
+
# p result
|
480
|
+
#
|
453
481
|
def redact_image request, options = nil
|
454
482
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
455
483
|
|
@@ -467,16 +495,20 @@ module Google
|
|
467
495
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
468
496
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
469
497
|
|
470
|
-
header_params = {
|
471
|
-
|
472
|
-
|
498
|
+
header_params = {}
|
499
|
+
if request.parent
|
500
|
+
header_params["parent"] = request.parent
|
501
|
+
end
|
502
|
+
|
473
503
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
474
504
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
475
505
|
|
476
506
|
options.apply_defaults timeout: @config.rpcs.redact_image.timeout,
|
477
507
|
metadata: metadata,
|
478
508
|
retry_policy: @config.rpcs.redact_image.retry_policy
|
479
|
-
|
509
|
+
|
510
|
+
options.apply_defaults timeout: @config.timeout,
|
511
|
+
metadata: @config.metadata,
|
480
512
|
retry_policy: @config.retry_policy
|
481
513
|
|
482
514
|
@dlp_service_stub.call_rpc :redact_image, request, options: options do |response, operation|
|
@@ -562,6 +594,21 @@ module Google
|
|
562
594
|
#
|
563
595
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
564
596
|
#
|
597
|
+
# @example Basic example
|
598
|
+
# require "google/cloud/dlp/v2"
|
599
|
+
#
|
600
|
+
# # Create a client object. The client can be reused for multiple calls.
|
601
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
602
|
+
#
|
603
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
604
|
+
# request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new
|
605
|
+
#
|
606
|
+
# # Call the deidentify_content method.
|
607
|
+
# result = client.deidentify_content request
|
608
|
+
#
|
609
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse.
|
610
|
+
# p result
|
611
|
+
#
|
565
612
|
def deidentify_content request, options = nil
|
566
613
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
567
614
|
|
@@ -579,16 +626,20 @@ module Google
|
|
579
626
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
580
627
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
581
628
|
|
582
|
-
header_params = {
|
583
|
-
|
584
|
-
|
629
|
+
header_params = {}
|
630
|
+
if request.parent
|
631
|
+
header_params["parent"] = request.parent
|
632
|
+
end
|
633
|
+
|
585
634
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
586
635
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
587
636
|
|
588
637
|
options.apply_defaults timeout: @config.rpcs.deidentify_content.timeout,
|
589
638
|
metadata: metadata,
|
590
639
|
retry_policy: @config.rpcs.deidentify_content.retry_policy
|
591
|
-
|
640
|
+
|
641
|
+
options.apply_defaults timeout: @config.timeout,
|
642
|
+
metadata: @config.metadata,
|
592
643
|
retry_policy: @config.retry_policy
|
593
644
|
|
594
645
|
@dlp_service_stub.call_rpc :deidentify_content, request, options: options do |response, operation|
|
@@ -677,6 +728,21 @@ module Google
|
|
677
728
|
#
|
678
729
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
679
730
|
#
|
731
|
+
# @example Basic example
|
732
|
+
# require "google/cloud/dlp/v2"
|
733
|
+
#
|
734
|
+
# # Create a client object. The client can be reused for multiple calls.
|
735
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
736
|
+
#
|
737
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
738
|
+
# request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new
|
739
|
+
#
|
740
|
+
# # Call the reidentify_content method.
|
741
|
+
# result = client.reidentify_content request
|
742
|
+
#
|
743
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse.
|
744
|
+
# p result
|
745
|
+
#
|
680
746
|
def reidentify_content request, options = nil
|
681
747
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
682
748
|
|
@@ -694,16 +760,20 @@ module Google
|
|
694
760
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
695
761
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
696
762
|
|
697
|
-
header_params = {
|
698
|
-
|
699
|
-
|
763
|
+
header_params = {}
|
764
|
+
if request.parent
|
765
|
+
header_params["parent"] = request.parent
|
766
|
+
end
|
767
|
+
|
700
768
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
701
769
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
702
770
|
|
703
771
|
options.apply_defaults timeout: @config.rpcs.reidentify_content.timeout,
|
704
772
|
metadata: metadata,
|
705
773
|
retry_policy: @config.rpcs.reidentify_content.retry_policy
|
706
|
-
|
774
|
+
|
775
|
+
options.apply_defaults timeout: @config.timeout,
|
776
|
+
metadata: @config.metadata,
|
707
777
|
retry_policy: @config.retry_policy
|
708
778
|
|
709
779
|
@dlp_service_stub.call_rpc :reidentify_content, request, options: options do |response, operation|
|
@@ -758,6 +828,21 @@ module Google
|
|
758
828
|
#
|
759
829
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
760
830
|
#
|
831
|
+
# @example Basic example
|
832
|
+
# require "google/cloud/dlp/v2"
|
833
|
+
#
|
834
|
+
# # Create a client object. The client can be reused for multiple calls.
|
835
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
836
|
+
#
|
837
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
838
|
+
# request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new
|
839
|
+
#
|
840
|
+
# # Call the list_info_types method.
|
841
|
+
# result = client.list_info_types request
|
842
|
+
#
|
843
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse.
|
844
|
+
# p result
|
845
|
+
#
|
761
846
|
def list_info_types request, options = nil
|
762
847
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
763
848
|
|
@@ -778,7 +863,9 @@ module Google
|
|
778
863
|
options.apply_defaults timeout: @config.rpcs.list_info_types.timeout,
|
779
864
|
metadata: metadata,
|
780
865
|
retry_policy: @config.rpcs.list_info_types.retry_policy
|
781
|
-
|
866
|
+
|
867
|
+
options.apply_defaults timeout: @config.timeout,
|
868
|
+
metadata: @config.metadata,
|
782
869
|
retry_policy: @config.retry_policy
|
783
870
|
|
784
871
|
@dlp_service_stub.call_rpc :list_info_types, request, options: options do |response, operation|
|
@@ -848,6 +935,21 @@ module Google
|
|
848
935
|
#
|
849
936
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
850
937
|
#
|
938
|
+
# @example Basic example
|
939
|
+
# require "google/cloud/dlp/v2"
|
940
|
+
#
|
941
|
+
# # Create a client object. The client can be reused for multiple calls.
|
942
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
943
|
+
#
|
944
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
945
|
+
# request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new
|
946
|
+
#
|
947
|
+
# # Call the create_inspect_template method.
|
948
|
+
# result = client.create_inspect_template request
|
949
|
+
#
|
950
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate.
|
951
|
+
# p result
|
952
|
+
#
|
851
953
|
def create_inspect_template request, options = nil
|
852
954
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
853
955
|
|
@@ -865,16 +967,20 @@ module Google
|
|
865
967
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
866
968
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
867
969
|
|
868
|
-
header_params = {
|
869
|
-
|
870
|
-
|
970
|
+
header_params = {}
|
971
|
+
if request.parent
|
972
|
+
header_params["parent"] = request.parent
|
973
|
+
end
|
974
|
+
|
871
975
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
872
976
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
873
977
|
|
874
978
|
options.apply_defaults timeout: @config.rpcs.create_inspect_template.timeout,
|
875
979
|
metadata: metadata,
|
876
980
|
retry_policy: @config.rpcs.create_inspect_template.retry_policy
|
877
|
-
|
981
|
+
|
982
|
+
options.apply_defaults timeout: @config.timeout,
|
983
|
+
metadata: @config.metadata,
|
878
984
|
retry_policy: @config.retry_policy
|
879
985
|
|
880
986
|
@dlp_service_stub.call_rpc :create_inspect_template, request, options: options do |response, operation|
|
@@ -921,6 +1027,21 @@ module Google
|
|
921
1027
|
#
|
922
1028
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
923
1029
|
#
|
1030
|
+
# @example Basic example
|
1031
|
+
# require "google/cloud/dlp/v2"
|
1032
|
+
#
|
1033
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1034
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1035
|
+
#
|
1036
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1037
|
+
# request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new
|
1038
|
+
#
|
1039
|
+
# # Call the update_inspect_template method.
|
1040
|
+
# result = client.update_inspect_template request
|
1041
|
+
#
|
1042
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate.
|
1043
|
+
# p result
|
1044
|
+
#
|
924
1045
|
def update_inspect_template request, options = nil
|
925
1046
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
926
1047
|
|
@@ -938,16 +1059,20 @@ module Google
|
|
938
1059
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
939
1060
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
940
1061
|
|
941
|
-
header_params = {
|
942
|
-
|
943
|
-
|
1062
|
+
header_params = {}
|
1063
|
+
if request.name
|
1064
|
+
header_params["name"] = request.name
|
1065
|
+
end
|
1066
|
+
|
944
1067
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
945
1068
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
946
1069
|
|
947
1070
|
options.apply_defaults timeout: @config.rpcs.update_inspect_template.timeout,
|
948
1071
|
metadata: metadata,
|
949
1072
|
retry_policy: @config.rpcs.update_inspect_template.retry_policy
|
950
|
-
|
1073
|
+
|
1074
|
+
options.apply_defaults timeout: @config.timeout,
|
1075
|
+
metadata: @config.metadata,
|
951
1076
|
retry_policy: @config.retry_policy
|
952
1077
|
|
953
1078
|
@dlp_service_stub.call_rpc :update_inspect_template, request, options: options do |response, operation|
|
@@ -990,6 +1115,21 @@ module Google
|
|
990
1115
|
#
|
991
1116
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
992
1117
|
#
|
1118
|
+
# @example Basic example
|
1119
|
+
# require "google/cloud/dlp/v2"
|
1120
|
+
#
|
1121
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1122
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1123
|
+
#
|
1124
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1125
|
+
# request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new
|
1126
|
+
#
|
1127
|
+
# # Call the get_inspect_template method.
|
1128
|
+
# result = client.get_inspect_template request
|
1129
|
+
#
|
1130
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate.
|
1131
|
+
# p result
|
1132
|
+
#
|
993
1133
|
def get_inspect_template request, options = nil
|
994
1134
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
995
1135
|
|
@@ -1007,16 +1147,20 @@ module Google
|
|
1007
1147
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1008
1148
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1009
1149
|
|
1010
|
-
header_params = {
|
1011
|
-
|
1012
|
-
|
1150
|
+
header_params = {}
|
1151
|
+
if request.name
|
1152
|
+
header_params["name"] = request.name
|
1153
|
+
end
|
1154
|
+
|
1013
1155
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1014
1156
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1015
1157
|
|
1016
1158
|
options.apply_defaults timeout: @config.rpcs.get_inspect_template.timeout,
|
1017
1159
|
metadata: metadata,
|
1018
1160
|
retry_policy: @config.rpcs.get_inspect_template.retry_policy
|
1019
|
-
|
1161
|
+
|
1162
|
+
options.apply_defaults timeout: @config.timeout,
|
1163
|
+
metadata: @config.metadata,
|
1020
1164
|
retry_policy: @config.retry_policy
|
1021
1165
|
|
1022
1166
|
@dlp_service_stub.call_rpc :get_inspect_template, request, options: options do |response, operation|
|
@@ -1098,6 +1242,27 @@ module Google
|
|
1098
1242
|
#
|
1099
1243
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1100
1244
|
#
|
1245
|
+
# @example Basic example
|
1246
|
+
# require "google/cloud/dlp/v2"
|
1247
|
+
#
|
1248
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1249
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1250
|
+
#
|
1251
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1252
|
+
# request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new
|
1253
|
+
#
|
1254
|
+
# # Call the list_inspect_templates method.
|
1255
|
+
# result = client.list_inspect_templates request
|
1256
|
+
#
|
1257
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1258
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1259
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1260
|
+
# # methods are also available for managing paging directly.
|
1261
|
+
# result.each do |response|
|
1262
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate.
|
1263
|
+
# p response
|
1264
|
+
# end
|
1265
|
+
#
|
1101
1266
|
def list_inspect_templates request, options = nil
|
1102
1267
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1103
1268
|
|
@@ -1115,16 +1280,20 @@ module Google
|
|
1115
1280
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1116
1281
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1117
1282
|
|
1118
|
-
header_params = {
|
1119
|
-
|
1120
|
-
|
1283
|
+
header_params = {}
|
1284
|
+
if request.parent
|
1285
|
+
header_params["parent"] = request.parent
|
1286
|
+
end
|
1287
|
+
|
1121
1288
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1122
1289
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1123
1290
|
|
1124
1291
|
options.apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout,
|
1125
1292
|
metadata: metadata,
|
1126
1293
|
retry_policy: @config.rpcs.list_inspect_templates.retry_policy
|
1127
|
-
|
1294
|
+
|
1295
|
+
options.apply_defaults timeout: @config.timeout,
|
1296
|
+
metadata: @config.metadata,
|
1128
1297
|
retry_policy: @config.retry_policy
|
1129
1298
|
|
1130
1299
|
@dlp_service_stub.call_rpc :list_inspect_templates, request, options: options do |response, operation|
|
@@ -1168,6 +1337,21 @@ module Google
|
|
1168
1337
|
#
|
1169
1338
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1170
1339
|
#
|
1340
|
+
# @example Basic example
|
1341
|
+
# require "google/cloud/dlp/v2"
|
1342
|
+
#
|
1343
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1344
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1345
|
+
#
|
1346
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1347
|
+
# request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new
|
1348
|
+
#
|
1349
|
+
# # Call the delete_inspect_template method.
|
1350
|
+
# result = client.delete_inspect_template request
|
1351
|
+
#
|
1352
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1353
|
+
# p result
|
1354
|
+
#
|
1171
1355
|
def delete_inspect_template request, options = nil
|
1172
1356
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1173
1357
|
|
@@ -1185,16 +1369,20 @@ module Google
|
|
1185
1369
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1186
1370
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1187
1371
|
|
1188
|
-
header_params = {
|
1189
|
-
|
1190
|
-
|
1372
|
+
header_params = {}
|
1373
|
+
if request.name
|
1374
|
+
header_params["name"] = request.name
|
1375
|
+
end
|
1376
|
+
|
1191
1377
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1192
1378
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1193
1379
|
|
1194
1380
|
options.apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout,
|
1195
1381
|
metadata: metadata,
|
1196
1382
|
retry_policy: @config.rpcs.delete_inspect_template.retry_policy
|
1197
|
-
|
1383
|
+
|
1384
|
+
options.apply_defaults timeout: @config.timeout,
|
1385
|
+
metadata: @config.metadata,
|
1198
1386
|
retry_policy: @config.retry_policy
|
1199
1387
|
|
1200
1388
|
@dlp_service_stub.call_rpc :delete_inspect_template, request, options: options do |response, operation|
|
@@ -1265,6 +1453,21 @@ module Google
|
|
1265
1453
|
#
|
1266
1454
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1267
1455
|
#
|
1456
|
+
# @example Basic example
|
1457
|
+
# require "google/cloud/dlp/v2"
|
1458
|
+
#
|
1459
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1460
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1461
|
+
#
|
1462
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1463
|
+
# request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new
|
1464
|
+
#
|
1465
|
+
# # Call the create_deidentify_template method.
|
1466
|
+
# result = client.create_deidentify_template request
|
1467
|
+
#
|
1468
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate.
|
1469
|
+
# p result
|
1470
|
+
#
|
1268
1471
|
def create_deidentify_template request, options = nil
|
1269
1472
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1270
1473
|
|
@@ -1282,16 +1485,20 @@ module Google
|
|
1282
1485
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1283
1486
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1284
1487
|
|
1285
|
-
header_params = {
|
1286
|
-
|
1287
|
-
|
1488
|
+
header_params = {}
|
1489
|
+
if request.parent
|
1490
|
+
header_params["parent"] = request.parent
|
1491
|
+
end
|
1492
|
+
|
1288
1493
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1289
1494
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1290
1495
|
|
1291
1496
|
options.apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout,
|
1292
1497
|
metadata: metadata,
|
1293
1498
|
retry_policy: @config.rpcs.create_deidentify_template.retry_policy
|
1294
|
-
|
1499
|
+
|
1500
|
+
options.apply_defaults timeout: @config.timeout,
|
1501
|
+
metadata: @config.metadata,
|
1295
1502
|
retry_policy: @config.retry_policy
|
1296
1503
|
|
1297
1504
|
@dlp_service_stub.call_rpc :create_deidentify_template, request, options: options do |response, operation|
|
@@ -1339,6 +1546,21 @@ module Google
|
|
1339
1546
|
#
|
1340
1547
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1341
1548
|
#
|
1549
|
+
# @example Basic example
|
1550
|
+
# require "google/cloud/dlp/v2"
|
1551
|
+
#
|
1552
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1553
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1554
|
+
#
|
1555
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1556
|
+
# request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new
|
1557
|
+
#
|
1558
|
+
# # Call the update_deidentify_template method.
|
1559
|
+
# result = client.update_deidentify_template request
|
1560
|
+
#
|
1561
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate.
|
1562
|
+
# p result
|
1563
|
+
#
|
1342
1564
|
def update_deidentify_template request, options = nil
|
1343
1565
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1344
1566
|
|
@@ -1356,16 +1578,20 @@ module Google
|
|
1356
1578
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1357
1579
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1358
1580
|
|
1359
|
-
header_params = {
|
1360
|
-
|
1361
|
-
|
1581
|
+
header_params = {}
|
1582
|
+
if request.name
|
1583
|
+
header_params["name"] = request.name
|
1584
|
+
end
|
1585
|
+
|
1362
1586
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1363
1587
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1364
1588
|
|
1365
1589
|
options.apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout,
|
1366
1590
|
metadata: metadata,
|
1367
1591
|
retry_policy: @config.rpcs.update_deidentify_template.retry_policy
|
1368
|
-
|
1592
|
+
|
1593
|
+
options.apply_defaults timeout: @config.timeout,
|
1594
|
+
metadata: @config.metadata,
|
1369
1595
|
retry_policy: @config.retry_policy
|
1370
1596
|
|
1371
1597
|
@dlp_service_stub.call_rpc :update_deidentify_template, request, options: options do |response, operation|
|
@@ -1409,6 +1635,21 @@ module Google
|
|
1409
1635
|
#
|
1410
1636
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1411
1637
|
#
|
1638
|
+
# @example Basic example
|
1639
|
+
# require "google/cloud/dlp/v2"
|
1640
|
+
#
|
1641
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1642
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1643
|
+
#
|
1644
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1645
|
+
# request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new
|
1646
|
+
#
|
1647
|
+
# # Call the get_deidentify_template method.
|
1648
|
+
# result = client.get_deidentify_template request
|
1649
|
+
#
|
1650
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate.
|
1651
|
+
# p result
|
1652
|
+
#
|
1412
1653
|
def get_deidentify_template request, options = nil
|
1413
1654
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1414
1655
|
|
@@ -1426,16 +1667,20 @@ module Google
|
|
1426
1667
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1427
1668
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1428
1669
|
|
1429
|
-
header_params = {
|
1430
|
-
|
1431
|
-
|
1670
|
+
header_params = {}
|
1671
|
+
if request.name
|
1672
|
+
header_params["name"] = request.name
|
1673
|
+
end
|
1674
|
+
|
1432
1675
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1433
1676
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1434
1677
|
|
1435
1678
|
options.apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout,
|
1436
1679
|
metadata: metadata,
|
1437
1680
|
retry_policy: @config.rpcs.get_deidentify_template.retry_policy
|
1438
|
-
|
1681
|
+
|
1682
|
+
options.apply_defaults timeout: @config.timeout,
|
1683
|
+
metadata: @config.metadata,
|
1439
1684
|
retry_policy: @config.retry_policy
|
1440
1685
|
|
1441
1686
|
@dlp_service_stub.call_rpc :get_deidentify_template, request, options: options do |response, operation|
|
@@ -1518,6 +1763,27 @@ module Google
|
|
1518
1763
|
#
|
1519
1764
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1520
1765
|
#
|
1766
|
+
# @example Basic example
|
1767
|
+
# require "google/cloud/dlp/v2"
|
1768
|
+
#
|
1769
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1770
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1771
|
+
#
|
1772
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1773
|
+
# request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new
|
1774
|
+
#
|
1775
|
+
# # Call the list_deidentify_templates method.
|
1776
|
+
# result = client.list_deidentify_templates request
|
1777
|
+
#
|
1778
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1779
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1780
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1781
|
+
# # methods are also available for managing paging directly.
|
1782
|
+
# result.each do |response|
|
1783
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate.
|
1784
|
+
# p response
|
1785
|
+
# end
|
1786
|
+
#
|
1521
1787
|
def list_deidentify_templates request, options = nil
|
1522
1788
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1523
1789
|
|
@@ -1535,16 +1801,20 @@ module Google
|
|
1535
1801
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1536
1802
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1537
1803
|
|
1538
|
-
header_params = {
|
1539
|
-
|
1540
|
-
|
1804
|
+
header_params = {}
|
1805
|
+
if request.parent
|
1806
|
+
header_params["parent"] = request.parent
|
1807
|
+
end
|
1808
|
+
|
1541
1809
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1542
1810
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1543
1811
|
|
1544
1812
|
options.apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout,
|
1545
1813
|
metadata: metadata,
|
1546
1814
|
retry_policy: @config.rpcs.list_deidentify_templates.retry_policy
|
1547
|
-
|
1815
|
+
|
1816
|
+
options.apply_defaults timeout: @config.timeout,
|
1817
|
+
metadata: @config.metadata,
|
1548
1818
|
retry_policy: @config.retry_policy
|
1549
1819
|
|
1550
1820
|
@dlp_service_stub.call_rpc :list_deidentify_templates, request, options: options do |response, operation|
|
@@ -1589,6 +1859,21 @@ module Google
|
|
1589
1859
|
#
|
1590
1860
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1591
1861
|
#
|
1862
|
+
# @example Basic example
|
1863
|
+
# require "google/cloud/dlp/v2"
|
1864
|
+
#
|
1865
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1866
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1867
|
+
#
|
1868
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1869
|
+
# request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new
|
1870
|
+
#
|
1871
|
+
# # Call the delete_deidentify_template method.
|
1872
|
+
# result = client.delete_deidentify_template request
|
1873
|
+
#
|
1874
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1875
|
+
# p result
|
1876
|
+
#
|
1592
1877
|
def delete_deidentify_template request, options = nil
|
1593
1878
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1594
1879
|
|
@@ -1606,16 +1891,20 @@ module Google
|
|
1606
1891
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1607
1892
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1608
1893
|
|
1609
|
-
header_params = {
|
1610
|
-
|
1611
|
-
|
1894
|
+
header_params = {}
|
1895
|
+
if request.name
|
1896
|
+
header_params["name"] = request.name
|
1897
|
+
end
|
1898
|
+
|
1612
1899
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1613
1900
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1614
1901
|
|
1615
1902
|
options.apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout,
|
1616
1903
|
metadata: metadata,
|
1617
1904
|
retry_policy: @config.rpcs.delete_deidentify_template.retry_policy
|
1618
|
-
|
1905
|
+
|
1906
|
+
options.apply_defaults timeout: @config.timeout,
|
1907
|
+
metadata: @config.metadata,
|
1619
1908
|
retry_policy: @config.retry_policy
|
1620
1909
|
|
1621
1910
|
@dlp_service_stub.call_rpc :delete_deidentify_template, request, options: options do |response, operation|
|
@@ -1681,6 +1970,21 @@ module Google
|
|
1681
1970
|
#
|
1682
1971
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1683
1972
|
#
|
1973
|
+
# @example Basic example
|
1974
|
+
# require "google/cloud/dlp/v2"
|
1975
|
+
#
|
1976
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1977
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
1978
|
+
#
|
1979
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1980
|
+
# request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new
|
1981
|
+
#
|
1982
|
+
# # Call the create_job_trigger method.
|
1983
|
+
# result = client.create_job_trigger request
|
1984
|
+
#
|
1985
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger.
|
1986
|
+
# p result
|
1987
|
+
#
|
1684
1988
|
def create_job_trigger request, options = nil
|
1685
1989
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1686
1990
|
|
@@ -1698,16 +2002,20 @@ module Google
|
|
1698
2002
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1699
2003
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1700
2004
|
|
1701
|
-
header_params = {
|
1702
|
-
|
1703
|
-
|
2005
|
+
header_params = {}
|
2006
|
+
if request.parent
|
2007
|
+
header_params["parent"] = request.parent
|
2008
|
+
end
|
2009
|
+
|
1704
2010
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1705
2011
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1706
2012
|
|
1707
2013
|
options.apply_defaults timeout: @config.rpcs.create_job_trigger.timeout,
|
1708
2014
|
metadata: metadata,
|
1709
2015
|
retry_policy: @config.rpcs.create_job_trigger.retry_policy
|
1710
|
-
|
2016
|
+
|
2017
|
+
options.apply_defaults timeout: @config.timeout,
|
2018
|
+
metadata: @config.metadata,
|
1711
2019
|
retry_policy: @config.retry_policy
|
1712
2020
|
|
1713
2021
|
@dlp_service_stub.call_rpc :create_job_trigger, request, options: options do |response, operation|
|
@@ -1753,6 +2061,21 @@ module Google
|
|
1753
2061
|
#
|
1754
2062
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1755
2063
|
#
|
2064
|
+
# @example Basic example
|
2065
|
+
# require "google/cloud/dlp/v2"
|
2066
|
+
#
|
2067
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2068
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2069
|
+
#
|
2070
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2071
|
+
# request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new
|
2072
|
+
#
|
2073
|
+
# # Call the update_job_trigger method.
|
2074
|
+
# result = client.update_job_trigger request
|
2075
|
+
#
|
2076
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger.
|
2077
|
+
# p result
|
2078
|
+
#
|
1756
2079
|
def update_job_trigger request, options = nil
|
1757
2080
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1758
2081
|
|
@@ -1770,16 +2093,20 @@ module Google
|
|
1770
2093
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1771
2094
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1772
2095
|
|
1773
|
-
header_params = {
|
1774
|
-
|
1775
|
-
|
2096
|
+
header_params = {}
|
2097
|
+
if request.name
|
2098
|
+
header_params["name"] = request.name
|
2099
|
+
end
|
2100
|
+
|
1776
2101
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1777
2102
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1778
2103
|
|
1779
2104
|
options.apply_defaults timeout: @config.rpcs.update_job_trigger.timeout,
|
1780
2105
|
metadata: metadata,
|
1781
2106
|
retry_policy: @config.rpcs.update_job_trigger.retry_policy
|
1782
|
-
|
2107
|
+
|
2108
|
+
options.apply_defaults timeout: @config.timeout,
|
2109
|
+
metadata: @config.metadata,
|
1783
2110
|
retry_policy: @config.retry_policy
|
1784
2111
|
|
1785
2112
|
@dlp_service_stub.call_rpc :update_job_trigger, request, options: options do |response, operation|
|
@@ -1794,9 +2121,6 @@ module Google
|
|
1794
2121
|
# Inspect hybrid content and store findings to a trigger. The inspection
|
1795
2122
|
# will be processed asynchronously. To review the findings monitor the
|
1796
2123
|
# jobs within the trigger.
|
1797
|
-
# Early access feature is in a pre-release state and might change or have
|
1798
|
-
# limited support. For more information, see
|
1799
|
-
# https://cloud.google.com/products#product-launch-stages.
|
1800
2124
|
#
|
1801
2125
|
# @overload hybrid_inspect_job_trigger(request, options = nil)
|
1802
2126
|
# Pass arguments to `hybrid_inspect_job_trigger` via a request object, either of type
|
@@ -1827,6 +2151,21 @@ module Google
|
|
1827
2151
|
#
|
1828
2152
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1829
2153
|
#
|
2154
|
+
# @example Basic example
|
2155
|
+
# require "google/cloud/dlp/v2"
|
2156
|
+
#
|
2157
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2158
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2159
|
+
#
|
2160
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2161
|
+
# request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new
|
2162
|
+
#
|
2163
|
+
# # Call the hybrid_inspect_job_trigger method.
|
2164
|
+
# result = client.hybrid_inspect_job_trigger request
|
2165
|
+
#
|
2166
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse.
|
2167
|
+
# p result
|
2168
|
+
#
|
1830
2169
|
def hybrid_inspect_job_trigger request, options = nil
|
1831
2170
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1832
2171
|
|
@@ -1844,16 +2183,20 @@ module Google
|
|
1844
2183
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1845
2184
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1846
2185
|
|
1847
|
-
header_params = {
|
1848
|
-
|
1849
|
-
|
2186
|
+
header_params = {}
|
2187
|
+
if request.name
|
2188
|
+
header_params["name"] = request.name
|
2189
|
+
end
|
2190
|
+
|
1850
2191
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1851
2192
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1852
2193
|
|
1853
2194
|
options.apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout,
|
1854
2195
|
metadata: metadata,
|
1855
2196
|
retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy
|
1856
|
-
|
2197
|
+
|
2198
|
+
options.apply_defaults timeout: @config.timeout,
|
2199
|
+
metadata: @config.metadata,
|
1857
2200
|
retry_policy: @config.retry_policy
|
1858
2201
|
|
1859
2202
|
@dlp_service_stub.call_rpc :hybrid_inspect_job_trigger, request, options: options do |response, operation|
|
@@ -1895,6 +2238,21 @@ module Google
|
|
1895
2238
|
#
|
1896
2239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1897
2240
|
#
|
2241
|
+
# @example Basic example
|
2242
|
+
# require "google/cloud/dlp/v2"
|
2243
|
+
#
|
2244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2245
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2246
|
+
#
|
2247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2248
|
+
# request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new
|
2249
|
+
#
|
2250
|
+
# # Call the get_job_trigger method.
|
2251
|
+
# result = client.get_job_trigger request
|
2252
|
+
#
|
2253
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger.
|
2254
|
+
# p result
|
2255
|
+
#
|
1898
2256
|
def get_job_trigger request, options = nil
|
1899
2257
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1900
2258
|
|
@@ -1912,16 +2270,20 @@ module Google
|
|
1912
2270
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1913
2271
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1914
2272
|
|
1915
|
-
header_params = {
|
1916
|
-
|
1917
|
-
|
2273
|
+
header_params = {}
|
2274
|
+
if request.name
|
2275
|
+
header_params["name"] = request.name
|
2276
|
+
end
|
2277
|
+
|
1918
2278
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1919
2279
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1920
2280
|
|
1921
2281
|
options.apply_defaults timeout: @config.rpcs.get_job_trigger.timeout,
|
1922
2282
|
metadata: metadata,
|
1923
2283
|
retry_policy: @config.rpcs.get_job_trigger.retry_policy
|
1924
|
-
|
2284
|
+
|
2285
|
+
options.apply_defaults timeout: @config.timeout,
|
2286
|
+
metadata: @config.metadata,
|
1925
2287
|
retry_policy: @config.retry_policy
|
1926
2288
|
|
1927
2289
|
@dlp_service_stub.call_rpc :get_job_trigger, request, options: options do |response, operation|
|
@@ -1946,7 +2308,7 @@ module Google
|
|
1946
2308
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1947
2309
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1948
2310
|
#
|
1949
|
-
# @overload list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, location_id: nil)
|
2311
|
+
# @overload list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, type: nil, location_id: nil)
|
1950
2312
|
# Pass arguments to `list_job_triggers` via keyword arguments. Note that at
|
1951
2313
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1952
2314
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1999,7 +2361,7 @@ module Google
|
|
1999
2361
|
# * Restrictions can be combined by `AND` or `OR` logical operators. A
|
2000
2362
|
# sequence of restrictions implicitly uses `AND`.
|
2001
2363
|
# * A restriction has the form of `{field} {operator} {value}`.
|
2002
|
-
# * Supported fields/values for inspect
|
2364
|
+
# * Supported fields/values for inspect triggers:
|
2003
2365
|
# - `status` - HEALTHY|PAUSED|CANCELLED
|
2004
2366
|
# - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
|
2005
2367
|
# - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
|
@@ -2015,6 +2377,8 @@ module Google
|
|
2015
2377
|
# * last_run_time > \"2017-12-12T00:00:00+00:00\"
|
2016
2378
|
#
|
2017
2379
|
# The length of this field should be no more than 500 characters.
|
2380
|
+
# @param type [::Google::Cloud::Dlp::V2::DlpJobType]
|
2381
|
+
# The type of jobs. Will use `DlpJobType.INSPECT` if not set.
|
2018
2382
|
# @param location_id [::String]
|
2019
2383
|
# Deprecated. This field has no effect.
|
2020
2384
|
#
|
@@ -2026,6 +2390,27 @@ module Google
|
|
2026
2390
|
#
|
2027
2391
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2028
2392
|
#
|
2393
|
+
# @example Basic example
|
2394
|
+
# require "google/cloud/dlp/v2"
|
2395
|
+
#
|
2396
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2397
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2398
|
+
#
|
2399
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2400
|
+
# request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new
|
2401
|
+
#
|
2402
|
+
# # Call the list_job_triggers method.
|
2403
|
+
# result = client.list_job_triggers request
|
2404
|
+
#
|
2405
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2406
|
+
# # iterate over all elements by calling #each, and the enumerable
|
2407
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
2408
|
+
# # methods are also available for managing paging directly.
|
2409
|
+
# result.each do |response|
|
2410
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger.
|
2411
|
+
# p response
|
2412
|
+
# end
|
2413
|
+
#
|
2029
2414
|
def list_job_triggers request, options = nil
|
2030
2415
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2031
2416
|
|
@@ -2043,16 +2428,20 @@ module Google
|
|
2043
2428
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2044
2429
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2045
2430
|
|
2046
|
-
header_params = {
|
2047
|
-
|
2048
|
-
|
2431
|
+
header_params = {}
|
2432
|
+
if request.parent
|
2433
|
+
header_params["parent"] = request.parent
|
2434
|
+
end
|
2435
|
+
|
2049
2436
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2050
2437
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2051
2438
|
|
2052
2439
|
options.apply_defaults timeout: @config.rpcs.list_job_triggers.timeout,
|
2053
2440
|
metadata: metadata,
|
2054
2441
|
retry_policy: @config.rpcs.list_job_triggers.retry_policy
|
2055
|
-
|
2442
|
+
|
2443
|
+
options.apply_defaults timeout: @config.timeout,
|
2444
|
+
metadata: @config.metadata,
|
2056
2445
|
retry_policy: @config.retry_policy
|
2057
2446
|
|
2058
2447
|
@dlp_service_stub.call_rpc :list_job_triggers, request, options: options do |response, operation|
|
@@ -2095,6 +2484,21 @@ module Google
|
|
2095
2484
|
#
|
2096
2485
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2097
2486
|
#
|
2487
|
+
# @example Basic example
|
2488
|
+
# require "google/cloud/dlp/v2"
|
2489
|
+
#
|
2490
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2491
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2492
|
+
#
|
2493
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2494
|
+
# request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new
|
2495
|
+
#
|
2496
|
+
# # Call the delete_job_trigger method.
|
2497
|
+
# result = client.delete_job_trigger request
|
2498
|
+
#
|
2499
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
2500
|
+
# p result
|
2501
|
+
#
|
2098
2502
|
def delete_job_trigger request, options = nil
|
2099
2503
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2100
2504
|
|
@@ -2112,16 +2516,20 @@ module Google
|
|
2112
2516
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2113
2517
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2114
2518
|
|
2115
|
-
header_params = {
|
2116
|
-
|
2117
|
-
|
2519
|
+
header_params = {}
|
2520
|
+
if request.name
|
2521
|
+
header_params["name"] = request.name
|
2522
|
+
end
|
2523
|
+
|
2118
2524
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2119
2525
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2120
2526
|
|
2121
2527
|
options.apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout,
|
2122
2528
|
metadata: metadata,
|
2123
2529
|
retry_policy: @config.rpcs.delete_job_trigger.retry_policy
|
2124
|
-
|
2530
|
+
|
2531
|
+
options.apply_defaults timeout: @config.timeout,
|
2532
|
+
metadata: @config.metadata,
|
2125
2533
|
retry_policy: @config.retry_policy
|
2126
2534
|
|
2127
2535
|
@dlp_service_stub.call_rpc :delete_job_trigger, request, options: options do |response, operation|
|
@@ -2163,6 +2571,21 @@ module Google
|
|
2163
2571
|
#
|
2164
2572
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2165
2573
|
#
|
2574
|
+
# @example Basic example
|
2575
|
+
# require "google/cloud/dlp/v2"
|
2576
|
+
#
|
2577
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2578
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2579
|
+
#
|
2580
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2581
|
+
# request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new
|
2582
|
+
#
|
2583
|
+
# # Call the activate_job_trigger method.
|
2584
|
+
# result = client.activate_job_trigger request
|
2585
|
+
#
|
2586
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::DlpJob.
|
2587
|
+
# p result
|
2588
|
+
#
|
2166
2589
|
def activate_job_trigger request, options = nil
|
2167
2590
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2168
2591
|
|
@@ -2180,16 +2603,20 @@ module Google
|
|
2180
2603
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2181
2604
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2182
2605
|
|
2183
|
-
header_params = {
|
2184
|
-
|
2185
|
-
|
2606
|
+
header_params = {}
|
2607
|
+
if request.name
|
2608
|
+
header_params["name"] = request.name
|
2609
|
+
end
|
2610
|
+
|
2186
2611
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2187
2612
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2188
2613
|
|
2189
2614
|
options.apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout,
|
2190
2615
|
metadata: metadata,
|
2191
2616
|
retry_policy: @config.rpcs.activate_job_trigger.retry_policy
|
2192
|
-
|
2617
|
+
|
2618
|
+
options.apply_defaults timeout: @config.timeout,
|
2619
|
+
metadata: @config.metadata,
|
2193
2620
|
retry_policy: @config.retry_policy
|
2194
2621
|
|
2195
2622
|
@dlp_service_stub.call_rpc :activate_job_trigger, request, options: options do |response, operation|
|
@@ -2242,9 +2669,10 @@ module Google
|
|
2242
2669
|
#
|
2243
2670
|
# parent=projects/example-project/locations/europe-west3
|
2244
2671
|
# @param inspect_job [::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash]
|
2245
|
-
#
|
2672
|
+
# An inspection job scans a storage repository for InfoTypes.
|
2246
2673
|
# @param risk_job [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash]
|
2247
|
-
#
|
2674
|
+
# A risk analysis job calculates re-identification risk metrics for a
|
2675
|
+
# BigQuery table.
|
2248
2676
|
# @param job_id [::String]
|
2249
2677
|
# The job id can contain uppercase and lowercase letters,
|
2250
2678
|
# numbers, and hyphens; that is, it must match the regular
|
@@ -2261,6 +2689,21 @@ module Google
|
|
2261
2689
|
#
|
2262
2690
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2263
2691
|
#
|
2692
|
+
# @example Basic example
|
2693
|
+
# require "google/cloud/dlp/v2"
|
2694
|
+
#
|
2695
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2696
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2697
|
+
#
|
2698
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2699
|
+
# request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new
|
2700
|
+
#
|
2701
|
+
# # Call the create_dlp_job method.
|
2702
|
+
# result = client.create_dlp_job request
|
2703
|
+
#
|
2704
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::DlpJob.
|
2705
|
+
# p result
|
2706
|
+
#
|
2264
2707
|
def create_dlp_job request, options = nil
|
2265
2708
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2266
2709
|
|
@@ -2278,16 +2721,20 @@ module Google
|
|
2278
2721
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2279
2722
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2280
2723
|
|
2281
|
-
header_params = {
|
2282
|
-
|
2283
|
-
|
2724
|
+
header_params = {}
|
2725
|
+
if request.parent
|
2726
|
+
header_params["parent"] = request.parent
|
2727
|
+
end
|
2728
|
+
|
2284
2729
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2285
2730
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2286
2731
|
|
2287
2732
|
options.apply_defaults timeout: @config.rpcs.create_dlp_job.timeout,
|
2288
2733
|
metadata: metadata,
|
2289
2734
|
retry_policy: @config.rpcs.create_dlp_job.retry_policy
|
2290
|
-
|
2735
|
+
|
2736
|
+
options.apply_defaults timeout: @config.timeout,
|
2737
|
+
metadata: @config.metadata,
|
2291
2738
|
retry_policy: @config.retry_policy
|
2292
2739
|
|
2293
2740
|
@dlp_service_stub.call_rpc :create_dlp_job, request, options: options do |response, operation|
|
@@ -2395,6 +2842,27 @@ module Google
|
|
2395
2842
|
#
|
2396
2843
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2397
2844
|
#
|
2845
|
+
# @example Basic example
|
2846
|
+
# require "google/cloud/dlp/v2"
|
2847
|
+
#
|
2848
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2849
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2850
|
+
#
|
2851
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2852
|
+
# request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new
|
2853
|
+
#
|
2854
|
+
# # Call the list_dlp_jobs method.
|
2855
|
+
# result = client.list_dlp_jobs request
|
2856
|
+
#
|
2857
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2858
|
+
# # iterate over all elements by calling #each, and the enumerable
|
2859
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
2860
|
+
# # methods are also available for managing paging directly.
|
2861
|
+
# result.each do |response|
|
2862
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob.
|
2863
|
+
# p response
|
2864
|
+
# end
|
2865
|
+
#
|
2398
2866
|
def list_dlp_jobs request, options = nil
|
2399
2867
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2400
2868
|
|
@@ -2412,16 +2880,20 @@ module Google
|
|
2412
2880
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2413
2881
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2414
2882
|
|
2415
|
-
header_params = {
|
2416
|
-
|
2417
|
-
|
2883
|
+
header_params = {}
|
2884
|
+
if request.parent
|
2885
|
+
header_params["parent"] = request.parent
|
2886
|
+
end
|
2887
|
+
|
2418
2888
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2419
2889
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2420
2890
|
|
2421
2891
|
options.apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout,
|
2422
2892
|
metadata: metadata,
|
2423
2893
|
retry_policy: @config.rpcs.list_dlp_jobs.retry_policy
|
2424
|
-
|
2894
|
+
|
2895
|
+
options.apply_defaults timeout: @config.timeout,
|
2896
|
+
metadata: @config.metadata,
|
2425
2897
|
retry_policy: @config.retry_policy
|
2426
2898
|
|
2427
2899
|
@dlp_service_stub.call_rpc :list_dlp_jobs, request, options: options do |response, operation|
|
@@ -2464,6 +2936,21 @@ module Google
|
|
2464
2936
|
#
|
2465
2937
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2466
2938
|
#
|
2939
|
+
# @example Basic example
|
2940
|
+
# require "google/cloud/dlp/v2"
|
2941
|
+
#
|
2942
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2943
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
2944
|
+
#
|
2945
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2946
|
+
# request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new
|
2947
|
+
#
|
2948
|
+
# # Call the get_dlp_job method.
|
2949
|
+
# result = client.get_dlp_job request
|
2950
|
+
#
|
2951
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::DlpJob.
|
2952
|
+
# p result
|
2953
|
+
#
|
2467
2954
|
def get_dlp_job request, options = nil
|
2468
2955
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2469
2956
|
|
@@ -2481,16 +2968,20 @@ module Google
|
|
2481
2968
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2482
2969
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2483
2970
|
|
2484
|
-
header_params = {
|
2485
|
-
|
2486
|
-
|
2971
|
+
header_params = {}
|
2972
|
+
if request.name
|
2973
|
+
header_params["name"] = request.name
|
2974
|
+
end
|
2975
|
+
|
2487
2976
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2488
2977
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2489
2978
|
|
2490
2979
|
options.apply_defaults timeout: @config.rpcs.get_dlp_job.timeout,
|
2491
2980
|
metadata: metadata,
|
2492
2981
|
retry_policy: @config.rpcs.get_dlp_job.retry_policy
|
2493
|
-
|
2982
|
+
|
2983
|
+
options.apply_defaults timeout: @config.timeout,
|
2984
|
+
metadata: @config.metadata,
|
2494
2985
|
retry_policy: @config.retry_policy
|
2495
2986
|
|
2496
2987
|
@dlp_service_stub.call_rpc :get_dlp_job, request, options: options do |response, operation|
|
@@ -2534,6 +3025,21 @@ module Google
|
|
2534
3025
|
#
|
2535
3026
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2536
3027
|
#
|
3028
|
+
# @example Basic example
|
3029
|
+
# require "google/cloud/dlp/v2"
|
3030
|
+
#
|
3031
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3032
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3033
|
+
#
|
3034
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3035
|
+
# request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new
|
3036
|
+
#
|
3037
|
+
# # Call the delete_dlp_job method.
|
3038
|
+
# result = client.delete_dlp_job request
|
3039
|
+
#
|
3040
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3041
|
+
# p result
|
3042
|
+
#
|
2537
3043
|
def delete_dlp_job request, options = nil
|
2538
3044
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2539
3045
|
|
@@ -2551,16 +3057,20 @@ module Google
|
|
2551
3057
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2552
3058
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2553
3059
|
|
2554
|
-
header_params = {
|
2555
|
-
|
2556
|
-
|
3060
|
+
header_params = {}
|
3061
|
+
if request.name
|
3062
|
+
header_params["name"] = request.name
|
3063
|
+
end
|
3064
|
+
|
2557
3065
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2558
3066
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2559
3067
|
|
2560
3068
|
options.apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout,
|
2561
3069
|
metadata: metadata,
|
2562
3070
|
retry_policy: @config.rpcs.delete_dlp_job.retry_policy
|
2563
|
-
|
3071
|
+
|
3072
|
+
options.apply_defaults timeout: @config.timeout,
|
3073
|
+
metadata: @config.metadata,
|
2564
3074
|
retry_policy: @config.retry_policy
|
2565
3075
|
|
2566
3076
|
@dlp_service_stub.call_rpc :delete_dlp_job, request, options: options do |response, operation|
|
@@ -2604,6 +3114,21 @@ module Google
|
|
2604
3114
|
#
|
2605
3115
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2606
3116
|
#
|
3117
|
+
# @example Basic example
|
3118
|
+
# require "google/cloud/dlp/v2"
|
3119
|
+
#
|
3120
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3121
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3122
|
+
#
|
3123
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3124
|
+
# request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new
|
3125
|
+
#
|
3126
|
+
# # Call the cancel_dlp_job method.
|
3127
|
+
# result = client.cancel_dlp_job request
|
3128
|
+
#
|
3129
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3130
|
+
# p result
|
3131
|
+
#
|
2607
3132
|
def cancel_dlp_job request, options = nil
|
2608
3133
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2609
3134
|
|
@@ -2621,16 +3146,20 @@ module Google
|
|
2621
3146
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2622
3147
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2623
3148
|
|
2624
|
-
header_params = {
|
2625
|
-
|
2626
|
-
|
3149
|
+
header_params = {}
|
3150
|
+
if request.name
|
3151
|
+
header_params["name"] = request.name
|
3152
|
+
end
|
3153
|
+
|
2627
3154
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2628
3155
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2629
3156
|
|
2630
3157
|
options.apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout,
|
2631
3158
|
metadata: metadata,
|
2632
3159
|
retry_policy: @config.rpcs.cancel_dlp_job.retry_policy
|
2633
|
-
|
3160
|
+
|
3161
|
+
options.apply_defaults timeout: @config.timeout,
|
3162
|
+
metadata: @config.metadata,
|
2634
3163
|
retry_policy: @config.retry_policy
|
2635
3164
|
|
2636
3165
|
@dlp_service_stub.call_rpc :cancel_dlp_job, request, options: options do |response, operation|
|
@@ -2700,6 +3229,21 @@ module Google
|
|
2700
3229
|
#
|
2701
3230
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2702
3231
|
#
|
3232
|
+
# @example Basic example
|
3233
|
+
# require "google/cloud/dlp/v2"
|
3234
|
+
#
|
3235
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3236
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3237
|
+
#
|
3238
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3239
|
+
# request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new
|
3240
|
+
#
|
3241
|
+
# # Call the create_stored_info_type method.
|
3242
|
+
# result = client.create_stored_info_type request
|
3243
|
+
#
|
3244
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType.
|
3245
|
+
# p result
|
3246
|
+
#
|
2703
3247
|
def create_stored_info_type request, options = nil
|
2704
3248
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2705
3249
|
|
@@ -2717,16 +3261,20 @@ module Google
|
|
2717
3261
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2718
3262
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2719
3263
|
|
2720
|
-
header_params = {
|
2721
|
-
|
2722
|
-
|
3264
|
+
header_params = {}
|
3265
|
+
if request.parent
|
3266
|
+
header_params["parent"] = request.parent
|
3267
|
+
end
|
3268
|
+
|
2723
3269
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2724
3270
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2725
3271
|
|
2726
3272
|
options.apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout,
|
2727
3273
|
metadata: metadata,
|
2728
3274
|
retry_policy: @config.rpcs.create_stored_info_type.retry_policy
|
2729
|
-
|
3275
|
+
|
3276
|
+
options.apply_defaults timeout: @config.timeout,
|
3277
|
+
metadata: @config.metadata,
|
2730
3278
|
retry_policy: @config.retry_policy
|
2731
3279
|
|
2732
3280
|
@dlp_service_stub.call_rpc :create_stored_info_type, request, options: options do |response, operation|
|
@@ -2777,6 +3325,21 @@ module Google
|
|
2777
3325
|
#
|
2778
3326
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2779
3327
|
#
|
3328
|
+
# @example Basic example
|
3329
|
+
# require "google/cloud/dlp/v2"
|
3330
|
+
#
|
3331
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3332
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3333
|
+
#
|
3334
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3335
|
+
# request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new
|
3336
|
+
#
|
3337
|
+
# # Call the update_stored_info_type method.
|
3338
|
+
# result = client.update_stored_info_type request
|
3339
|
+
#
|
3340
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType.
|
3341
|
+
# p result
|
3342
|
+
#
|
2780
3343
|
def update_stored_info_type request, options = nil
|
2781
3344
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2782
3345
|
|
@@ -2794,16 +3357,20 @@ module Google
|
|
2794
3357
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2795
3358
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2796
3359
|
|
2797
|
-
header_params = {
|
2798
|
-
|
2799
|
-
|
3360
|
+
header_params = {}
|
3361
|
+
if request.name
|
3362
|
+
header_params["name"] = request.name
|
3363
|
+
end
|
3364
|
+
|
2800
3365
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2801
3366
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2802
3367
|
|
2803
3368
|
options.apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout,
|
2804
3369
|
metadata: metadata,
|
2805
3370
|
retry_policy: @config.rpcs.update_stored_info_type.retry_policy
|
2806
|
-
|
3371
|
+
|
3372
|
+
options.apply_defaults timeout: @config.timeout,
|
3373
|
+
metadata: @config.metadata,
|
2807
3374
|
retry_policy: @config.retry_policy
|
2808
3375
|
|
2809
3376
|
@dlp_service_stub.call_rpc :update_stored_info_type, request, options: options do |response, operation|
|
@@ -2847,6 +3414,21 @@ module Google
|
|
2847
3414
|
#
|
2848
3415
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2849
3416
|
#
|
3417
|
+
# @example Basic example
|
3418
|
+
# require "google/cloud/dlp/v2"
|
3419
|
+
#
|
3420
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3421
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3422
|
+
#
|
3423
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3424
|
+
# request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new
|
3425
|
+
#
|
3426
|
+
# # Call the get_stored_info_type method.
|
3427
|
+
# result = client.get_stored_info_type request
|
3428
|
+
#
|
3429
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType.
|
3430
|
+
# p result
|
3431
|
+
#
|
2850
3432
|
def get_stored_info_type request, options = nil
|
2851
3433
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2852
3434
|
|
@@ -2864,16 +3446,20 @@ module Google
|
|
2864
3446
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2865
3447
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2866
3448
|
|
2867
|
-
header_params = {
|
2868
|
-
|
2869
|
-
|
3449
|
+
header_params = {}
|
3450
|
+
if request.name
|
3451
|
+
header_params["name"] = request.name
|
3452
|
+
end
|
3453
|
+
|
2870
3454
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2871
3455
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2872
3456
|
|
2873
3457
|
options.apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout,
|
2874
3458
|
metadata: metadata,
|
2875
3459
|
retry_policy: @config.rpcs.get_stored_info_type.retry_policy
|
2876
|
-
|
3460
|
+
|
3461
|
+
options.apply_defaults timeout: @config.timeout,
|
3462
|
+
metadata: @config.metadata,
|
2877
3463
|
retry_policy: @config.retry_policy
|
2878
3464
|
|
2879
3465
|
@dlp_service_stub.call_rpc :get_stored_info_type, request, options: options do |response, operation|
|
@@ -2957,6 +3543,27 @@ module Google
|
|
2957
3543
|
#
|
2958
3544
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2959
3545
|
#
|
3546
|
+
# @example Basic example
|
3547
|
+
# require "google/cloud/dlp/v2"
|
3548
|
+
#
|
3549
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3550
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3551
|
+
#
|
3552
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3553
|
+
# request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new
|
3554
|
+
#
|
3555
|
+
# # Call the list_stored_info_types method.
|
3556
|
+
# result = client.list_stored_info_types request
|
3557
|
+
#
|
3558
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3559
|
+
# # iterate over all elements by calling #each, and the enumerable
|
3560
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
3561
|
+
# # methods are also available for managing paging directly.
|
3562
|
+
# result.each do |response|
|
3563
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType.
|
3564
|
+
# p response
|
3565
|
+
# end
|
3566
|
+
#
|
2960
3567
|
def list_stored_info_types request, options = nil
|
2961
3568
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2962
3569
|
|
@@ -2974,16 +3581,20 @@ module Google
|
|
2974
3581
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2975
3582
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2976
3583
|
|
2977
|
-
header_params = {
|
2978
|
-
|
2979
|
-
|
3584
|
+
header_params = {}
|
3585
|
+
if request.parent
|
3586
|
+
header_params["parent"] = request.parent
|
3587
|
+
end
|
3588
|
+
|
2980
3589
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2981
3590
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2982
3591
|
|
2983
3592
|
options.apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout,
|
2984
3593
|
metadata: metadata,
|
2985
3594
|
retry_policy: @config.rpcs.list_stored_info_types.retry_policy
|
2986
|
-
|
3595
|
+
|
3596
|
+
options.apply_defaults timeout: @config.timeout,
|
3597
|
+
metadata: @config.metadata,
|
2987
3598
|
retry_policy: @config.retry_policy
|
2988
3599
|
|
2989
3600
|
@dlp_service_stub.call_rpc :list_stored_info_types, request, options: options do |response, operation|
|
@@ -3028,6 +3639,21 @@ module Google
|
|
3028
3639
|
#
|
3029
3640
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3030
3641
|
#
|
3642
|
+
# @example Basic example
|
3643
|
+
# require "google/cloud/dlp/v2"
|
3644
|
+
#
|
3645
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3646
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3647
|
+
#
|
3648
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3649
|
+
# request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new
|
3650
|
+
#
|
3651
|
+
# # Call the delete_stored_info_type method.
|
3652
|
+
# result = client.delete_stored_info_type request
|
3653
|
+
#
|
3654
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3655
|
+
# p result
|
3656
|
+
#
|
3031
3657
|
def delete_stored_info_type request, options = nil
|
3032
3658
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3033
3659
|
|
@@ -3045,16 +3671,20 @@ module Google
|
|
3045
3671
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3046
3672
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3047
3673
|
|
3048
|
-
header_params = {
|
3049
|
-
|
3050
|
-
|
3674
|
+
header_params = {}
|
3675
|
+
if request.name
|
3676
|
+
header_params["name"] = request.name
|
3677
|
+
end
|
3678
|
+
|
3051
3679
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3052
3680
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3053
3681
|
|
3054
3682
|
options.apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout,
|
3055
3683
|
metadata: metadata,
|
3056
3684
|
retry_policy: @config.rpcs.delete_stored_info_type.retry_policy
|
3057
|
-
|
3685
|
+
|
3686
|
+
options.apply_defaults timeout: @config.timeout,
|
3687
|
+
metadata: @config.metadata,
|
3058
3688
|
retry_policy: @config.retry_policy
|
3059
3689
|
|
3060
3690
|
@dlp_service_stub.call_rpc :delete_stored_info_type, request, options: options do |response, operation|
|
@@ -3067,11 +3697,8 @@ module Google
|
|
3067
3697
|
|
3068
3698
|
##
|
3069
3699
|
# Inspect hybrid content and store findings to a job.
|
3070
|
-
# To review the findings inspect the job. Inspection will occur
|
3700
|
+
# To review the findings, inspect the job. Inspection will occur
|
3071
3701
|
# asynchronously.
|
3072
|
-
# Early access feature is in a pre-release state and might change or have
|
3073
|
-
# limited support. For more information, see
|
3074
|
-
# https://cloud.google.com/products#product-launch-stages.
|
3075
3702
|
#
|
3076
3703
|
# @overload hybrid_inspect_dlp_job(request, options = nil)
|
3077
3704
|
# Pass arguments to `hybrid_inspect_dlp_job` via a request object, either of type
|
@@ -3102,6 +3729,21 @@ module Google
|
|
3102
3729
|
#
|
3103
3730
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3104
3731
|
#
|
3732
|
+
# @example Basic example
|
3733
|
+
# require "google/cloud/dlp/v2"
|
3734
|
+
#
|
3735
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3736
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3737
|
+
#
|
3738
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3739
|
+
# request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new
|
3740
|
+
#
|
3741
|
+
# # Call the hybrid_inspect_dlp_job method.
|
3742
|
+
# result = client.hybrid_inspect_dlp_job request
|
3743
|
+
#
|
3744
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse.
|
3745
|
+
# p result
|
3746
|
+
#
|
3105
3747
|
def hybrid_inspect_dlp_job request, options = nil
|
3106
3748
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3107
3749
|
|
@@ -3119,16 +3761,20 @@ module Google
|
|
3119
3761
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3120
3762
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3121
3763
|
|
3122
|
-
header_params = {
|
3123
|
-
|
3124
|
-
|
3764
|
+
header_params = {}
|
3765
|
+
if request.name
|
3766
|
+
header_params["name"] = request.name
|
3767
|
+
end
|
3768
|
+
|
3125
3769
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3126
3770
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3127
3771
|
|
3128
3772
|
options.apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout,
|
3129
3773
|
metadata: metadata,
|
3130
3774
|
retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy
|
3131
|
-
|
3775
|
+
|
3776
|
+
options.apply_defaults timeout: @config.timeout,
|
3777
|
+
metadata: @config.metadata,
|
3132
3778
|
retry_policy: @config.retry_policy
|
3133
3779
|
|
3134
3780
|
@dlp_service_stub.call_rpc :hybrid_inspect_dlp_job, request, options: options do |response, operation|
|
@@ -3142,9 +3788,6 @@ module Google
|
|
3142
3788
|
##
|
3143
3789
|
# Finish a running hybrid DlpJob. Triggers the finalization steps and running
|
3144
3790
|
# of any enabled actions that have not yet run.
|
3145
|
-
# Early access feature is in a pre-release state and might change or have
|
3146
|
-
# limited support. For more information, see
|
3147
|
-
# https://cloud.google.com/products#product-launch-stages.
|
3148
3791
|
#
|
3149
3792
|
# @overload finish_dlp_job(request, options = nil)
|
3150
3793
|
# Pass arguments to `finish_dlp_job` via a request object, either of type
|
@@ -3172,6 +3815,21 @@ module Google
|
|
3172
3815
|
#
|
3173
3816
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3174
3817
|
#
|
3818
|
+
# @example Basic example
|
3819
|
+
# require "google/cloud/dlp/v2"
|
3820
|
+
#
|
3821
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3822
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
3823
|
+
#
|
3824
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3825
|
+
# request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new
|
3826
|
+
#
|
3827
|
+
# # Call the finish_dlp_job method.
|
3828
|
+
# result = client.finish_dlp_job request
|
3829
|
+
#
|
3830
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3831
|
+
# p result
|
3832
|
+
#
|
3175
3833
|
def finish_dlp_job request, options = nil
|
3176
3834
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3177
3835
|
|
@@ -3189,16 +3847,20 @@ module Google
|
|
3189
3847
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3190
3848
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3191
3849
|
|
3192
|
-
header_params = {
|
3193
|
-
|
3194
|
-
|
3850
|
+
header_params = {}
|
3851
|
+
if request.name
|
3852
|
+
header_params["name"] = request.name
|
3853
|
+
end
|
3854
|
+
|
3195
3855
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3196
3856
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3197
3857
|
|
3198
3858
|
options.apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout,
|
3199
3859
|
metadata: metadata,
|
3200
3860
|
retry_policy: @config.rpcs.finish_dlp_job.retry_policy
|
3201
|
-
|
3861
|
+
|
3862
|
+
options.apply_defaults timeout: @config.timeout,
|
3863
|
+
metadata: @config.metadata,
|
3202
3864
|
retry_policy: @config.retry_policy
|
3203
3865
|
|
3204
3866
|
@dlp_service_stub.call_rpc :finish_dlp_job, request, options: options do |response, operation|
|
@@ -3222,22 +3884,21 @@ module Google
|
|
3222
3884
|
# Configuration can be applied globally to all clients, or to a single client
|
3223
3885
|
# on construction.
|
3224
3886
|
#
|
3225
|
-
#
|
3226
|
-
#
|
3227
|
-
#
|
3228
|
-
# to 20 seconds,
|
3229
|
-
#
|
3230
|
-
#
|
3231
|
-
#
|
3232
|
-
#
|
3233
|
-
#
|
3234
|
-
#
|
3235
|
-
#
|
3236
|
-
#
|
3237
|
-
#
|
3238
|
-
#
|
3239
|
-
#
|
3240
|
-
# end
|
3887
|
+
# @example
|
3888
|
+
#
|
3889
|
+
# # Modify the global config, setting the timeout for
|
3890
|
+
# # inspect_content to 20 seconds,
|
3891
|
+
# # and all remaining timeouts to 10 seconds.
|
3892
|
+
# ::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config|
|
3893
|
+
# config.timeout = 10.0
|
3894
|
+
# config.rpcs.inspect_content.timeout = 20.0
|
3895
|
+
# end
|
3896
|
+
#
|
3897
|
+
# # Apply the above configuration only to a new client.
|
3898
|
+
# client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config|
|
3899
|
+
# config.timeout = 10.0
|
3900
|
+
# config.rpcs.inspect_content.timeout = 20.0
|
3901
|
+
# end
|
3241
3902
|
#
|
3242
3903
|
# @!attribute [rw] endpoint
|
3243
3904
|
# The hostname or hostname:port of the service endpoint.
|