3535 "TransformationResultStatusType" ,
3636 "TransformationContainerType" ,
3737 "TransformationType" ,
38+ "ProfileGeneration" ,
3839 "BigQueryTableTypeCollection" ,
3940 "BigQueryTableType" ,
4041 "DataProfileUpdateFrequency" ,
@@ -390,6 +391,25 @@ class TransformationType(proto.Enum):
390391 REDACT_IMAGE = 14
391392
392393
394+ class ProfileGeneration (proto .Enum ):
395+ r"""Whether a profile being created is the first generation or an
396+ update.
397+
398+ Values:
399+ PROFILE_GENERATION_UNSPECIFIED (0):
400+ Unused.
401+ PROFILE_GENERATION_NEW (1):
402+ The profile is the first profile for the
403+ resource.
404+ PROFILE_GENERATION_UPDATE (2):
405+ The profile is an update to a previous
406+ profile.
407+ """
408+ PROFILE_GENERATION_UNSPECIFIED = 0
409+ PROFILE_GENERATION_NEW = 1
410+ PROFILE_GENERATION_UPDATE = 2
411+
412+
393413class BigQueryTableTypeCollection (proto .Enum ):
394414 r"""Over time new types may be added. Currently VIEW, MATERIALIZED_VIEW,
395415 and SNAPSHOT are not supported.
@@ -7807,6 +7827,11 @@ class DataProfileAction(proto.Message):
78077827 pub_sub_notification (google.cloud.dlp_v2.types.DataProfileAction.PubSubNotification):
78087828 Publish a message into the Pub/Sub topic.
78097829
7830+ This field is a member of `oneof`_ ``action``.
7831+ tag_resources (google.cloud.dlp_v2.types.DataProfileAction.TagResources):
7832+ Tags the profiled resources with the
7833+ specified tag values.
7834+
78107835 This field is a member of `oneof`_ ``action``.
78117836 """
78127837
@@ -7922,6 +7947,109 @@ class DetailLevel(proto.Enum):
79227947 )
79237948 )
79247949
7950+ class TagResources (proto .Message ):
7951+ r"""If set, attaches the [tags]
7952+ (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
7953+ provided to profiled resources. Tags support `access
7954+ control <https://cloud.google.com/iam/docs/tags-access-control>`__.
7955+ You can conditionally grant or deny access to a resource based on
7956+ whether the resource has a specific tag.
7957+
7958+ Attributes:
7959+ tag_conditions (MutableSequence[google.cloud.dlp_v2.types.DataProfileAction.TagResources.TagCondition]):
7960+ The tags to associate with different
7961+ conditions.
7962+ profile_generations_to_tag (MutableSequence[google.cloud.dlp_v2.types.ProfileGeneration]):
7963+ The profile generations for which the tag should be attached
7964+ to resources. If you attach a tag to only new profiles, then
7965+ if the sensitivity score of a profile subsequently changes,
7966+ its tag doesn't change. By default, this field includes only
7967+ new profiles. To include both new and updated profiles for
7968+ tagging, this field should explicitly include both
7969+ ``PROFILE_GENERATION_NEW`` and
7970+ ``PROFILE_GENERATION_UPDATE``.
7971+ lower_data_risk_to_low (bool):
7972+ Whether applying a tag to a resource should lower the risk
7973+ of the profile for that resource. For example, in
7974+ conjunction with an `IAM deny
7975+ policy <https://cloud.google.com/iam/docs/deny-overview>`__,
7976+ you can deny all principals a permission if a tag value is
7977+ present, mitigating the risk of the resource. This also
7978+ lowers the data risk of resources at the lower levels of the
7979+ resource hierarchy. For example, reducing the data risk of a
7980+ table data profile also reduces the data risk of the
7981+ constituent column data profiles.
7982+ """
7983+
7984+ class TagCondition (proto .Message ):
7985+ r"""The tag to attach to profiles matching the condition. At most one
7986+ ``TagCondition`` can be specified per sensitivity level.
7987+
7988+
7989+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
7990+
7991+ Attributes:
7992+ tag (google.cloud.dlp_v2.types.DataProfileAction.TagResources.TagValue):
7993+ The tag value to attach to resources.
7994+ sensitivity_score (google.cloud.dlp_v2.types.SensitivityScore):
7995+ Conditions attaching the tag to a resource on
7996+ its profile having this sensitivity score.
7997+
7998+ This field is a member of `oneof`_ ``type``.
7999+ """
8000+
8001+ tag : "DataProfileAction.TagResources.TagValue" = proto .Field (
8002+ proto .MESSAGE ,
8003+ number = 1 ,
8004+ message = "DataProfileAction.TagResources.TagValue" ,
8005+ )
8006+ sensitivity_score : storage .SensitivityScore = proto .Field (
8007+ proto .MESSAGE ,
8008+ number = 2 ,
8009+ oneof = "type" ,
8010+ message = storage .SensitivityScore ,
8011+ )
8012+
8013+ class TagValue (proto .Message ):
8014+ r"""A value of a tag.
8015+
8016+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
8017+
8018+ Attributes:
8019+ namespaced_value (str):
8020+ The namespaced name for the tag value to attach to
8021+ resources. Must be in the format
8022+ ``{parent_id}/{tag_key_short_name}/{short_name}``, for
8023+ example, "123456/environment/prod".
8024+
8025+ This field is a member of `oneof`_ ``format``.
8026+ """
8027+
8028+ namespaced_value : str = proto .Field (
8029+ proto .STRING ,
8030+ number = 1 ,
8031+ oneof = "format" ,
8032+ )
8033+
8034+ tag_conditions : MutableSequence [
8035+ "DataProfileAction.TagResources.TagCondition"
8036+ ] = proto .RepeatedField (
8037+ proto .MESSAGE ,
8038+ number = 1 ,
8039+ message = "DataProfileAction.TagResources.TagCondition" ,
8040+ )
8041+ profile_generations_to_tag : MutableSequence [
8042+ "ProfileGeneration"
8043+ ] = proto .RepeatedField (
8044+ proto .ENUM ,
8045+ number = 2 ,
8046+ enum = "ProfileGeneration" ,
8047+ )
8048+ lower_data_risk_to_low : bool = proto .Field (
8049+ proto .BOOL ,
8050+ number = 3 ,
8051+ )
8052+
79258053 export_data : Export = proto .Field (
79268054 proto .MESSAGE ,
79278055 number = 1 ,
@@ -7934,6 +8062,12 @@ class DetailLevel(proto.Enum):
79348062 oneof = "action" ,
79358063 message = PubSubNotification ,
79368064 )
8065+ tag_resources : TagResources = proto .Field (
8066+ proto .MESSAGE ,
8067+ number = 8 ,
8068+ oneof = "action" ,
8069+ message = TagResources ,
8070+ )
79378071
79388072
79398073class DataProfileJobConfig (proto .Message ):
0 commit comments