diff --git a/google/cloud/dlp/__init__.py b/google/cloud/dlp/__init__.py index fc2c38e4..9ad401fd 100644 --- a/google/cloud/dlp/__init__.py +++ b/google/cloud/dlp/__init__.py @@ -117,6 +117,7 @@ from google.cloud.dlp_v2.types.dlp import RedactImageResponse from google.cloud.dlp_v2.types.dlp import ReidentifyContentRequest from google.cloud.dlp_v2.types.dlp import ReidentifyContentResponse +from google.cloud.dlp_v2.types.dlp import ReplaceDictionaryConfig from google.cloud.dlp_v2.types.dlp import ReplaceValueConfig from google.cloud.dlp_v2.types.dlp import ReplaceWithInfoTypeConfig from google.cloud.dlp_v2.types.dlp import RiskAnalysisJobConfig @@ -276,6 +277,7 @@ "RedactImageResponse", "ReidentifyContentRequest", "ReidentifyContentResponse", + "ReplaceDictionaryConfig", "ReplaceValueConfig", "ReplaceWithInfoTypeConfig", "RiskAnalysisJobConfig", diff --git a/google/cloud/dlp_v2/__init__.py b/google/cloud/dlp_v2/__init__.py index 043c5c92..5208be75 100644 --- a/google/cloud/dlp_v2/__init__.py +++ b/google/cloud/dlp_v2/__init__.py @@ -117,6 +117,7 @@ from .types.dlp import RedactImageResponse from .types.dlp import ReidentifyContentRequest from .types.dlp import ReidentifyContentResponse +from .types.dlp import ReplaceDictionaryConfig from .types.dlp import ReplaceValueConfig from .types.dlp import ReplaceWithInfoTypeConfig from .types.dlp import RiskAnalysisJobConfig @@ -303,6 +304,7 @@ "ReidentifyContentRequest", "ReidentifyContentResponse", "RelationalOperator", + "ReplaceDictionaryConfig", "ReplaceValueConfig", "ReplaceWithInfoTypeConfig", "RiskAnalysisJobConfig", diff --git a/google/cloud/dlp_v2/services/dlp_service/async_client.py b/google/cloud/dlp_v2/services/dlp_service/async_client.py index ce3b4891..09b353a2 100644 --- a/google/cloud/dlp_v2/services/dlp_service/async_client.py +++ b/google/cloud/dlp_v2/services/dlp_service/async_client.py @@ -1716,10 +1716,6 @@ async def hybrid_inspect_job_trigger( trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Args: request (Union[google.cloud.dlp_v2.types.HybridInspectJobTriggerRequest, dict]): @@ -2154,15 +2150,16 @@ async def create_dlp_job( on the ``request`` instance; if ``request`` is provided, this should not be set. inspect_job (:class:`google.cloud.dlp_v2.types.InspectJobConfig`): - Set to control what and how to - inspect. + An inspection job scans a storage + repository for InfoTypes. This corresponds to the ``inspect_job`` field on the ``request`` instance; if ``request`` is provided, this should not be set. risk_job (:class:`google.cloud.dlp_v2.types.RiskAnalysisJobConfig`): - Set to choose what metric to - calculate. + A risk analysis job calculates re- + dentification risk metrics for a + BigQuery table. This corresponds to the ``risk_job`` field on the ``request`` instance; if ``request`` is provided, this @@ -3036,12 +3033,8 @@ async def hybrid_inspect_dlp_job( metadata: Sequence[Tuple[str, str]] = (), ) -> dlp.HybridInspectResponse: r"""Inspect hybrid content and store findings to a job. - To review the findings inspect the job. Inspection will + To review the findings, inspect the job. Inspection will occur asynchronously. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Args: request (Union[google.cloud.dlp_v2.types.HybridInspectDlpJobRequest, dict]): @@ -3114,10 +3107,7 @@ async def finish_dlp_job( ) -> None: r"""Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions - that have not yet run. Early access feature is in a pre- - release state and might change or have limited support. - For more information, see - https://cloud.google.com/products#product-launch-stages. + that have not yet run. Args: request (Union[google.cloud.dlp_v2.types.FinishDlpJobRequest, dict]): diff --git a/google/cloud/dlp_v2/services/dlp_service/client.py b/google/cloud/dlp_v2/services/dlp_service/client.py index 4526ce6b..f4248309 100644 --- a/google/cloud/dlp_v2/services/dlp_service/client.py +++ b/google/cloud/dlp_v2/services/dlp_service/client.py @@ -1883,10 +1883,6 @@ def hybrid_inspect_job_trigger( trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Args: request (Union[google.cloud.dlp_v2.types.HybridInspectJobTriggerRequest, dict]): @@ -2294,15 +2290,16 @@ def create_dlp_job( on the ``request`` instance; if ``request`` is provided, this should not be set. inspect_job (google.cloud.dlp_v2.types.InspectJobConfig): - Set to control what and how to - inspect. + An inspection job scans a storage + repository for InfoTypes. This corresponds to the ``inspect_job`` field on the ``request`` instance; if ``request`` is provided, this should not be set. risk_job (google.cloud.dlp_v2.types.RiskAnalysisJobConfig): - Set to choose what metric to - calculate. + A risk analysis job calculates re- + dentification risk metrics for a + BigQuery table. This corresponds to the ``risk_job`` field on the ``request`` instance; if ``request`` is provided, this @@ -3117,12 +3114,8 @@ def hybrid_inspect_dlp_job( metadata: Sequence[Tuple[str, str]] = (), ) -> dlp.HybridInspectResponse: r"""Inspect hybrid content and store findings to a job. - To review the findings inspect the job. Inspection will + To review the findings, inspect the job. Inspection will occur asynchronously. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Args: request (Union[google.cloud.dlp_v2.types.HybridInspectDlpJobRequest, dict]): @@ -3195,10 +3188,7 @@ def finish_dlp_job( ) -> None: r"""Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions - that have not yet run. Early access feature is in a pre- - release state and might change or have limited support. - For more information, see - https://cloud.google.com/products#product-launch-stages. + that have not yet run. Args: request (Union[google.cloud.dlp_v2.types.FinishDlpJobRequest, dict]): diff --git a/google/cloud/dlp_v2/services/dlp_service/transports/grpc.py b/google/cloud/dlp_v2/services/dlp_service/transports/grpc.py index d1ec327c..0883d33b 100644 --- a/google/cloud/dlp_v2/services/dlp_service/transports/grpc.py +++ b/google/cloud/dlp_v2/services/dlp_service/transports/grpc.py @@ -749,10 +749,6 @@ def hybrid_inspect_job_trigger( trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Returns: Callable[[~.HybridInspectJobTriggerRequest], @@ -1179,12 +1175,8 @@ def hybrid_inspect_dlp_job( r"""Return a callable for the hybrid inspect dlp job method over gRPC. Inspect hybrid content and store findings to a job. - To review the findings inspect the job. Inspection will + To review the findings, inspect the job. Inspection will occur asynchronously. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Returns: Callable[[~.HybridInspectDlpJobRequest], @@ -1210,10 +1202,7 @@ def finish_dlp_job(self) -> Callable[[dlp.FinishDlpJobRequest], empty_pb2.Empty] Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions - that have not yet run. Early access feature is in a pre- - release state and might change or have limited support. - For more information, see - https://cloud.google.com/products#product-launch-stages. + that have not yet run. Returns: Callable[[~.FinishDlpJobRequest], diff --git a/google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py b/google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py index d95a7458..73e8d525 100644 --- a/google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py +++ b/google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py @@ -766,10 +766,6 @@ def hybrid_inspect_job_trigger( trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Returns: Callable[[~.HybridInspectJobTriggerRequest], @@ -1208,12 +1204,8 @@ def hybrid_inspect_dlp_job( r"""Return a callable for the hybrid inspect dlp job method over gRPC. Inspect hybrid content and store findings to a job. - To review the findings inspect the job. Inspection will + To review the findings, inspect the job. Inspection will occur asynchronously. - Early access feature is in a pre-release state and might - change or have limited support. For more information, - see - https://cloud.google.com/products#product-launch-stages. Returns: Callable[[~.HybridInspectDlpJobRequest], @@ -1241,10 +1233,7 @@ def finish_dlp_job( Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions - that have not yet run. Early access feature is in a pre- - release state and might change or have limited support. - For more information, see - https://cloud.google.com/products#product-launch-stages. + that have not yet run. Returns: Callable[[~.FinishDlpJobRequest], diff --git a/google/cloud/dlp_v2/types/__init__.py b/google/cloud/dlp_v2/types/__init__.py index 66c89af5..5b5e2f28 100644 --- a/google/cloud/dlp_v2/types/__init__.py +++ b/google/cloud/dlp_v2/types/__init__.py @@ -114,6 +114,7 @@ RedactImageResponse, ReidentifyContentRequest, ReidentifyContentResponse, + ReplaceDictionaryConfig, ReplaceValueConfig, ReplaceWithInfoTypeConfig, RiskAnalysisJobConfig, @@ -274,6 +275,7 @@ "RedactImageResponse", "ReidentifyContentRequest", "ReidentifyContentResponse", + "ReplaceDictionaryConfig", "ReplaceValueConfig", "ReplaceWithInfoTypeConfig", "RiskAnalysisJobConfig", diff --git a/google/cloud/dlp_v2/types/dlp.py b/google/cloud/dlp_v2/types/dlp.py index ecb041ef..6be3c2be 100644 --- a/google/cloud/dlp_v2/types/dlp.py +++ b/google/cloud/dlp_v2/types/dlp.py @@ -89,6 +89,7 @@ "CryptoHashConfig", "CryptoDeterministicConfig", "ReplaceValueConfig", + "ReplaceDictionaryConfig", "ReplaceWithInfoTypeConfig", "RedactConfig", "CharsToIgnore", @@ -393,6 +394,7 @@ class InspectConfig(proto.Message): class FindingLimits(proto.Message): r"""Configuration to control the number of findings returned. + Cannot be set if de-identification is requested. Attributes: max_findings_per_item (int): @@ -461,7 +463,10 @@ class ByteContentItem(proto.Message): """ class BytesType(proto.Enum): - r"""The type of data being sent for inspection.""" + r"""The type of data being sent for inspection. To learn more, see + `Supported file + types `__. + """ BYTES_TYPE_UNSPECIFIED = 0 IMAGE = 6 IMAGE_JPEG = 1 @@ -517,7 +522,7 @@ class ContentItem(proto.Message): class Table(proto.Message): r"""Structured content to inspect. Up to 50,000 ``Value``\ s per request allowed. See - https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table + https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table to learn more. Attributes: @@ -620,6 +625,8 @@ class Finding(proto.Message): finding. job_name (str): The job that stored the finding. + finding_id (str): + The unique finding id. """ name = proto.Field(proto.STRING, number=14,) @@ -636,6 +643,7 @@ class Finding(proto.Message): proto.MESSAGE, number=11, message=timestamp_pb2.Timestamp, ) job_name = proto.Field(proto.STRING, number=13,) + finding_id = proto.Field(proto.STRING, number=15,) class Location(proto.Message): @@ -1353,7 +1361,8 @@ class InspectDataSourceDetails(proto.Message): requested_options (google.cloud.dlp_v2.types.InspectDataSourceDetails.RequestedOptions): The configuration used for this job. result (google.cloud.dlp_v2.types.InspectDataSourceDetails.Result): - A summary of the outcome of this inspect job. + A summary of the outcome of this inspection + job. """ class RequestedOptions(proto.Message): @@ -1386,11 +1395,7 @@ class Result(proto.Message): type were found during inspect job. hybrid_stats (google.cloud.dlp_v2.types.HybridInspectStatistics): Statistics related to the processing of - hybrid inspect. Early access feature is in a - pre-release state and might change or have - limited support. For more information, see - https://cloud.google.com/products#product- - launch-stages. + hybrid inspect. """ processed_bytes = proto.Field(proto.INT64, number=1,) @@ -2589,7 +2594,7 @@ class PrimitiveTransformation(proto.Message): Attributes: replace_config (google.cloud.dlp_v2.types.ReplaceValueConfig): - Replace + Replace with a specified value. This field is a member of `oneof`_ ``transformation``. redact_config (google.cloud.dlp_v2.types.RedactConfig): @@ -2631,6 +2636,11 @@ class PrimitiveTransformation(proto.Message): crypto_deterministic_config (google.cloud.dlp_v2.types.CryptoDeterministicConfig): Deterministic Crypto + This field is a member of `oneof`_ ``transformation``. + replace_dictionary_config (google.cloud.dlp_v2.types.ReplaceDictionaryConfig): + Replace with a value randomly drawn (with + replacement) from a dictionary. + This field is a member of `oneof`_ ``transformation``. """ @@ -2679,6 +2689,12 @@ class PrimitiveTransformation(proto.Message): oneof="transformation", message="CryptoDeterministicConfig", ) + replace_dictionary_config = proto.Field( + proto.MESSAGE, + number=13, + oneof="transformation", + message="ReplaceDictionaryConfig", + ) class TimePartConfig(proto.Message): @@ -2729,7 +2745,10 @@ class CryptoDeterministicConfig(proto.Message): Attributes: crypto_key (google.cloud.dlp_v2.types.CryptoKey): - The key used by the encryption function. + The key used by the encryption function. For + deterministic encryption using AES-SIV, the + provided key is internally expanded to 64 bytes + prior to use. surrogate_info_type (google.cloud.dlp_v2.types.InfoType): The custom info type to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it @@ -2810,6 +2829,30 @@ class ReplaceValueConfig(proto.Message): new_value = proto.Field(proto.MESSAGE, number=1, message="Value",) +class ReplaceDictionaryConfig(proto.Message): + r"""Replace each input value with a value randomly selected from + the dictionary. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + word_list (google.cloud.dlp_v2.types.CustomInfoType.Dictionary.WordList): + A list of words to select from for random replacement. The + `limits `__ page + contains details about the size limits of dictionaries. + + This field is a member of `oneof`_ ``type``. + """ + + word_list = proto.Field( + proto.MESSAGE, + number=1, + oneof="type", + message=storage.CustomInfoType.Dictionary.WordList, + ) + + class ReplaceWithInfoTypeConfig(proto.Message): r"""Replace each matching finding with the name of the info_type. """ @@ -2914,9 +2957,9 @@ class FixedSizeBucketingConfig(proto.Message): user for simple bucketing strategies. The transformed value will be a hyphenated string of - {lower_bound}-{upper_bound}, i.e if lower_bound = 10 and upper_bound - = 20 all values that are within this bucket will be replaced with - "10-20". + {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and + upper_bound = 20, all values that are within this bucket will be + replaced with "10-20". This can be used on data of type: double, long. @@ -3122,10 +3165,11 @@ class FfxCommonNativeAlphabet(proto.Enum): class CryptoKey(proto.Message): r"""This is a data encryption key (DEK) (as opposed to - a key encryption key (KEK) stored by KMS). - When using KMS to wrap/unwrap DEKs, be sure to set an - appropriate IAM policy on the KMS CryptoKey (KEK) to ensure an - attacker cannot unwrap the data crypto key. + a key encryption key (KEK) stored by Cloud Key Management + Service (Cloud KMS). + When using Cloud KMS to wrap or unwrap a DEK, be sure to set an + appropriate IAM policy on the KEK to ensure an attacker cannot + unwrap the DEK. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -3144,7 +3188,7 @@ class CryptoKey(proto.Message): This field is a member of `oneof`_ ``source``. kms_wrapped (google.cloud.dlp_v2.types.KmsWrappedCryptoKey): - Kms wrapped key + Key wrapped using Cloud KMS This field is a member of `oneof`_ ``source``. """ @@ -3191,11 +3235,17 @@ class UnwrappedCryptoKey(proto.Message): class KmsWrappedCryptoKey(proto.Message): - r"""Include to use an existing data crypto key wrapped by KMS. - The wrapped key must be a 128/192/256 bit key. - Authorization requires the following IAM permissions when - sending a request to perform a crypto transformation using a - kms-wrapped crypto key: dlp.kms.encrypt + r"""Include to use an existing data crypto key wrapped by KMS. The + wrapped key must be a 128-, 192-, or 256-bit key. Authorization + requires the following IAM permissions when sending a request to + perform a crypto transformation using a KMS-wrapped crypto key: + dlp.kms.encrypt + + For more information, see [Creating a wrapped key] + (https://cloud.google.com/dlp/docs/create-wrapped-key). + + Note: When you use Cloud KMS for cryptographic operations, `charges + apply `__. Attributes: wrapped_key (bytes): @@ -3304,8 +3354,11 @@ class FieldTransformation(proto.Message): Attributes: fields (Sequence[google.cloud.dlp_v2.types.FieldId]): - Required. Input field(s) to apply the - transformation to. + Required. Input field(s) to apply the transformation to. + When you have columns that reference their position within a + list, omit the index from the FieldId. FieldId name matching + ignores the index. For example, instead of + "contact.nums[0].type", use "contact.nums.type". condition (google.cloud.dlp_v2.types.RecordCondition): Only apply the transformation if the condition evaluates to true for the given ``RecordCondition``. The conditions are @@ -3558,7 +3611,7 @@ class SummaryResult(proto.Message): class Schedule(proto.Message): - r"""Schedule for triggeredJobs. + r"""Schedule for inspect job triggers. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -3649,8 +3702,7 @@ class DeidentifyTemplate(proto.Message): Output only. The last update timestamp of an inspectTemplate. deidentify_config (google.cloud.dlp_v2.types.DeidentifyConfig): - ///////////// // The core content of the - template // /////////////// + The core content of the template. """ name = proto.Field(proto.STRING, number=1,) @@ -3759,12 +3811,7 @@ class Trigger(proto.Message): This field is a member of `oneof`_ ``trigger``. manual (google.cloud.dlp_v2.types.Manual): For use with hybrid jobs. Jobs must be - manually created and finished. Early access - feature is in a pre-release state and might - change or have limited support. For more - information, see - https://cloud.google.com/products#product- - launch-stages. + manually created and finished. This field is a member of `oneof`_ ``trigger``. """ @@ -3884,14 +3931,14 @@ class PublishSummaryToCscc(proto.Message): """ class PublishFindingsToCloudDataCatalog(proto.Message): - r"""Publish findings of a DlpJob to Cloud Data Catalog. Labels + r"""Publish findings of a DlpJob to Data Catalog. Labels summarizing the results of the DlpJob will be applied to the - entry for the resource scanned in Cloud Data Catalog. Any labels + entry for the resource scanned in Data Catalog. Any labels previously written by another DlpJob will be deleted. InfoType naming patterns are strictly enforced when using this feature. - Note that the findings will be persisted in Cloud Data Catalog - storage and are governed by Data Catalog service-specific - policy, see https://cloud.google.com/terms/service-terms + Note that the findings will be persisted in Data Catalog storage + and are governed by Data Catalog service-specific policy, see + https://cloud.google.com/terms/service-terms Only a single instance of this action can be specified and only allowed if all resources being scanned are BigQuery tables. Compatible with: Inspect @@ -4235,11 +4282,13 @@ class CreateDlpJobRequest(proto.Message): parent=projects/example-project/locations/europe-west3 inspect_job (google.cloud.dlp_v2.types.InspectJobConfig): - Set to control what and how to inspect. + An inspection job scans a storage repository + for InfoTypes. This field is a member of `oneof`_ ``job``. risk_job (google.cloud.dlp_v2.types.RiskAnalysisJobConfig): - Set to choose what metric to calculate. + A risk analysis job calculates re- + dentification risk metrics for a BigQuery table. This field is a member of `oneof`_ ``job``. job_id (str): @@ -4324,7 +4373,7 @@ class ListJobTriggersRequest(proto.Message): ``AND``. - A restriction has the form of ``{field} {operator} {value}``. - - Supported fields/values for inspect jobs: + - Supported fields/values for inspect triggers: - ``status`` - HEALTHY|PAUSED|CANCELLED - ``inspected_storage`` - @@ -4349,6 +4398,9 @@ class ListJobTriggersRequest(proto.Message): The length of this field should be no more than 500 characters. + type_ (google.cloud.dlp_v2.types.DlpJobType): + The type of jobs. Will use ``DlpJobType.INSPECT`` if not + set. location_id (str): Deprecated. This field has no effect. """ @@ -4358,6 +4410,7 @@ class ListJobTriggersRequest(proto.Message): page_size = proto.Field(proto.INT32, number=3,) order_by = proto.Field(proto.STRING, number=4,) filter = proto.Field(proto.STRING, number=5,) + type_ = proto.Field(proto.ENUM, number=6, enum="DlpJobType",) location_id = proto.Field(proto.STRING, number=7,) diff --git a/google/cloud/dlp_v2/types/storage.py b/google/cloud/dlp_v2/types/storage.py index 046ca9e9..9900252c 100644 --- a/google/cloud/dlp_v2/types/storage.py +++ b/google/cloud/dlp_v2/types/storage.py @@ -88,9 +88,12 @@ class InfoType(proto.Message): when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern ``[A-Za-z0-9$-_]{1,64}``. + version (str): + Optional version name for this InfoType. """ name = proto.Field(proto.STRING, number=1,) + version = proto.Field(proto.STRING, number=2,) class StoredType(proto.Message): @@ -185,12 +188,13 @@ class Dictionary(proto.Message): Plane `__ will be replaced with whitespace when scanning for matches, so the dictionary phrase "Sam Johnson" will match all three phrases "sam - johnson", "Sam, Johnson", and "Sam (Johnson)". Additionally, the - characters surrounding any match must be of a different type than - the adjacent characters within the word, so letters must be next to - non-letters and digits next to non-digits. For example, the - dictionary word "jen" will match the first three letters of the text - "jen123" but will return no matches for "jennifer". + johnson", + Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) + surrounding any match must be of a different type than the adjacent + characters within the word, so letters must be next to non-letters + and digits next to non-digits. For example, the dictionary word + "jen" will match the first three letters of the text "jen123" but + will return no matches for "jennifer". Dictionary words containing a large number of characters that are not letters or digits may result in unexpected findings because such @@ -198,7 +202,9 @@ class Dictionary(proto.Message): `limits `__ page contains details about the size limits of dictionaries. For dictionaries that do not fit within these constraints, consider using - ``LargeCustomDictionaryConfig`` in the ``StoredInfoType`` API. + ``LargeCustomDictionaryConfig`` in the + `limits `__ page contains + details about This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -254,9 +260,11 @@ class Regex(proto.Message): be found under the google/re2 repository on GitHub. group_indexes (Sequence[int]): - The index of the submatch to extract as - findings. When not specified, the entire match - is returned. No more than 3 may be included. + (https://github.com/google/re2/wiki/Syntax) + can be found under the The index of the submatch + to extract as findings. When not specified, the + entire match is returned. No more than 3 may be + included. """ pattern = proto.Field(proto.STRING, number=1,) @@ -267,10 +275,10 @@ class SurrogateType(proto.Message): such as ```CryptoReplaceFfxFpeConfig`` `__. These types of transformations are those that perform - pseudonymization, thereby producing a "surrogate" as output. This - should be used in conjunction with a field on the transformation - such as ``surrogate_info_type``. This CustomInfoType does not - support the use of ``detection_rules``. + pseudonymization, thereby producing a "surrogate" as + ```CryptoReplaceFfxFpeConfig`` `__. + transformation such as ``surrogate_info_type``. This CustomInfoType + does not support the use of ``detection_rules``. """ @@ -519,9 +527,11 @@ class CloudStorageRegexFileSet(proto.Message): guide can be found under the google/re2 repository on GitHub. exclude_regex (Sequence[str]): - A list of regular expressions matching file paths to - exclude. All files in the bucket that match at least one of - these regular expressions will be excluded from the scan. + `syntax `__; a + guide can be found A list of regular expressions matching + file paths to exclude. All files in the bucket that match at + least one of these regular expressions will be excluded from + the scan. Regular expressions use RE2 `syntax `__; a @@ -545,13 +555,15 @@ class CloudStorageOptions(proto.Message): Max number of bytes to scan from a file. If a scanned file's size is bigger than this value then the rest of the bytes are omitted. Only one of bytes_limit_per_file and - bytes_limit_per_file_percent can be specified. + bytes_limit_per_file_percent can be specified. Cannot be set + if de-identification is requested. bytes_limit_per_file_percent (int): Max percentage of bytes to scan from a file. The rest are omitted. The number of bytes scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of bytes_limit_per_file and - bytes_limit_per_file_percent can be specified. + bytes_limit_per_file_percent can be specified. Cannot be set + if de-identification is requested. file_types (Sequence[google.cloud.dlp_v2.types.FileType]): List of file type groups to include in the scan. If empty, all files are scanned and available data format processors @@ -671,6 +683,8 @@ class BigQueryOptions(proto.Message): References to fields excluded from scanning. This allows you to skip inspection of entire columns which you know have no findings. + included_fields (Sequence[google.cloud.dlp_v2.types.FieldId]): + Limit scanning only to these fields. """ class SampleMethod(proto.Enum): @@ -690,6 +704,7 @@ class SampleMethod(proto.Enum): rows_limit_percent = proto.Field(proto.INT32, number=6,) sample_method = proto.Field(proto.ENUM, number=4, enum=SampleMethod,) excluded_fields = proto.RepeatedField(proto.MESSAGE, number=5, message="FieldId",) + included_fields = proto.RepeatedField(proto.MESSAGE, number=7, message="FieldId",) class StorageConfig(proto.Message): @@ -717,11 +732,6 @@ class StorageConfig(proto.Message): This field is a member of `oneof`_ ``type``. hybrid_options (google.cloud.dlp_v2.types.HybridOptions): Hybrid inspection options. - Early access feature is in a pre-release state - and might change or have limited support. For - more information, see - https://cloud.google.com/products#product- - launch-stages. This field is a member of `oneof`_ ``type``. timespan_config (google.cloud.dlp_v2.types.StorageConfig.TimespanConfig): diff --git a/scripts/fixup_dlp_v2_keywords.py b/scripts/fixup_dlp_v2_keywords.py index 3519a707..8e98626f 100644 --- a/scripts/fixup_dlp_v2_keywords.py +++ b/scripts/fixup_dlp_v2_keywords.py @@ -65,7 +65,7 @@ class dlpCallTransformer(cst.CSTTransformer): 'list_dlp_jobs': ('parent', 'filter', 'page_size', 'page_token', 'type_', 'order_by', 'location_id', ), 'list_info_types': ('parent', 'language_code', 'filter', 'location_id', ), 'list_inspect_templates': ('parent', 'page_token', 'page_size', 'order_by', 'location_id', ), - 'list_job_triggers': ('parent', 'page_token', 'page_size', 'order_by', 'filter', 'location_id', ), + 'list_job_triggers': ('parent', 'page_token', 'page_size', 'order_by', 'filter', 'type_', 'location_id', ), 'list_stored_info_types': ('parent', 'page_token', 'page_size', 'order_by', 'location_id', ), 'redact_image': ('parent', 'location_id', 'inspect_config', 'image_redaction_configs', 'include_findings', 'byte_item', ), 'reidentify_content': ('parent', 'reidentify_config', 'inspect_config', 'item', 'inspect_template_name', 'reidentify_template_name', 'location_id', ),