@google-cloud/dlp 3.2.1 → 3.5.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.
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Google LLC
1
+ // Copyright 2022 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.
@@ -16,6 +16,7 @@ syntax = "proto3";
16
16
 
17
17
  package google.privacy.dlp.v2;
18
18
 
19
+ import "google/api/annotations.proto";
19
20
  import "google/api/client.proto";
20
21
  import "google/api/field_behavior.proto";
21
22
  import "google/api/resource.proto";
@@ -28,7 +29,6 @@ import "google/rpc/status.proto";
28
29
  import "google/type/date.proto";
29
30
  import "google/type/dayofweek.proto";
30
31
  import "google/type/timeofday.proto";
31
- import "google/api/annotations.proto";
32
32
 
33
33
  option csharp_namespace = "Google.Cloud.Dlp.V2";
34
34
  option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp";
@@ -360,6 +360,10 @@ service DlpService {
360
360
  post: "/v2/{parent=projects/*/locations/*}/jobTriggers"
361
361
  body: "*"
362
362
  }
363
+ additional_bindings {
364
+ post: "/v2/{parent=organizations/*/locations/*}/jobTriggers"
365
+ body: "*"
366
+ }
363
367
  };
364
368
  option (google.api.method_signature) = "parent,job_trigger";
365
369
  }
@@ -374,6 +378,10 @@ service DlpService {
374
378
  patch: "/v2/{name=projects/*/locations/*/jobTriggers/*}"
375
379
  body: "*"
376
380
  }
381
+ additional_bindings {
382
+ patch: "/v2/{name=organizations/*/locations/*/jobTriggers/*}"
383
+ body: "*"
384
+ }
377
385
  };
378
386
  option (google.api.method_signature) = "name,job_trigger,update_mask";
379
387
  }
@@ -381,9 +389,6 @@ service DlpService {
381
389
  // Inspect hybrid content and store findings to a trigger. The inspection
382
390
  // will be processed asynchronously. To review the findings monitor the
383
391
  // jobs within the trigger.
384
- // Early access feature is in a pre-release state and might change or have
385
- // limited support. For more information, see
386
- // https://cloud.google.com/products#product-launch-stages.
387
392
  rpc HybridInspectJobTrigger(HybridInspectJobTriggerRequest) returns (HybridInspectResponse) {
388
393
  option (google.api.http) = {
389
394
  post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect"
@@ -400,6 +405,9 @@ service DlpService {
400
405
  additional_bindings {
401
406
  get: "/v2/{name=projects/*/locations/*/jobTriggers/*}"
402
407
  }
408
+ additional_bindings {
409
+ get: "/v2/{name=organizations/*/locations/*/jobTriggers/*}"
410
+ }
403
411
  };
404
412
  option (google.api.method_signature) = "name";
405
413
  }
@@ -412,6 +420,9 @@ service DlpService {
412
420
  additional_bindings {
413
421
  get: "/v2/{parent=projects/*/locations/*}/jobTriggers"
414
422
  }
423
+ additional_bindings {
424
+ get: "/v2/{parent=organizations/*/locations/*}/jobTriggers"
425
+ }
415
426
  };
416
427
  option (google.api.method_signature) = "parent";
417
428
  }
@@ -424,6 +435,9 @@ service DlpService {
424
435
  additional_bindings {
425
436
  delete: "/v2/{name=projects/*/locations/*/jobTriggers/*}"
426
437
  }
438
+ additional_bindings {
439
+ delete: "/v2/{name=organizations/*/locations/*/jobTriggers/*}"
440
+ }
427
441
  };
428
442
  option (google.api.method_signature) = "name";
429
443
  }
@@ -470,6 +484,9 @@ service DlpService {
470
484
  additional_bindings {
471
485
  get: "/v2/{parent=projects/*/locations/*}/dlpJobs"
472
486
  }
487
+ additional_bindings {
488
+ get: "/v2/{parent=organizations/*/locations/*}/dlpJobs"
489
+ }
473
490
  };
474
491
  option (google.api.method_signature) = "parent";
475
492
  }
@@ -623,11 +640,8 @@ service DlpService {
623
640
  }
624
641
 
625
642
  // Inspect hybrid content and store findings to a job.
626
- // To review the findings inspect the job. Inspection will occur
643
+ // To review the findings, inspect the job. Inspection will occur
627
644
  // asynchronously.
628
- // Early access feature is in a pre-release state and might change or have
629
- // limited support. For more information, see
630
- // https://cloud.google.com/products#product-launch-stages.
631
645
  rpc HybridInspectDlpJob(HybridInspectDlpJobRequest) returns (HybridInspectResponse) {
632
646
  option (google.api.http) = {
633
647
  post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect"
@@ -638,9 +652,6 @@ service DlpService {
638
652
 
639
653
  // Finish a running hybrid DlpJob. Triggers the finalization steps and running
640
654
  // of any enabled actions that have not yet run.
641
- // Early access feature is in a pre-release state and might change or have
642
- // limited support. For more information, see
643
- // https://cloud.google.com/products#product-launch-stages.
644
655
  rpc FinishDlpJob(FinishDlpJobRequest) returns (google.protobuf.Empty) {
645
656
  option (google.api.http) = {
646
657
  post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish"
@@ -708,7 +719,8 @@ message InspectionRuleSet {
708
719
  // When used with redactContent only info_types and min_likelihood are currently
709
720
  // used.
710
721
  message InspectConfig {
711
- // Configuration to control the number of findings returned.
722
+ // Configuration to control the number of findings returned for inspection.
723
+ // This is not used for de-identification or data profiling.
712
724
  message FindingLimits {
713
725
  // Max findings configuration per infoType, per content item or long
714
726
  // running DlpJob.
@@ -757,21 +769,23 @@ message InspectConfig {
757
769
  Likelihood min_likelihood = 2;
758
770
 
759
771
  // Configuration to control the number of findings returned.
772
+ // This is not used for data profiling.
760
773
  FindingLimits limits = 3;
761
774
 
762
775
  // When true, a contextual quote from the data that triggered a finding is
763
776
  // included in the response; see Finding.quote.
777
+ // This is not used for data profiling.
764
778
  bool include_quote = 4;
765
779
 
766
780
  // When true, excludes type information of the findings.
781
+ // This is not used for data profiling.
767
782
  bool exclude_info_types = 5;
768
783
 
769
784
  // CustomInfoTypes provided by the user. See
770
785
  // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
771
786
  repeated CustomInfoType custom_info_types = 6;
772
787
 
773
- // List of options defining data content to scan.
774
- // If empty, text, images, and other content will be included.
788
+ // Deprecated and unused.
775
789
  repeated ContentOption content_options = 8;
776
790
 
777
791
  // Set of rules to apply to the findings for this InspectConfig.
@@ -782,7 +796,9 @@ message InspectConfig {
782
796
 
783
797
  // Container for bytes to inspect or redact.
784
798
  message ByteContentItem {
785
- // The type of data being sent for inspection.
799
+ // The type of data being sent for inspection. To learn more, see
800
+ // [Supported file
801
+ // types](https://cloud.google.com/dlp/docs/supported-file-types).
786
802
  enum BytesType {
787
803
  // Unused
788
804
  BYTES_TYPE_UNSPECIFIED = 0;
@@ -811,6 +827,12 @@ message ByteContentItem {
811
827
  // pdf
812
828
  PDF = 8;
813
829
 
830
+ // pptx, pptm, potx, potm, pot
831
+ POWERPOINT_DOCUMENT = 9;
832
+
833
+ // xlsx, xlsm, xltx, xltm
834
+ EXCEL_DOCUMENT = 10;
835
+
814
836
  // avro
815
837
  AVRO = 11;
816
838
 
@@ -845,9 +867,9 @@ message ContentItem {
845
867
  }
846
868
  }
847
869
 
848
- // Structured content to inspect. Up to 50,000 `Value`s per request allowed.
849
- // See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
850
- // learn more.
870
+ // Structured content to inspect. Up to 50,000 `Value`s per request allowed. See
871
+ // https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table
872
+ // to learn more.
851
873
  message Table {
852
874
  // Values of the row.
853
875
  message Row {
@@ -945,6 +967,9 @@ message Finding {
945
967
  string job_name = 13 [(google.api.resource_reference) = {
946
968
  type: "dlp.googleapis.com/DlpJob"
947
969
  }];
970
+
971
+ // The unique finding id.
972
+ string finding_id = 15;
948
973
  }
949
974
 
950
975
  // Specifies the location of the finding.
@@ -1488,16 +1513,13 @@ message InspectDataSourceDetails {
1488
1513
  repeated InfoTypeStats info_type_stats = 3;
1489
1514
 
1490
1515
  // Statistics related to the processing of hybrid inspect.
1491
- // Early access feature is in a pre-release state and might change or have
1492
- // limited support. For more information, see
1493
- // https://cloud.google.com/products#product-launch-stages.
1494
1516
  HybridInspectStatistics hybrid_stats = 7;
1495
1517
  }
1496
1518
 
1497
1519
  // The configuration used for this job.
1498
1520
  RequestedOptions requested_options = 2;
1499
1521
 
1500
- // A summary of the outcome of this inspect job.
1522
+ // A summary of the outcome of this inspection job.
1501
1523
  Result result = 3;
1502
1524
  }
1503
1525
 
@@ -2200,7 +2222,7 @@ message TransformationErrorHandling {
2200
2222
  // A rule for transforming a value.
2201
2223
  message PrimitiveTransformation {
2202
2224
  oneof transformation {
2203
- // Replace
2225
+ // Replace with a specified value.
2204
2226
  ReplaceValueConfig replace_config = 1;
2205
2227
 
2206
2228
  // Redact
@@ -2232,6 +2254,9 @@ message PrimitiveTransformation {
2232
2254
 
2233
2255
  // Deterministic Crypto
2234
2256
  CryptoDeterministicConfig crypto_deterministic_config = 12;
2257
+
2258
+ // Replace with a value randomly drawn (with replacement) from a dictionary.
2259
+ ReplaceDictionaryConfig replace_dictionary_config = 13;
2235
2260
  }
2236
2261
  }
2237
2262
 
@@ -2282,7 +2307,9 @@ message CryptoHashConfig {
2282
2307
  // input. Outputs a base64 encoded representation of the encrypted output.
2283
2308
  // Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
2284
2309
  message CryptoDeterministicConfig {
2285
- // The key used by the encryption function.
2310
+ // The key used by the encryption function. For deterministic encryption
2311
+ // using AES-SIV, the provided key is internally expanded to 64 bytes prior to
2312
+ // use.
2286
2313
  CryptoKey crypto_key = 1;
2287
2314
 
2288
2315
  // The custom info type to annotate the surrogate with.
@@ -2346,6 +2373,16 @@ message ReplaceValueConfig {
2346
2373
  Value new_value = 1;
2347
2374
  }
2348
2375
 
2376
+ // Replace each input value with a value randomly selected from the dictionary.
2377
+ message ReplaceDictionaryConfig {
2378
+ oneof type {
2379
+ // A list of words to select from for random replacement. The
2380
+ // [limits](https://cloud.google.com/dlp/limits) page contains details about
2381
+ // the size limits of dictionaries.
2382
+ CustomInfoType.Dictionary.WordList word_list = 1;
2383
+ }
2384
+ }
2385
+
2349
2386
  // Replace each matching finding with the name of the info_type.
2350
2387
  message ReplaceWithInfoTypeConfig {
2351
2388
 
@@ -2429,8 +2466,8 @@ message CharacterMaskConfig {
2429
2466
  // the user for simple bucketing strategies.
2430
2467
  //
2431
2468
  // The transformed value will be a hyphenated string of
2432
- // {lower_bound}-{upper_bound}, i.e if lower_bound = 10 and upper_bound = 20
2433
- // all values that are within this bucket will be replaced with "10-20".
2469
+ // {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound
2470
+ // = 20, all values that are within this bucket will be replaced with "10-20".
2434
2471
  //
2435
2472
  // This can be used on data of type: double, long.
2436
2473
  //
@@ -2593,10 +2630,11 @@ message CryptoReplaceFfxFpeConfig {
2593
2630
  }
2594
2631
 
2595
2632
  // This is a data encryption key (DEK) (as opposed to
2596
- // a key encryption key (KEK) stored by KMS).
2597
- // When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
2598
- // IAM policy on the KMS CryptoKey (KEK) to ensure an attacker cannot
2599
- // unwrap the data crypto key.
2633
+ // a key encryption key (KEK) stored by Cloud Key Management Service
2634
+ // (Cloud KMS).
2635
+ // When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate
2636
+ // IAM policy on the KEK to ensure an attacker cannot
2637
+ // unwrap the DEK.
2600
2638
  message CryptoKey {
2601
2639
  // Sources of crypto keys.
2602
2640
  oneof source {
@@ -2606,7 +2644,7 @@ message CryptoKey {
2606
2644
  // Unwrapped crypto key
2607
2645
  UnwrappedCryptoKey unwrapped = 2;
2608
2646
 
2609
- // Kms wrapped key
2647
+ // Key wrapped using Cloud KMS
2610
2648
  KmsWrappedCryptoKey kms_wrapped = 3;
2611
2649
  }
2612
2650
  }
@@ -2631,10 +2669,16 @@ message UnwrappedCryptoKey {
2631
2669
  }
2632
2670
 
2633
2671
  // Include to use an existing data crypto key wrapped by KMS.
2634
- // The wrapped key must be a 128/192/256 bit key.
2672
+ // The wrapped key must be a 128-, 192-, or 256-bit key.
2635
2673
  // Authorization requires the following IAM permissions when sending a request
2636
- // to perform a crypto transformation using a kms-wrapped crypto key:
2674
+ // to perform a crypto transformation using a KMS-wrapped crypto key:
2637
2675
  // dlp.kms.encrypt
2676
+ //
2677
+ // For more information, see [Creating a wrapped key]
2678
+ // (https://cloud.google.com/dlp/docs/create-wrapped-key).
2679
+ //
2680
+ // Note: When you use Cloud KMS for cryptographic operations,
2681
+ // [charges apply](https://cloud.google.com/kms/pricing).
2638
2682
  message KmsWrappedCryptoKey {
2639
2683
  // Required. The wrapped data crypto key.
2640
2684
  bytes wrapped_key = 1 [(google.api.field_behavior) = REQUIRED];
@@ -2697,6 +2741,9 @@ message InfoTypeTransformations {
2697
2741
  // The transformation to apply to the field.
2698
2742
  message FieldTransformation {
2699
2743
  // Required. Input field(s) to apply the transformation to.
2744
+ // When you have columns that reference their position within a list,
2745
+ // omit the index from the FieldId. FieldId name matching ignores the index.
2746
+ // For example, instead of "contact.nums[0].type", use "contact.nums.type".
2700
2747
  repeated FieldId fields = 1 [(google.api.field_behavior) = REQUIRED];
2701
2748
 
2702
2749
  // Only apply the transformation if the condition evaluates to true for the
@@ -2818,6 +2865,18 @@ message TransformationOverview {
2818
2865
  // Only one of 'transformation', 'field_transformation', or 'record_suppress'
2819
2866
  // will be set.
2820
2867
  message TransformationSummary {
2868
+ // Possible outcomes of transformations.
2869
+ enum TransformationResultCode {
2870
+ // Unused
2871
+ TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0;
2872
+
2873
+ // Transformation completed without an error.
2874
+ SUCCESS = 1;
2875
+
2876
+ // Transformation had an error.
2877
+ ERROR = 2;
2878
+ }
2879
+
2821
2880
  // A collection that informs the user the number of times a particular
2822
2881
  // `TransformationResultCode` and error details occurred.
2823
2882
  message SummaryResult {
@@ -2832,18 +2891,6 @@ message TransformationSummary {
2832
2891
  string details = 3;
2833
2892
  }
2834
2893
 
2835
- // Possible outcomes of transformations.
2836
- enum TransformationResultCode {
2837
- // Unused
2838
- TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0;
2839
-
2840
- // Transformation completed without an error.
2841
- SUCCESS = 1;
2842
-
2843
- // Transformation had an error.
2844
- ERROR = 2;
2845
- }
2846
-
2847
2894
  // Set if the transformation was limited to a specific InfoType.
2848
2895
  InfoType info_type = 1;
2849
2896
 
@@ -2868,7 +2915,7 @@ message TransformationSummary {
2868
2915
  int64 transformed_bytes = 7;
2869
2916
  }
2870
2917
 
2871
- // Schedule for triggeredJobs.
2918
+ // Schedule for inspect job triggers.
2872
2919
  message Schedule {
2873
2920
  oneof option {
2874
2921
  // With this option a job is started a regular periodic basis. For
@@ -2955,7 +3002,7 @@ message DeidentifyTemplate {
2955
3002
  // Output only. The last update timestamp of an inspectTemplate.
2956
3003
  google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
2957
3004
 
2958
- // ///////////// // The core content of the template // ///////////////
3005
+ // The core content of the template.
2959
3006
  DeidentifyConfig deidentify_config = 6;
2960
3007
  }
2961
3008
 
@@ -2985,9 +3032,6 @@ message JobTrigger {
2985
3032
  Schedule schedule = 1;
2986
3033
 
2987
3034
  // For use with hybrid jobs. Jobs must be manually created and finished.
2988
- // Early access feature is in a pre-release state and might change or have
2989
- // limited support. For more information, see
2990
- // https://cloud.google.com/products#product-launch-stages.
2991
3035
  Manual manual = 2;
2992
3036
  }
2993
3037
  }
@@ -3090,11 +3134,11 @@ message Action {
3090
3134
 
3091
3135
  }
3092
3136
 
3093
- // Publish findings of a DlpJob to Cloud Data Catalog. Labels summarizing the
3137
+ // Publish findings of a DlpJob to Data Catalog. Labels summarizing the
3094
3138
  // results of the DlpJob will be applied to the entry for the resource scanned
3095
- // in Cloud Data Catalog. Any labels previously written by another DlpJob will
3139
+ // in Data Catalog. Any labels previously written by another DlpJob will
3096
3140
  // be deleted. InfoType naming patterns are strictly enforced when using this
3097
- // feature. Note that the findings will be persisted in Cloud Data Catalog
3141
+ // feature. Note that the findings will be persisted in Data Catalog
3098
3142
  // storage and are governed by Data Catalog service-specific policy, see
3099
3143
  // https://cloud.google.com/terms/service-terms
3100
3144
  // Only a single instance of this action can be specified and only allowed if
@@ -3402,10 +3446,11 @@ message CreateDlpJobRequest {
3402
3446
 
3403
3447
  // The configuration details for the specific type of job to run.
3404
3448
  oneof job {
3405
- // Set to control what and how to inspect.
3449
+ // An inspection job scans a storage repository for InfoTypes.
3406
3450
  InspectJobConfig inspect_job = 2;
3407
3451
 
3408
- // Set to choose what metric to calculate.
3452
+ // A risk analysis job calculates re-identification risk metrics for a
3453
+ // BigQuery table.
3409
3454
  RiskAnalysisJobConfig risk_job = 3;
3410
3455
  }
3411
3456
 
@@ -3477,7 +3522,7 @@ message ListJobTriggersRequest {
3477
3522
  // * Restrictions can be combined by `AND` or `OR` logical operators. A
3478
3523
  // sequence of restrictions implicitly uses `AND`.
3479
3524
  // * A restriction has the form of `{field} {operator} {value}`.
3480
- // * Supported fields/values for inspect jobs:
3525
+ // * Supported fields/values for inspect triggers:
3481
3526
  // - `status` - HEALTHY|PAUSED|CANCELLED
3482
3527
  // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
3483
3528
  // - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
@@ -3495,6 +3540,9 @@ message ListJobTriggersRequest {
3495
3540
  // The length of this field should be no more than 500 characters.
3496
3541
  string filter = 5;
3497
3542
 
3543
+ // The type of jobs. Will use `DlpJobType.INSPECT` if not set.
3544
+ DlpJobType type = 6;
3545
+
3498
3546
  // Deprecated. This field has no effect.
3499
3547
  string location_id = 7;
3500
3548
  }
@@ -3538,6 +3586,134 @@ message InspectJobConfig {
3538
3586
  repeated Action actions = 4;
3539
3587
  }
3540
3588
 
3589
+ // A task to execute when a data profile has been generated.
3590
+ message DataProfileAction {
3591
+ // If set, the detailed data profiles will be persisted to the location
3592
+ // of your choice whenever updated.
3593
+ message Export {
3594
+ // Store all table and column profiles in an existing table or a new table
3595
+ // in an existing dataset. Each re-generation will result in a new row in
3596
+ // BigQuery.
3597
+ BigQueryTable profile_table = 1;
3598
+ }
3599
+
3600
+ // Send a Pub/Sub message into the given Pub/Sub topic to connect other
3601
+ // systems to data profile generation. The message payload data will
3602
+ // be the byte serialization of `DataProfilePubSubMessage`.
3603
+ message PubSubNotification {
3604
+ // The levels of detail that can be included in the Pub/Sub message.
3605
+ enum DetailLevel {
3606
+ // Unused.
3607
+ DETAIL_LEVEL_UNSPECIFIED = 0;
3608
+
3609
+ // The full table data profile.
3610
+ TABLE_PROFILE = 1;
3611
+
3612
+ // The resource name of the table.
3613
+ RESOURCE_NAME = 2;
3614
+ }
3615
+
3616
+ // Cloud Pub/Sub topic to send notifications to.
3617
+ // Format is projects/{project}/topics/{topic}.
3618
+ string topic = 1;
3619
+
3620
+ // The type of event that triggers a Pub/Sub. At most one
3621
+ // `PubSubNotification` per EventType is permitted.
3622
+ EventType event = 2;
3623
+
3624
+ // Conditions (e.g., data risk or sensitivity level) for triggering a
3625
+ // Pub/Sub.
3626
+ DataProfilePubSubCondition pubsub_condition = 3;
3627
+
3628
+ // How much data to include in the Pub/Sub message. If the user wishes to
3629
+ // limit the size of the message, they can use resource_name and fetch the
3630
+ // profile fields they wish to. Per table profile (not per column).
3631
+ DetailLevel detail_of_message = 4;
3632
+ }
3633
+
3634
+ // Types of event that can trigger an action.
3635
+ enum EventType {
3636
+ // Unused.
3637
+ EVENT_TYPE_UNSPECIFIED = 0;
3638
+
3639
+ // New profile (not a re-profile).
3640
+ NEW_PROFILE = 1;
3641
+
3642
+ // Changed one of the following profile metrics:
3643
+ // * Table data risk score
3644
+ // * Table sensitivity score
3645
+ // * Table resource visibility
3646
+ // * Table encryption type
3647
+ // * Table predicted infoTypes
3648
+ // * Table other infoTypes
3649
+ CHANGED_PROFILE = 2;
3650
+
3651
+ // Table data risk score or sensitivity score increased.
3652
+ SCORE_INCREASED = 3;
3653
+
3654
+ // A user (non-internal) error occurred.
3655
+ ERROR_CHANGED = 4;
3656
+ }
3657
+
3658
+ oneof action {
3659
+ // Export data profiles into a provided location.
3660
+ Export export_data = 1;
3661
+
3662
+ // Publish a message into the Pub/Sub topic.
3663
+ PubSubNotification pub_sub_notification = 2;
3664
+ }
3665
+ }
3666
+
3667
+ // Configuration for setting up a job to scan resources for profile generation.
3668
+ // Only one data profile configuration may exist per organization, folder,
3669
+ // or project.
3670
+ //
3671
+ // The generated data profiles are retained according to the
3672
+ // [data retention policy]
3673
+ // (https://cloud.google.com/dlp/docs/data-profiles#retention).
3674
+ message DataProfileJobConfig {
3675
+ // The data to scan.
3676
+ DataProfileLocation location = 1;
3677
+
3678
+ // The project that will run the scan. The DLP service
3679
+ // account that exists within this project must have access to all resources
3680
+ // that are profiled, and the Cloud DLP API must be enabled.
3681
+ string project_id = 5;
3682
+
3683
+ // Detection logic for profile generation.
3684
+ //
3685
+ // Not all template features are used by profiles. FindingLimits,
3686
+ // include_quote and exclude_info_types have no impact on
3687
+ // data profiling.
3688
+ //
3689
+ // Multiple templates may be provided if there is data in multiple regions.
3690
+ // At most one template must be specified per-region (including "global").
3691
+ // Each region is scanned using the applicable template. If no region-specific
3692
+ // template is specified, but a "global" template is specified, it will be
3693
+ // copied to that region and used instead. If no global or region-specific
3694
+ // template is provided for a region with data, that region's data will not be
3695
+ // scanned.
3696
+ //
3697
+ // For more information, see
3698
+ // https://cloud.google.com/dlp/docs/data-profiles#data_residency.
3699
+ repeated string inspect_templates = 7;
3700
+
3701
+ // Actions to execute at the completion of the job.
3702
+ repeated DataProfileAction data_profile_actions = 6;
3703
+ }
3704
+
3705
+ // The data that will be profiled.
3706
+ message DataProfileLocation {
3707
+ // The location to be scanned.
3708
+ oneof location {
3709
+ // The ID of an organization to scan.
3710
+ int64 organization_id = 1;
3711
+
3712
+ // The ID of the Folder within an organization to scan.
3713
+ int64 folder_id = 2;
3714
+ }
3715
+ }
3716
+
3541
3717
  // Combines all of the information about a DLP job.
3542
3718
  message DlpJob {
3543
3719
  option (google.api.resource) = {
@@ -4312,7 +4488,7 @@ enum MatchingType {
4312
4488
  MATCHING_TYPE_INVERSE_MATCH = 3;
4313
4489
  }
4314
4490
 
4315
- // Options describing which parts of the provided content should be scanned.
4491
+ // Deprecated and unused.
4316
4492
  enum ContentOption {
4317
4493
  // Includes entire content of a file or a data stream.
4318
4494
  CONTENT_UNSPECIFIED = 0;
@@ -4347,7 +4523,7 @@ enum InfoTypeSupportedBy {
4347
4523
 
4348
4524
  // An enum to represent the various types of DLP jobs.
4349
4525
  enum DlpJobType {
4350
- // Unused
4526
+ // Defaults to INSPECT_JOB.
4351
4527
  DLP_JOB_TYPE_UNSPECIFIED = 0;
4352
4528
 
4353
4529
  // The job inspected Google Cloud for sensitive data.
@@ -4377,3 +4553,274 @@ enum StoredInfoTypeState {
4377
4553
  // use the `UpdateStoredInfoType` method to create a new version.
4378
4554
  INVALID = 4;
4379
4555
  }
4556
+
4557
+ // Score is a summary of all elements in the data profile.
4558
+ // A higher number means more sensitive.
4559
+ message SensitivityScore {
4560
+ // Various score levels for resources.
4561
+ enum SensitivityScoreLevel {
4562
+ // Unused.
4563
+ SENSITIVITY_SCORE_UNSPECIFIED = 0;
4564
+
4565
+ // No sensitive information detected. Limited access.
4566
+ SENSITIVITY_LOW = 10;
4567
+
4568
+ // Medium risk - PII, potentially sensitive data, or fields with free-text
4569
+ // data that are at higher risk of having intermittent sensitive data.
4570
+ // Consider limiting access.
4571
+ SENSITIVITY_MODERATE = 20;
4572
+
4573
+ // High risk – SPII may be present. Exfiltration of data may lead to user
4574
+ // data loss. Re-identification of users may be possible. Consider limiting
4575
+ // usage and or removing SPII.
4576
+ SENSITIVITY_HIGH = 30;
4577
+ }
4578
+
4579
+ // The score applied to the resource.
4580
+ SensitivityScoreLevel score = 1;
4581
+ }
4582
+
4583
+ // Score is a summary of all elements in the data profile.
4584
+ // A higher number means more risky.
4585
+ message DataRiskLevel {
4586
+ // Various score levels for resources.
4587
+ enum DataRiskLevelScore {
4588
+ // Unused.
4589
+ RISK_SCORE_UNSPECIFIED = 0;
4590
+
4591
+ // Low risk - Lower indication of sensitive data that appears to have
4592
+ // additional access restrictions in place or no indication of sensitive
4593
+ // data found.
4594
+ RISK_LOW = 10;
4595
+
4596
+ // Medium risk - Sensitive data may be present but additional access or fine
4597
+ // grain access restrictions appears to be present. Consider limiting
4598
+ // access even further or transforming data to mask.
4599
+ RISK_MODERATE = 20;
4600
+
4601
+ // High risk – SPII may be present. Access controls may include public
4602
+ // ACLs. Exfiltration of data may lead to user data loss. Re-identification
4603
+ // of users may be possible. Consider limiting usage and or removing SPII.
4604
+ RISK_HIGH = 30;
4605
+ }
4606
+
4607
+ // The score applied to the resource.
4608
+ DataRiskLevelScore score = 1;
4609
+ }
4610
+
4611
+ // How broadly a resource has been shared. New items may be added over time.
4612
+ // A higher number means more restricted.
4613
+ enum ResourceVisibility {
4614
+ // Unused.
4615
+ RESOURCE_VISIBILITY_UNSPECIFIED = 0;
4616
+
4617
+ // Visible to any user.
4618
+ RESOURCE_VISIBILITY_PUBLIC = 10;
4619
+
4620
+ // Visible only to specific users.
4621
+ RESOURCE_VISIBILITY_RESTRICTED = 20;
4622
+ }
4623
+
4624
+ // Snapshot of the configurations used to generate the profile.
4625
+ message DataProfileConfigSnapshot {
4626
+ // A copy of the inspection config used to generate this profile. This
4627
+ // is a copy of the inspect_template specified in `DataProfileJobConfig`.
4628
+ InspectConfig inspect_config = 2;
4629
+
4630
+ // A copy of the configuration used to generate this profile.
4631
+ DataProfileJobConfig data_profile_job = 3;
4632
+ }
4633
+
4634
+ // The profile for a scanned table.
4635
+ message TableDataProfile {
4636
+ // Possible states of a profile. New items may be added.
4637
+ enum State {
4638
+ // Unused.
4639
+ STATE_UNSPECIFIED = 0;
4640
+
4641
+ // The profile is currently running. Once a profile has finished it will
4642
+ // transition to DONE.
4643
+ RUNNING = 1;
4644
+
4645
+ // The profile is no longer generating.
4646
+ // If profile_status.status.code is 0, the profile succeeded, otherwise, it
4647
+ // failed.
4648
+ DONE = 2;
4649
+ }
4650
+
4651
+ // The name of the profile.
4652
+ string name = 1;
4653
+
4654
+ // The resource name to the project data profile for this table.
4655
+ string project_data_profile = 2;
4656
+
4657
+ // The GCP project ID that owns the BigQuery dataset.
4658
+ string dataset_project_id = 24;
4659
+
4660
+ // The BigQuery location where the dataset's data is stored.
4661
+ // See https://cloud.google.com/bigquery/docs/locations for supported
4662
+ // locations.
4663
+ string dataset_location = 29;
4664
+
4665
+ // The BigQuery dataset ID.
4666
+ string dataset_id = 25;
4667
+
4668
+ // The BigQuery table ID.
4669
+ string table_id = 26;
4670
+
4671
+ // The resource name of the table.
4672
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
4673
+ string full_resource = 3;
4674
+
4675
+ // Success or error status from the most recent profile generation attempt.
4676
+ // May be empty if the profile is still being generated.
4677
+ ProfileStatus profile_status = 21;
4678
+
4679
+ // State of a profile.
4680
+ State state = 22;
4681
+
4682
+ // The sensitivity score of this table.
4683
+ SensitivityScore sensitivity_score = 5;
4684
+
4685
+ // The data risk level of this table.
4686
+ DataRiskLevel data_risk_level = 6;
4687
+
4688
+ // The infoTypes predicted from this table's data.
4689
+ repeated InfoTypeSummary predicted_info_types = 27;
4690
+
4691
+ // Other infoTypes found in this table's data.
4692
+ repeated OtherInfoTypeSummary other_info_types = 28;
4693
+
4694
+ // The snapshot of the configurations used to generate the profile.
4695
+ DataProfileConfigSnapshot config_snapshot = 7;
4696
+
4697
+ // The time when this table was last modified
4698
+ google.protobuf.Timestamp last_modified_time = 8;
4699
+
4700
+ // Optional. The time when this table expires.
4701
+ google.protobuf.Timestamp expiration_time = 9;
4702
+
4703
+ // The number of columns profiled in the table.
4704
+ int64 scanned_column_count = 10;
4705
+
4706
+ // The number of columns skipped in the table because of an error.
4707
+ int64 failed_column_count = 11;
4708
+
4709
+ // The size of the table when the profile was generated.
4710
+ int64 table_size_bytes = 12;
4711
+
4712
+ // Number of rows in the table when the profile was generated.
4713
+ int64 row_count = 13;
4714
+
4715
+ // How the table is encrypted.
4716
+ EncryptionStatus encryption_status = 14;
4717
+
4718
+ // How broadly a resource has been shared.
4719
+ ResourceVisibility resource_visibility = 15;
4720
+
4721
+ // The last time the profile was generated.
4722
+ google.protobuf.Timestamp profile_last_generated = 16;
4723
+
4724
+ // The labels applied to the resource at the time the profile was generated.
4725
+ map<string, string> resource_labels = 17;
4726
+
4727
+ // The time at which the table was created.
4728
+ google.protobuf.Timestamp create_time = 23;
4729
+ }
4730
+
4731
+ message ProfileStatus {
4732
+ // Profiling status code and optional message
4733
+ google.rpc.Status status = 1;
4734
+
4735
+ // Time when the profile generation status was updated
4736
+ google.protobuf.Timestamp timestamp = 3;
4737
+ }
4738
+
4739
+ // How a resource is encrypted.
4740
+ enum EncryptionStatus {
4741
+ // Unused.
4742
+ ENCRYPTION_STATUS_UNSPECIFIED = 0;
4743
+
4744
+ // Google manages server-side encryption keys on your behalf.
4745
+ ENCRYPTION_GOOGLE_MANAGED = 1;
4746
+
4747
+ // Customer provides the key.
4748
+ ENCRYPTION_CUSTOMER_MANAGED = 2;
4749
+ }
4750
+
4751
+ // The infoType details for this column.
4752
+ message InfoTypeSummary {
4753
+ // The infoType.
4754
+ InfoType info_type = 1;
4755
+ }
4756
+
4757
+ // Infotype details for other infoTypes found within a column.
4758
+ message OtherInfoTypeSummary {
4759
+ // The other infoType.
4760
+ InfoType info_type = 1;
4761
+ }
4762
+
4763
+ // A condition for determining whether a PubSub should be triggered.
4764
+ message DataProfilePubSubCondition {
4765
+ // Various score levels for resources.
4766
+ enum ProfileScoreBucket {
4767
+ // Unused.
4768
+ PROFILE_SCORE_BUCKET_UNSPECIFIED = 0;
4769
+
4770
+ // High risk/sensitivity detected.
4771
+ HIGH = 1;
4772
+
4773
+ // Medium or high risk/sensitivity detected.
4774
+ MEDIUM_OR_HIGH = 2;
4775
+ }
4776
+
4777
+ // A condition consisting of a value.
4778
+ message PubSubCondition {
4779
+ // The value for the condition to trigger.
4780
+ oneof value {
4781
+ // The minimum data risk score that triggers the condition.
4782
+ ProfileScoreBucket minimum_risk_score = 1;
4783
+
4784
+ // The minimum sensitivity level that triggers the condition.
4785
+ ProfileScoreBucket minimum_sensitivity_score = 2;
4786
+ }
4787
+ }
4788
+
4789
+ // An expression, consisting of an operator and conditions.
4790
+ message PubSubExpressions {
4791
+ // Logical operators for conditional checks.
4792
+ enum PubSubLogicalOperator {
4793
+ // Unused.
4794
+ LOGICAL_OPERATOR_UNSPECIFIED = 0;
4795
+
4796
+ // Conditional OR.
4797
+ OR = 1;
4798
+
4799
+ // Conditional AND.
4800
+ AND = 2;
4801
+ }
4802
+
4803
+ // The operator to apply to the collection of conditions.
4804
+ PubSubLogicalOperator logical_operator = 1;
4805
+
4806
+ // Conditions to apply to the expression.
4807
+ repeated PubSubCondition conditions = 2;
4808
+ }
4809
+
4810
+ // An expression.
4811
+ PubSubExpressions expressions = 1;
4812
+ }
4813
+
4814
+ // The message that will be published to a Pub/Sub topic.
4815
+ // To receive a message of protocol buffer schema type, convert the message data
4816
+ // to an object of this proto class.
4817
+ // https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages
4818
+ message DataProfilePubSubMessage {
4819
+ // If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
4820
+ // Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
4821
+ // `full_resource` will be populated.
4822
+ TableDataProfile profile = 1;
4823
+
4824
+ // The event that caused the Pub/Sub message to be sent.
4825
+ DataProfileAction.EventType event = 2;
4826
+ }