google-cloud-dlp 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/dlp.rb +1 -1
- data/lib/google/cloud/dlp/v2.rb +1 -1
- data/lib/google/cloud/dlp/v2/credentials.rb +1 -1
- data/lib/google/cloud/dlp/v2/dlp_service_client.rb +216 -101
- data/lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb +160 -48
- data/lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/storage.rb +42 -22
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/any.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/rpc/status.rb +18 -15
- data/lib/google/cloud/dlp/v2/doc/google/type/date.rb +15 -10
- data/lib/google/cloud/dlp/v2/doc/google/type/timeofday.rb +2 -2
- data/lib/google/privacy/dlp/v2/dlp_pb.rb +18 -0
- data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +4 -1
- data/lib/google/privacy/dlp/v2/storage_pb.rb +4 -0
- metadata +25 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcc81bb0a2b4753432c038d93307838dc545cdabdda2544beb78320d3922cbc3
|
4
|
+
data.tar.gz: 2a15cabe4ab989bc69861b25b5032fc98bed56b7babc4995347451a7d2503471
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1eff0b603412e445ff882053ac8bda3770990d58e60e91ba0f42cfc882063aa91ca6eab8ff2f292c71b0b9c2b7d44d7133f6c242d672bc7d6c05d4abc469a4
|
7
|
+
data.tar.gz: a064b60fa58be23da0d4b9ecb13db8bf186af68b1aee94f6a7cba4db6e0a4aea1e44e993d5f9df7663ab71d19a04167939c412bb78ff93df2787fddf85a60a39
|
data/lib/google/cloud/dlp.rb
CHANGED
data/lib/google/cloud/dlp/v2.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -363,22 +363,34 @@ module Google
|
|
363
363
|
@inspect_content = Google::Gax.create_api_call(
|
364
364
|
@dlp_service_stub.method(:inspect_content),
|
365
365
|
defaults["inspect_content"],
|
366
|
-
exception_transformer: exception_transformer
|
366
|
+
exception_transformer: exception_transformer,
|
367
|
+
params_extractor: proc do |request|
|
368
|
+
{'parent' => request.parent}
|
369
|
+
end
|
367
370
|
)
|
368
371
|
@redact_image = Google::Gax.create_api_call(
|
369
372
|
@dlp_service_stub.method(:redact_image),
|
370
373
|
defaults["redact_image"],
|
371
|
-
exception_transformer: exception_transformer
|
374
|
+
exception_transformer: exception_transformer,
|
375
|
+
params_extractor: proc do |request|
|
376
|
+
{'parent' => request.parent}
|
377
|
+
end
|
372
378
|
)
|
373
379
|
@deidentify_content = Google::Gax.create_api_call(
|
374
380
|
@dlp_service_stub.method(:deidentify_content),
|
375
381
|
defaults["deidentify_content"],
|
376
|
-
exception_transformer: exception_transformer
|
382
|
+
exception_transformer: exception_transformer,
|
383
|
+
params_extractor: proc do |request|
|
384
|
+
{'parent' => request.parent}
|
385
|
+
end
|
377
386
|
)
|
378
387
|
@reidentify_content = Google::Gax.create_api_call(
|
379
388
|
@dlp_service_stub.method(:reidentify_content),
|
380
389
|
defaults["reidentify_content"],
|
381
|
-
exception_transformer: exception_transformer
|
390
|
+
exception_transformer: exception_transformer,
|
391
|
+
params_extractor: proc do |request|
|
392
|
+
{'parent' => request.parent}
|
393
|
+
end
|
382
394
|
)
|
383
395
|
@list_info_types = Google::Gax.create_api_call(
|
384
396
|
@dlp_service_stub.method(:list_info_types),
|
@@ -388,127 +400,202 @@ module Google
|
|
388
400
|
@create_inspect_template = Google::Gax.create_api_call(
|
389
401
|
@dlp_service_stub.method(:create_inspect_template),
|
390
402
|
defaults["create_inspect_template"],
|
391
|
-
exception_transformer: exception_transformer
|
403
|
+
exception_transformer: exception_transformer,
|
404
|
+
params_extractor: proc do |request|
|
405
|
+
{'parent' => request.parent}
|
406
|
+
end
|
392
407
|
)
|
393
408
|
@update_inspect_template = Google::Gax.create_api_call(
|
394
409
|
@dlp_service_stub.method(:update_inspect_template),
|
395
410
|
defaults["update_inspect_template"],
|
396
|
-
exception_transformer: exception_transformer
|
411
|
+
exception_transformer: exception_transformer,
|
412
|
+
params_extractor: proc do |request|
|
413
|
+
{'name' => request.name}
|
414
|
+
end
|
397
415
|
)
|
398
416
|
@get_inspect_template = Google::Gax.create_api_call(
|
399
417
|
@dlp_service_stub.method(:get_inspect_template),
|
400
418
|
defaults["get_inspect_template"],
|
401
|
-
exception_transformer: exception_transformer
|
419
|
+
exception_transformer: exception_transformer,
|
420
|
+
params_extractor: proc do |request|
|
421
|
+
{'name' => request.name}
|
422
|
+
end
|
402
423
|
)
|
403
424
|
@list_inspect_templates = Google::Gax.create_api_call(
|
404
425
|
@dlp_service_stub.method(:list_inspect_templates),
|
405
426
|
defaults["list_inspect_templates"],
|
406
|
-
exception_transformer: exception_transformer
|
427
|
+
exception_transformer: exception_transformer,
|
428
|
+
params_extractor: proc do |request|
|
429
|
+
{'parent' => request.parent}
|
430
|
+
end
|
407
431
|
)
|
408
432
|
@delete_inspect_template = Google::Gax.create_api_call(
|
409
433
|
@dlp_service_stub.method(:delete_inspect_template),
|
410
434
|
defaults["delete_inspect_template"],
|
411
|
-
exception_transformer: exception_transformer
|
435
|
+
exception_transformer: exception_transformer,
|
436
|
+
params_extractor: proc do |request|
|
437
|
+
{'name' => request.name}
|
438
|
+
end
|
412
439
|
)
|
413
440
|
@create_deidentify_template = Google::Gax.create_api_call(
|
414
441
|
@dlp_service_stub.method(:create_deidentify_template),
|
415
442
|
defaults["create_deidentify_template"],
|
416
|
-
exception_transformer: exception_transformer
|
443
|
+
exception_transformer: exception_transformer,
|
444
|
+
params_extractor: proc do |request|
|
445
|
+
{'parent' => request.parent}
|
446
|
+
end
|
417
447
|
)
|
418
448
|
@update_deidentify_template = Google::Gax.create_api_call(
|
419
449
|
@dlp_service_stub.method(:update_deidentify_template),
|
420
450
|
defaults["update_deidentify_template"],
|
421
|
-
exception_transformer: exception_transformer
|
451
|
+
exception_transformer: exception_transformer,
|
452
|
+
params_extractor: proc do |request|
|
453
|
+
{'name' => request.name}
|
454
|
+
end
|
422
455
|
)
|
423
456
|
@get_deidentify_template = Google::Gax.create_api_call(
|
424
457
|
@dlp_service_stub.method(:get_deidentify_template),
|
425
458
|
defaults["get_deidentify_template"],
|
426
|
-
exception_transformer: exception_transformer
|
459
|
+
exception_transformer: exception_transformer,
|
460
|
+
params_extractor: proc do |request|
|
461
|
+
{'name' => request.name}
|
462
|
+
end
|
427
463
|
)
|
428
464
|
@list_deidentify_templates = Google::Gax.create_api_call(
|
429
465
|
@dlp_service_stub.method(:list_deidentify_templates),
|
430
466
|
defaults["list_deidentify_templates"],
|
431
|
-
exception_transformer: exception_transformer
|
467
|
+
exception_transformer: exception_transformer,
|
468
|
+
params_extractor: proc do |request|
|
469
|
+
{'parent' => request.parent}
|
470
|
+
end
|
432
471
|
)
|
433
472
|
@delete_deidentify_template = Google::Gax.create_api_call(
|
434
473
|
@dlp_service_stub.method(:delete_deidentify_template),
|
435
474
|
defaults["delete_deidentify_template"],
|
436
|
-
exception_transformer: exception_transformer
|
475
|
+
exception_transformer: exception_transformer,
|
476
|
+
params_extractor: proc do |request|
|
477
|
+
{'name' => request.name}
|
478
|
+
end
|
437
479
|
)
|
438
480
|
@create_dlp_job = Google::Gax.create_api_call(
|
439
481
|
@dlp_service_stub.method(:create_dlp_job),
|
440
482
|
defaults["create_dlp_job"],
|
441
|
-
exception_transformer: exception_transformer
|
483
|
+
exception_transformer: exception_transformer,
|
484
|
+
params_extractor: proc do |request|
|
485
|
+
{'parent' => request.parent}
|
486
|
+
end
|
442
487
|
)
|
443
488
|
@list_dlp_jobs = Google::Gax.create_api_call(
|
444
489
|
@dlp_service_stub.method(:list_dlp_jobs),
|
445
490
|
defaults["list_dlp_jobs"],
|
446
|
-
exception_transformer: exception_transformer
|
491
|
+
exception_transformer: exception_transformer,
|
492
|
+
params_extractor: proc do |request|
|
493
|
+
{'parent' => request.parent}
|
494
|
+
end
|
447
495
|
)
|
448
496
|
@get_dlp_job = Google::Gax.create_api_call(
|
449
497
|
@dlp_service_stub.method(:get_dlp_job),
|
450
498
|
defaults["get_dlp_job"],
|
451
|
-
exception_transformer: exception_transformer
|
499
|
+
exception_transformer: exception_transformer,
|
500
|
+
params_extractor: proc do |request|
|
501
|
+
{'name' => request.name}
|
502
|
+
end
|
452
503
|
)
|
453
504
|
@delete_dlp_job = Google::Gax.create_api_call(
|
454
505
|
@dlp_service_stub.method(:delete_dlp_job),
|
455
506
|
defaults["delete_dlp_job"],
|
456
|
-
exception_transformer: exception_transformer
|
507
|
+
exception_transformer: exception_transformer,
|
508
|
+
params_extractor: proc do |request|
|
509
|
+
{'name' => request.name}
|
510
|
+
end
|
457
511
|
)
|
458
512
|
@cancel_dlp_job = Google::Gax.create_api_call(
|
459
513
|
@dlp_service_stub.method(:cancel_dlp_job),
|
460
514
|
defaults["cancel_dlp_job"],
|
461
|
-
exception_transformer: exception_transformer
|
515
|
+
exception_transformer: exception_transformer,
|
516
|
+
params_extractor: proc do |request|
|
517
|
+
{'name' => request.name}
|
518
|
+
end
|
462
519
|
)
|
463
520
|
@list_job_triggers = Google::Gax.create_api_call(
|
464
521
|
@dlp_service_stub.method(:list_job_triggers),
|
465
522
|
defaults["list_job_triggers"],
|
466
|
-
exception_transformer: exception_transformer
|
523
|
+
exception_transformer: exception_transformer,
|
524
|
+
params_extractor: proc do |request|
|
525
|
+
{'parent' => request.parent}
|
526
|
+
end
|
467
527
|
)
|
468
528
|
@get_job_trigger = Google::Gax.create_api_call(
|
469
529
|
@dlp_service_stub.method(:get_job_trigger),
|
470
530
|
defaults["get_job_trigger"],
|
471
|
-
exception_transformer: exception_transformer
|
531
|
+
exception_transformer: exception_transformer,
|
532
|
+
params_extractor: proc do |request|
|
533
|
+
{'name' => request.name}
|
534
|
+
end
|
472
535
|
)
|
473
536
|
@delete_job_trigger = Google::Gax.create_api_call(
|
474
537
|
@dlp_service_stub.method(:delete_job_trigger),
|
475
538
|
defaults["delete_job_trigger"],
|
476
|
-
exception_transformer: exception_transformer
|
539
|
+
exception_transformer: exception_transformer,
|
540
|
+
params_extractor: proc do |request|
|
541
|
+
{'name' => request.name}
|
542
|
+
end
|
477
543
|
)
|
478
544
|
@update_job_trigger = Google::Gax.create_api_call(
|
479
545
|
@dlp_service_stub.method(:update_job_trigger),
|
480
546
|
defaults["update_job_trigger"],
|
481
|
-
exception_transformer: exception_transformer
|
547
|
+
exception_transformer: exception_transformer,
|
548
|
+
params_extractor: proc do |request|
|
549
|
+
{'name' => request.name}
|
550
|
+
end
|
482
551
|
)
|
483
552
|
@create_job_trigger = Google::Gax.create_api_call(
|
484
553
|
@dlp_service_stub.method(:create_job_trigger),
|
485
554
|
defaults["create_job_trigger"],
|
486
|
-
exception_transformer: exception_transformer
|
555
|
+
exception_transformer: exception_transformer,
|
556
|
+
params_extractor: proc do |request|
|
557
|
+
{'parent' => request.parent}
|
558
|
+
end
|
487
559
|
)
|
488
560
|
@create_stored_info_type = Google::Gax.create_api_call(
|
489
561
|
@dlp_service_stub.method(:create_stored_info_type),
|
490
562
|
defaults["create_stored_info_type"],
|
491
|
-
exception_transformer: exception_transformer
|
563
|
+
exception_transformer: exception_transformer,
|
564
|
+
params_extractor: proc do |request|
|
565
|
+
{'parent' => request.parent}
|
566
|
+
end
|
492
567
|
)
|
493
568
|
@update_stored_info_type = Google::Gax.create_api_call(
|
494
569
|
@dlp_service_stub.method(:update_stored_info_type),
|
495
570
|
defaults["update_stored_info_type"],
|
496
|
-
exception_transformer: exception_transformer
|
571
|
+
exception_transformer: exception_transformer,
|
572
|
+
params_extractor: proc do |request|
|
573
|
+
{'name' => request.name}
|
574
|
+
end
|
497
575
|
)
|
498
576
|
@get_stored_info_type = Google::Gax.create_api_call(
|
499
577
|
@dlp_service_stub.method(:get_stored_info_type),
|
500
578
|
defaults["get_stored_info_type"],
|
501
|
-
exception_transformer: exception_transformer
|
579
|
+
exception_transformer: exception_transformer,
|
580
|
+
params_extractor: proc do |request|
|
581
|
+
{'name' => request.name}
|
582
|
+
end
|
502
583
|
)
|
503
584
|
@list_stored_info_types = Google::Gax.create_api_call(
|
504
585
|
@dlp_service_stub.method(:list_stored_info_types),
|
505
586
|
defaults["list_stored_info_types"],
|
506
|
-
exception_transformer: exception_transformer
|
587
|
+
exception_transformer: exception_transformer,
|
588
|
+
params_extractor: proc do |request|
|
589
|
+
{'parent' => request.parent}
|
590
|
+
end
|
507
591
|
)
|
508
592
|
@delete_stored_info_type = Google::Gax.create_api_call(
|
509
593
|
@dlp_service_stub.method(:delete_stored_info_type),
|
510
594
|
defaults["delete_stored_info_type"],
|
511
|
-
exception_transformer: exception_transformer
|
595
|
+
exception_transformer: exception_transformer,
|
596
|
+
params_extractor: proc do |request|
|
597
|
+
{'name' => request.name}
|
598
|
+
end
|
512
599
|
)
|
513
600
|
end
|
514
601
|
|
@@ -552,9 +639,9 @@ module Google
|
|
552
639
|
# @example
|
553
640
|
# require "google/cloud/dlp"
|
554
641
|
#
|
555
|
-
#
|
642
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
556
643
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
557
|
-
# response =
|
644
|
+
# response = dlp_client.inspect_content(formatted_parent)
|
558
645
|
|
559
646
|
def inspect_content \
|
560
647
|
parent,
|
@@ -610,9 +697,9 @@ module Google
|
|
610
697
|
# @example
|
611
698
|
# require "google/cloud/dlp"
|
612
699
|
#
|
613
|
-
#
|
700
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
614
701
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
615
|
-
# response =
|
702
|
+
# response = dlp_client.redact_image(formatted_parent)
|
616
703
|
|
617
704
|
def redact_image \
|
618
705
|
parent,
|
@@ -683,9 +770,9 @@ module Google
|
|
683
770
|
# @example
|
684
771
|
# require "google/cloud/dlp"
|
685
772
|
#
|
686
|
-
#
|
773
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
687
774
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
688
|
-
# response =
|
775
|
+
# response = dlp_client.deidentify_content(formatted_parent)
|
689
776
|
|
690
777
|
def deidentify_content \
|
691
778
|
parent,
|
@@ -759,9 +846,9 @@ module Google
|
|
759
846
|
# @example
|
760
847
|
# require "google/cloud/dlp"
|
761
848
|
#
|
762
|
-
#
|
849
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
763
850
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
764
|
-
# response =
|
851
|
+
# response = dlp_client.reidentify_content(formatted_parent)
|
765
852
|
|
766
853
|
def reidentify_content \
|
767
854
|
parent,
|
@@ -806,8 +893,8 @@ module Google
|
|
806
893
|
# @example
|
807
894
|
# require "google/cloud/dlp"
|
808
895
|
#
|
809
|
-
#
|
810
|
-
# response =
|
896
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
897
|
+
# response = dlp_client.list_info_types
|
811
898
|
|
812
899
|
def list_info_types \
|
813
900
|
language_code: nil,
|
@@ -836,7 +923,7 @@ module Google
|
|
836
923
|
# @param template_id [String]
|
837
924
|
# The template id can contain uppercase and lowercase letters,
|
838
925
|
# numbers, and hyphens; that is, it must match the regular
|
839
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
926
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
840
927
|
# characters. Can be empty to allow the system to generate one.
|
841
928
|
# @param options [Google::Gax::CallOptions]
|
842
929
|
# Overrides the default settings for this call, e.g, timeout,
|
@@ -849,9 +936,9 @@ module Google
|
|
849
936
|
# @example
|
850
937
|
# require "google/cloud/dlp"
|
851
938
|
#
|
852
|
-
#
|
939
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
853
940
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
|
854
|
-
# response =
|
941
|
+
# response = dlp_client.create_inspect_template(formatted_parent)
|
855
942
|
|
856
943
|
def create_inspect_template \
|
857
944
|
parent,
|
@@ -894,9 +981,9 @@ module Google
|
|
894
981
|
# @example
|
895
982
|
# require "google/cloud/dlp"
|
896
983
|
#
|
897
|
-
#
|
984
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
898
985
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_inspect_template_path("[ORGANIZATION]", "[INSPECT_TEMPLATE]")
|
899
|
-
# response =
|
986
|
+
# response = dlp_client.update_inspect_template(formatted_name)
|
900
987
|
|
901
988
|
def update_inspect_template \
|
902
989
|
name,
|
@@ -931,8 +1018,8 @@ module Google
|
|
931
1018
|
# @example
|
932
1019
|
# require "google/cloud/dlp"
|
933
1020
|
#
|
934
|
-
#
|
935
|
-
# response =
|
1021
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1022
|
+
# response = dlp_client.get_inspect_template
|
936
1023
|
|
937
1024
|
def get_inspect_template \
|
938
1025
|
name: nil,
|
@@ -986,16 +1073,16 @@ module Google
|
|
986
1073
|
# @example
|
987
1074
|
# require "google/cloud/dlp"
|
988
1075
|
#
|
989
|
-
#
|
1076
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
990
1077
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
|
991
1078
|
#
|
992
1079
|
# # Iterate over all results.
|
993
|
-
#
|
1080
|
+
# dlp_client.list_inspect_templates(formatted_parent).each do |element|
|
994
1081
|
# # Process element.
|
995
1082
|
# end
|
996
1083
|
#
|
997
1084
|
# # Or iterate over results one page at a time.
|
998
|
-
#
|
1085
|
+
# dlp_client.list_inspect_templates(formatted_parent).each_page do |page|
|
999
1086
|
# # Process each page at a time.
|
1000
1087
|
# page.each do |element|
|
1001
1088
|
# # Process element.
|
@@ -1034,9 +1121,9 @@ module Google
|
|
1034
1121
|
# @example
|
1035
1122
|
# require "google/cloud/dlp"
|
1036
1123
|
#
|
1037
|
-
#
|
1124
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1038
1125
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_inspect_template_path("[ORGANIZATION]", "[INSPECT_TEMPLATE]")
|
1039
|
-
#
|
1126
|
+
# dlp_client.delete_inspect_template(formatted_name)
|
1040
1127
|
|
1041
1128
|
def delete_inspect_template \
|
1042
1129
|
name,
|
@@ -1065,7 +1152,7 @@ module Google
|
|
1065
1152
|
# @param template_id [String]
|
1066
1153
|
# The template id can contain uppercase and lowercase letters,
|
1067
1154
|
# numbers, and hyphens; that is, it must match the regular
|
1068
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
1155
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
1069
1156
|
# characters. Can be empty to allow the system to generate one.
|
1070
1157
|
# @param options [Google::Gax::CallOptions]
|
1071
1158
|
# Overrides the default settings for this call, e.g, timeout,
|
@@ -1078,9 +1165,9 @@ module Google
|
|
1078
1165
|
# @example
|
1079
1166
|
# require "google/cloud/dlp"
|
1080
1167
|
#
|
1081
|
-
#
|
1168
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1082
1169
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
|
1083
|
-
# response =
|
1170
|
+
# response = dlp_client.create_deidentify_template(formatted_parent)
|
1084
1171
|
|
1085
1172
|
def create_deidentify_template \
|
1086
1173
|
parent,
|
@@ -1124,9 +1211,9 @@ module Google
|
|
1124
1211
|
# @example
|
1125
1212
|
# require "google/cloud/dlp"
|
1126
1213
|
#
|
1127
|
-
#
|
1214
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1128
1215
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_deidentify_template_path("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
|
1129
|
-
# response =
|
1216
|
+
# response = dlp_client.update_deidentify_template(formatted_name)
|
1130
1217
|
|
1131
1218
|
def update_deidentify_template \
|
1132
1219
|
name,
|
@@ -1162,9 +1249,9 @@ module Google
|
|
1162
1249
|
# @example
|
1163
1250
|
# require "google/cloud/dlp"
|
1164
1251
|
#
|
1165
|
-
#
|
1252
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1166
1253
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_deidentify_template_path("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
|
1167
|
-
# response =
|
1254
|
+
# response = dlp_client.get_deidentify_template(formatted_name)
|
1168
1255
|
|
1169
1256
|
def get_deidentify_template \
|
1170
1257
|
name,
|
@@ -1219,16 +1306,16 @@ module Google
|
|
1219
1306
|
# @example
|
1220
1307
|
# require "google/cloud/dlp"
|
1221
1308
|
#
|
1222
|
-
#
|
1309
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1223
1310
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
|
1224
1311
|
#
|
1225
1312
|
# # Iterate over all results.
|
1226
|
-
#
|
1313
|
+
# dlp_client.list_deidentify_templates(formatted_parent).each do |element|
|
1227
1314
|
# # Process element.
|
1228
1315
|
# end
|
1229
1316
|
#
|
1230
1317
|
# # Or iterate over results one page at a time.
|
1231
|
-
#
|
1318
|
+
# dlp_client.list_deidentify_templates(formatted_parent).each_page do |page|
|
1232
1319
|
# # Process each page at a time.
|
1233
1320
|
# page.each do |element|
|
1234
1321
|
# # Process element.
|
@@ -1268,9 +1355,9 @@ module Google
|
|
1268
1355
|
# @example
|
1269
1356
|
# require "google/cloud/dlp"
|
1270
1357
|
#
|
1271
|
-
#
|
1358
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1272
1359
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_deidentify_template_path("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
|
1273
|
-
#
|
1360
|
+
# dlp_client.delete_deidentify_template(formatted_name)
|
1274
1361
|
|
1275
1362
|
def delete_deidentify_template \
|
1276
1363
|
name,
|
@@ -1303,7 +1390,7 @@ module Google
|
|
1303
1390
|
# @param job_id [String]
|
1304
1391
|
# The job id can contain uppercase and lowercase letters,
|
1305
1392
|
# numbers, and hyphens; that is, it must match the regular
|
1306
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
1393
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
1307
1394
|
# characters. Can be empty to allow the system to generate one.
|
1308
1395
|
# @param options [Google::Gax::CallOptions]
|
1309
1396
|
# Overrides the default settings for this call, e.g, timeout,
|
@@ -1316,9 +1403,9 @@ module Google
|
|
1316
1403
|
# @example
|
1317
1404
|
# require "google/cloud/dlp"
|
1318
1405
|
#
|
1319
|
-
#
|
1406
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1320
1407
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
1321
|
-
# response =
|
1408
|
+
# response = dlp_client.create_dlp_job(formatted_parent)
|
1322
1409
|
|
1323
1410
|
def create_dlp_job \
|
1324
1411
|
parent,
|
@@ -1404,16 +1491,16 @@ module Google
|
|
1404
1491
|
# @example
|
1405
1492
|
# require "google/cloud/dlp"
|
1406
1493
|
#
|
1407
|
-
#
|
1494
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1408
1495
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
1409
1496
|
#
|
1410
1497
|
# # Iterate over all results.
|
1411
|
-
#
|
1498
|
+
# dlp_client.list_dlp_jobs(formatted_parent).each do |element|
|
1412
1499
|
# # Process element.
|
1413
1500
|
# end
|
1414
1501
|
#
|
1415
1502
|
# # Or iterate over results one page at a time.
|
1416
|
-
#
|
1503
|
+
# dlp_client.list_dlp_jobs(formatted_parent).each_page do |page|
|
1417
1504
|
# # Process each page at a time.
|
1418
1505
|
# page.each do |element|
|
1419
1506
|
# # Process element.
|
@@ -1456,9 +1543,9 @@ module Google
|
|
1456
1543
|
# @example
|
1457
1544
|
# require "google/cloud/dlp"
|
1458
1545
|
#
|
1459
|
-
#
|
1546
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1460
1547
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.dlp_job_path("[PROJECT]", "[DLP_JOB]")
|
1461
|
-
# response =
|
1548
|
+
# response = dlp_client.get_dlp_job(formatted_name)
|
1462
1549
|
|
1463
1550
|
def get_dlp_job \
|
1464
1551
|
name,
|
@@ -1489,9 +1576,9 @@ module Google
|
|
1489
1576
|
# @example
|
1490
1577
|
# require "google/cloud/dlp"
|
1491
1578
|
#
|
1492
|
-
#
|
1579
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1493
1580
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.dlp_job_path("[PROJECT]", "[DLP_JOB]")
|
1494
|
-
#
|
1581
|
+
# dlp_client.delete_dlp_job(formatted_name)
|
1495
1582
|
|
1496
1583
|
def delete_dlp_job \
|
1497
1584
|
name,
|
@@ -1523,9 +1610,9 @@ module Google
|
|
1523
1610
|
# @example
|
1524
1611
|
# require "google/cloud/dlp"
|
1525
1612
|
#
|
1526
|
-
#
|
1613
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1527
1614
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.dlp_job_path("[PROJECT]", "[DLP_JOB]")
|
1528
|
-
#
|
1615
|
+
# dlp_client.cancel_dlp_job(formatted_name)
|
1529
1616
|
|
1530
1617
|
def cancel_dlp_job \
|
1531
1618
|
name,
|
@@ -1562,9 +1649,35 @@ module Google
|
|
1562
1649
|
#
|
1563
1650
|
# * `create_time`: corresponds to time the JobTrigger was created.
|
1564
1651
|
# * `update_time`: corresponds to time the JobTrigger was last updated.
|
1652
|
+
# * `last_run_time`: corresponds to the last time the JobTrigger ran.
|
1565
1653
|
# * `name`: corresponds to JobTrigger's name.
|
1566
1654
|
# * `display_name`: corresponds to JobTrigger's display name.
|
1567
1655
|
# * `status`: corresponds to JobTrigger's status.
|
1656
|
+
# @param filter [String]
|
1657
|
+
# Optional. Allows filtering.
|
1658
|
+
#
|
1659
|
+
# Supported syntax:
|
1660
|
+
#
|
1661
|
+
# * Filter expressions are made up of one or more restrictions.
|
1662
|
+
# * Restrictions can be combined by `AND` or `OR` logical operators. A
|
1663
|
+
# sequence of restrictions implicitly uses `AND`.
|
1664
|
+
# * A restriction has the form of `<field> <operator> <value>`.
|
1665
|
+
# * Supported fields/values for inspect jobs:
|
1666
|
+
# * `status` - HEALTHY|PAUSED|CANCELLED
|
1667
|
+
# * `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
|
1668
|
+
# * 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
|
1669
|
+
# quotation marks. Nanoseconds are ignored.
|
1670
|
+
# * 'error_count' - Number of errors that have occurred while running.
|
1671
|
+
# * The operator must be `=` or `!=` for status and inspected_storage.
|
1672
|
+
#
|
1673
|
+
# Examples:
|
1674
|
+
#
|
1675
|
+
# * inspected_storage = cloud_storage AND status = HEALTHY
|
1676
|
+
# * inspected_storage = cloud_storage OR inspected_storage = bigquery
|
1677
|
+
# * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
|
1678
|
+
# * last_run_time > \"2017-12-12T00:00:00+00:00\"
|
1679
|
+
#
|
1680
|
+
# The length of this field should be no more than 500 characters.
|
1568
1681
|
# @param options [Google::Gax::CallOptions]
|
1569
1682
|
# Overrides the default settings for this call, e.g, timeout,
|
1570
1683
|
# retries, etc.
|
@@ -1580,16 +1693,16 @@ module Google
|
|
1580
1693
|
# @example
|
1581
1694
|
# require "google/cloud/dlp"
|
1582
1695
|
#
|
1583
|
-
#
|
1696
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1584
1697
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
1585
1698
|
#
|
1586
1699
|
# # Iterate over all results.
|
1587
|
-
#
|
1700
|
+
# dlp_client.list_job_triggers(formatted_parent).each do |element|
|
1588
1701
|
# # Process element.
|
1589
1702
|
# end
|
1590
1703
|
#
|
1591
1704
|
# # Or iterate over results one page at a time.
|
1592
|
-
#
|
1705
|
+
# dlp_client.list_job_triggers(formatted_parent).each_page do |page|
|
1593
1706
|
# # Process each page at a time.
|
1594
1707
|
# page.each do |element|
|
1595
1708
|
# # Process element.
|
@@ -1600,12 +1713,14 @@ module Google
|
|
1600
1713
|
parent,
|
1601
1714
|
page_size: nil,
|
1602
1715
|
order_by: nil,
|
1716
|
+
filter: nil,
|
1603
1717
|
options: nil,
|
1604
1718
|
&block
|
1605
1719
|
req = {
|
1606
1720
|
parent: parent,
|
1607
1721
|
page_size: page_size,
|
1608
|
-
order_by: order_by
|
1722
|
+
order_by: order_by,
|
1723
|
+
filter: filter
|
1609
1724
|
}.delete_if { |_, v| v.nil? }
|
1610
1725
|
req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListJobTriggersRequest)
|
1611
1726
|
@list_job_triggers.call(req, options, &block)
|
@@ -1628,9 +1743,9 @@ module Google
|
|
1628
1743
|
# @example
|
1629
1744
|
# require "google/cloud/dlp"
|
1630
1745
|
#
|
1631
|
-
#
|
1746
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1632
1747
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.project_job_trigger_path("[PROJECT]", "[JOB_TRIGGER]")
|
1633
|
-
# response =
|
1748
|
+
# response = dlp_client.get_job_trigger(formatted_name)
|
1634
1749
|
|
1635
1750
|
def get_job_trigger \
|
1636
1751
|
name,
|
@@ -1659,11 +1774,11 @@ module Google
|
|
1659
1774
|
# @example
|
1660
1775
|
# require "google/cloud/dlp"
|
1661
1776
|
#
|
1662
|
-
#
|
1777
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1663
1778
|
#
|
1664
1779
|
# # TODO: Initialize `name`:
|
1665
1780
|
# name = ''
|
1666
|
-
#
|
1781
|
+
# dlp_client.delete_job_trigger(name)
|
1667
1782
|
|
1668
1783
|
def delete_job_trigger \
|
1669
1784
|
name,
|
@@ -1702,9 +1817,9 @@ module Google
|
|
1702
1817
|
# @example
|
1703
1818
|
# require "google/cloud/dlp"
|
1704
1819
|
#
|
1705
|
-
#
|
1820
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1706
1821
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.project_job_trigger_path("[PROJECT]", "[JOB_TRIGGER]")
|
1707
|
-
# response =
|
1822
|
+
# response = dlp_client.update_job_trigger(formatted_name)
|
1708
1823
|
|
1709
1824
|
def update_job_trigger \
|
1710
1825
|
name,
|
@@ -1734,7 +1849,7 @@ module Google
|
|
1734
1849
|
# @param trigger_id [String]
|
1735
1850
|
# The trigger id can contain uppercase and lowercase letters,
|
1736
1851
|
# numbers, and hyphens; that is, it must match the regular
|
1737
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
1852
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
1738
1853
|
# characters. Can be empty to allow the system to generate one.
|
1739
1854
|
# @param options [Google::Gax::CallOptions]
|
1740
1855
|
# Overrides the default settings for this call, e.g, timeout,
|
@@ -1747,9 +1862,9 @@ module Google
|
|
1747
1862
|
# @example
|
1748
1863
|
# require "google/cloud/dlp"
|
1749
1864
|
#
|
1750
|
-
#
|
1865
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1751
1866
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
|
1752
|
-
# response =
|
1867
|
+
# response = dlp_client.create_job_trigger(formatted_parent)
|
1753
1868
|
|
1754
1869
|
def create_job_trigger \
|
1755
1870
|
parent,
|
@@ -1780,7 +1895,7 @@ module Google
|
|
1780
1895
|
# @param stored_info_type_id [String]
|
1781
1896
|
# The storedInfoType ID can contain uppercase and lowercase letters,
|
1782
1897
|
# numbers, and hyphens; that is, it must match the regular
|
1783
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
1898
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
1784
1899
|
# characters. Can be empty to allow the system to generate one.
|
1785
1900
|
# @param options [Google::Gax::CallOptions]
|
1786
1901
|
# Overrides the default settings for this call, e.g, timeout,
|
@@ -1793,9 +1908,9 @@ module Google
|
|
1793
1908
|
# @example
|
1794
1909
|
# require "google/cloud/dlp"
|
1795
1910
|
#
|
1796
|
-
#
|
1911
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1797
1912
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
|
1798
|
-
# response =
|
1913
|
+
# response = dlp_client.create_stored_info_type(formatted_parent)
|
1799
1914
|
|
1800
1915
|
def create_stored_info_type \
|
1801
1916
|
parent,
|
@@ -1842,9 +1957,9 @@ module Google
|
|
1842
1957
|
# @example
|
1843
1958
|
# require "google/cloud/dlp"
|
1844
1959
|
#
|
1845
|
-
#
|
1960
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1846
1961
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_stored_info_type_path("[ORGANIZATION]", "[STORED_INFO_TYPE]")
|
1847
|
-
# response =
|
1962
|
+
# response = dlp_client.update_stored_info_type(formatted_name)
|
1848
1963
|
|
1849
1964
|
def update_stored_info_type \
|
1850
1965
|
name,
|
@@ -1880,9 +1995,9 @@ module Google
|
|
1880
1995
|
# @example
|
1881
1996
|
# require "google/cloud/dlp"
|
1882
1997
|
#
|
1883
|
-
#
|
1998
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1884
1999
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_stored_info_type_path("[ORGANIZATION]", "[STORED_INFO_TYPE]")
|
1885
|
-
# response =
|
2000
|
+
# response = dlp_client.get_stored_info_type(formatted_name)
|
1886
2001
|
|
1887
2002
|
def get_stored_info_type \
|
1888
2003
|
name,
|
@@ -1938,16 +2053,16 @@ module Google
|
|
1938
2053
|
# @example
|
1939
2054
|
# require "google/cloud/dlp"
|
1940
2055
|
#
|
1941
|
-
#
|
2056
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1942
2057
|
# formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
|
1943
2058
|
#
|
1944
2059
|
# # Iterate over all results.
|
1945
|
-
#
|
2060
|
+
# dlp_client.list_stored_info_types(formatted_parent).each do |element|
|
1946
2061
|
# # Process element.
|
1947
2062
|
# end
|
1948
2063
|
#
|
1949
2064
|
# # Or iterate over results one page at a time.
|
1950
|
-
#
|
2065
|
+
# dlp_client.list_stored_info_types(formatted_parent).each_page do |page|
|
1951
2066
|
# # Process each page at a time.
|
1952
2067
|
# page.each do |element|
|
1953
2068
|
# # Process element.
|
@@ -1987,9 +2102,9 @@ module Google
|
|
1987
2102
|
# @example
|
1988
2103
|
# require "google/cloud/dlp"
|
1989
2104
|
#
|
1990
|
-
#
|
2105
|
+
# dlp_client = Google::Cloud::Dlp.new(version: :v2)
|
1991
2106
|
# formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_stored_info_type_path("[ORGANIZATION]", "[STORED_INFO_TYPE]")
|
1992
|
-
#
|
2107
|
+
# dlp_client.delete_stored_info_type(formatted_name)
|
1993
2108
|
|
1994
2109
|
def delete_stored_info_type \
|
1995
2110
|
name,
|