|
1 | | -// Copyright 2018 Google Inc. |
| 1 | +// Copyright 2018 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. |
@@ -333,6 +333,71 @@ service DlpService { |
333 | 333 | body: "*" |
334 | 334 | }; |
335 | 335 | } |
| 336 | + |
| 337 | + // Creates a pre-built stored infoType to be used for inspection. |
| 338 | + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to |
| 339 | + // learn more. |
| 340 | + rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) returns (StoredInfoType) { |
| 341 | + option (google.api.http) = { |
| 342 | + post: "/v2/{parent=organizations/*}/storedInfoTypes" |
| 343 | + body: "*" |
| 344 | + additional_bindings { |
| 345 | + post: "/v2/{parent=projects/*}/storedInfoTypes" |
| 346 | + body: "*" |
| 347 | + } |
| 348 | + }; |
| 349 | + } |
| 350 | + |
| 351 | + // Updates the stored infoType by creating a new version. The existing version |
| 352 | + // will continue to be used until the new version is ready. |
| 353 | + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to |
| 354 | + // learn more. |
| 355 | + rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) returns (StoredInfoType) { |
| 356 | + option (google.api.http) = { |
| 357 | + patch: "/v2/{name=organizations/*/storedInfoTypes/*}" |
| 358 | + body: "*" |
| 359 | + additional_bindings { |
| 360 | + patch: "/v2/{name=projects/*/storedInfoTypes/*}" |
| 361 | + body: "*" |
| 362 | + } |
| 363 | + }; |
| 364 | + } |
| 365 | + |
| 366 | + // Gets a stored infoType. |
| 367 | + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to |
| 368 | + // learn more. |
| 369 | + rpc GetStoredInfoType(GetStoredInfoTypeRequest) returns (StoredInfoType) { |
| 370 | + option (google.api.http) = { |
| 371 | + get: "/v2/{name=organizations/*/storedInfoTypes/*}" |
| 372 | + additional_bindings { |
| 373 | + get: "/v2/{name=projects/*/storedInfoTypes/*}" |
| 374 | + } |
| 375 | + }; |
| 376 | + } |
| 377 | + |
| 378 | + // Lists stored infoTypes. |
| 379 | + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to |
| 380 | + // learn more. |
| 381 | + rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) returns (ListStoredInfoTypesResponse) { |
| 382 | + option (google.api.http) = { |
| 383 | + get: "/v2/{parent=organizations/*}/storedInfoTypes" |
| 384 | + additional_bindings { |
| 385 | + get: "/v2/{parent=projects/*}/storedInfoTypes" |
| 386 | + } |
| 387 | + }; |
| 388 | + } |
| 389 | + |
| 390 | + // Deletes a stored infoType. |
| 391 | + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to |
| 392 | + // learn more. |
| 393 | + rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) returns (google.protobuf.Empty) { |
| 394 | + option (google.api.http) = { |
| 395 | + delete: "/v2/{name=organizations/*/storedInfoTypes/*}" |
| 396 | + additional_bindings { |
| 397 | + delete: "/v2/{name=projects/*/storedInfoTypes/*}" |
| 398 | + } |
| 399 | + }; |
| 400 | + } |
336 | 401 | } |
337 | 402 |
|
338 | 403 | // Configuration description of the scanning process. |
@@ -375,6 +440,11 @@ message InspectConfig { |
375 | 440 | // When no InfoTypes or CustomInfoTypes are specified in a request, the |
376 | 441 | // system may automatically choose what detectors to run. By default this may |
377 | 442 | // be all types, but may change over time as detectors are updated. |
| 443 | + // |
| 444 | + // The special InfoType name "ALL_BASIC" can be used to trigger all detectors, |
| 445 | + // but may change over time as new InfoTypes are added. If you need precise |
| 446 | + // control and predictability as to what detectors are run you should specify |
| 447 | + // specific InfoTypes listed in the reference. |
378 | 448 | repeated InfoType info_types = 1; |
379 | 449 |
|
380 | 450 | // Only returns findings equal or above this threshold. The default is |
@@ -2597,6 +2667,157 @@ message DeleteDeidentifyTemplateRequest { |
2597 | 2667 | string name = 1; |
2598 | 2668 | } |
2599 | 2669 |
|
| 2670 | +// Configuration for a custom dictionary created from a data source of any size |
| 2671 | +// up to the maximum size defined in the |
| 2672 | +// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of |
| 2673 | +// dictionary creation are stored in the specified Google Cloud Storage |
| 2674 | +// location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries |
| 2675 | +// that satisfy the size requirements. |
| 2676 | +message LargeCustomDictionaryConfig { |
| 2677 | + // Location to store dictionary artifacts in Google Cloud Storage. These files |
| 2678 | + // will only be accessible by project owners and the DLP API. If any of these |
| 2679 | + // artifacts are modified, the dictionary is considered invalid and can no |
| 2680 | + // longer be used. |
| 2681 | + CloudStoragePath output_path = 1; |
| 2682 | + |
| 2683 | + oneof source { |
| 2684 | + // Set of files containing newline-delimited lists of dictionary phrases. |
| 2685 | + CloudStorageFileSet cloud_storage_file_set = 2; |
| 2686 | + |
| 2687 | + // Field in a BigQuery table where each cell represents a dictionary phrase. |
| 2688 | + BigQueryField big_query_field = 3; |
| 2689 | + } |
| 2690 | +} |
| 2691 | + |
| 2692 | +// Configuration for a StoredInfoType. |
| 2693 | +message StoredInfoTypeConfig { |
| 2694 | + // Display name of the StoredInfoType (max 256 characters). |
| 2695 | + string display_name = 1; |
| 2696 | + |
| 2697 | + // Description of the StoredInfoType (max 256 characters). |
| 2698 | + string description = 2; |
| 2699 | + |
| 2700 | + oneof type { |
| 2701 | + // StoredInfoType where findings are defined by a dictionary of phrases. |
| 2702 | + LargeCustomDictionaryConfig large_custom_dictionary = 3; |
| 2703 | + } |
| 2704 | +} |
| 2705 | + |
| 2706 | +// Version of a StoredInfoType, including the configuration used to build it, |
| 2707 | +// create timestamp, and current state. |
| 2708 | +message StoredInfoTypeVersion { |
| 2709 | + // StoredInfoType configuration. |
| 2710 | + StoredInfoTypeConfig config = 1; |
| 2711 | + |
| 2712 | + // Create timestamp of the version. Read-only, determined by the system |
| 2713 | + // when the version is created. |
| 2714 | + google.protobuf.Timestamp create_time = 2; |
| 2715 | + |
| 2716 | + // Stored info type version state. Read-only, updated by the system |
| 2717 | + // during dictionary creation. |
| 2718 | + StoredInfoTypeState state = 3; |
| 2719 | + |
| 2720 | + // Errors that occurred when creating this storedInfoType version, or |
| 2721 | + // anomalies detected in the storedInfoType data that render it unusable. Only |
| 2722 | + // the five most recent errors will be displayed, with the most recent error |
| 2723 | + // appearing first. |
| 2724 | + // <p>For example, some of the data for stored custom dictionaries is put in |
| 2725 | + // the user's Google Cloud Storage bucket, and if this data is modified or |
| 2726 | + // deleted by the user or another system, the dictionary becomes invalid. |
| 2727 | + // <p>If any errors occur, fix the problem indicated by the error message and |
| 2728 | + // use the UpdateStoredInfoType API method to create another version of the |
| 2729 | + // storedInfoType to continue using it, reusing the same `config` if it was |
| 2730 | + // not the source of the error. |
| 2731 | + repeated Error errors = 4; |
| 2732 | +} |
| 2733 | + |
| 2734 | +// StoredInfoType resource message that contains information about the current |
| 2735 | +// version and any pending updates. |
| 2736 | +message StoredInfoType { |
| 2737 | + // Resource name. |
| 2738 | + string name = 1; |
| 2739 | + |
| 2740 | + // Current version of the stored info type. |
| 2741 | + StoredInfoTypeVersion current_version = 2; |
| 2742 | + |
| 2743 | + // Pending versions of the stored info type. Empty if no versions are |
| 2744 | + // pending. |
| 2745 | + repeated StoredInfoTypeVersion pending_versions = 3; |
| 2746 | +} |
| 2747 | + |
| 2748 | +// Request message for CreateStoredInfoType. |
| 2749 | +message CreateStoredInfoTypeRequest { |
| 2750 | + // The parent resource name, for example projects/my-project-id or |
| 2751 | + // organizations/my-org-id. |
| 2752 | + string parent = 1; |
| 2753 | + |
| 2754 | + // Configuration of the storedInfoType to create. |
| 2755 | + StoredInfoTypeConfig config = 2; |
| 2756 | + |
| 2757 | + // The storedInfoType ID can contain uppercase and lowercase letters, |
| 2758 | + // numbers, and hyphens; that is, it must match the regular |
| 2759 | + // expression: `[a-zA-Z\\d-]+`. The maximum length is 100 |
| 2760 | + // characters. Can be empty to allow the system to generate one. |
| 2761 | + string stored_info_type_id = 3; |
| 2762 | +} |
| 2763 | + |
| 2764 | +// Request message for UpdateStoredInfoType. |
| 2765 | +message UpdateStoredInfoTypeRequest { |
| 2766 | + // Resource name of organization and storedInfoType to be updated, for |
| 2767 | + // example `organizations/433245324/storedInfoTypes/432452342` or |
| 2768 | + // projects/project-id/storedInfoTypes/432452342. |
| 2769 | + string name = 1; |
| 2770 | + |
| 2771 | + // Updated configuration for the storedInfoType. If not provided, a new |
| 2772 | + // version of the storedInfoType will be created with the existing |
| 2773 | + // configuration. |
| 2774 | + StoredInfoTypeConfig config = 2; |
| 2775 | + |
| 2776 | + // Mask to control which fields get updated. |
| 2777 | + google.protobuf.FieldMask update_mask = 3; |
| 2778 | +} |
| 2779 | + |
| 2780 | +// Request message for GetStoredInfoType. |
| 2781 | +message GetStoredInfoTypeRequest { |
| 2782 | + // Resource name of the organization and storedInfoType to be read, for |
| 2783 | + // example `organizations/433245324/storedInfoTypes/432452342` or |
| 2784 | + // projects/project-id/storedInfoTypes/432452342. |
| 2785 | + string name = 1; |
| 2786 | +} |
| 2787 | + |
| 2788 | +// Request message for ListStoredInfoTypes. |
| 2789 | +message ListStoredInfoTypesRequest { |
| 2790 | + // The parent resource name, for example projects/my-project-id or |
| 2791 | + // organizations/my-org-id. |
| 2792 | + string parent = 1; |
| 2793 | + |
| 2794 | + // Optional page token to continue retrieval. Comes from previous call |
| 2795 | + // to `ListStoredInfoTypes`. |
| 2796 | + string page_token = 2; |
| 2797 | + |
| 2798 | + // Optional size of the page, can be limited by server. If zero server returns |
| 2799 | + // a page of max size 100. |
| 2800 | + int32 page_size = 3; |
| 2801 | +} |
| 2802 | + |
| 2803 | +// Response message for ListStoredInfoTypes. |
| 2804 | +message ListStoredInfoTypesResponse { |
| 2805 | + // List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest. |
| 2806 | + repeated StoredInfoType stored_info_types = 1; |
| 2807 | + |
| 2808 | + // If the next page is available then the next page token to be used |
| 2809 | + // in following ListStoredInfoTypes request. |
| 2810 | + string next_page_token = 2; |
| 2811 | +} |
| 2812 | + |
| 2813 | +// Request message for DeleteStoredInfoType. |
| 2814 | +message DeleteStoredInfoTypeRequest { |
| 2815 | + // Resource name of the organization and storedInfoType to be deleted, for |
| 2816 | + // example `organizations/433245324/storedInfoTypes/432452342` or |
| 2817 | + // projects/project-id/storedInfoTypes/432452342. |
| 2818 | + string name = 1; |
| 2819 | +} |
| 2820 | + |
2600 | 2821 | // Options describing which parts of the provided content should be scanned. |
2601 | 2822 | enum ContentOption { |
2602 | 2823 | // Includes entire content of a file or a data stream. |
@@ -2656,3 +2877,23 @@ enum DlpJobType { |
2656 | 2877 | // The job executed a Risk Analysis computation. |
2657 | 2878 | RISK_ANALYSIS_JOB = 2; |
2658 | 2879 | } |
| 2880 | + |
| 2881 | +// State of a StoredInfoType version. |
| 2882 | +enum StoredInfoTypeState { |
| 2883 | + STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; |
| 2884 | + |
| 2885 | + // StoredInfoType version is being created. |
| 2886 | + PENDING = 1; |
| 2887 | + |
| 2888 | + // StoredInfoType version is ready for use. |
| 2889 | + READY = 2; |
| 2890 | + |
| 2891 | + // StoredInfoType creation failed. All relevant error messages are returned in |
| 2892 | + // the `StoredInfoTypeVersion` message. |
| 2893 | + FAILED = 3; |
| 2894 | + |
| 2895 | + // StoredInfoType is no longer valid because artifacts stored in |
| 2896 | + // user-controlled storage were modified. To fix an invalid StoredInfoType, |
| 2897 | + // use the `UpdateStoredInfoType` method to create a new version. |
| 2898 | + INVALID = 4; |
| 2899 | +} |
0 commit comments