Class: Google::Cloud::Dlp::V2::DataProfileAction

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/privacy/dlp/v2/dlp.rb

Overview

A task to execute when a data profile has been generated.

Defined Under Namespace

Modules: EventType Classes: Export, PubSubNotification, PublishToChronicle, PublishToDataplexCatalog, PublishToSecurityCommandCenter, TagResources

Instance Attribute Summary collapse

Instance Attribute Details

#export_data::Google::Cloud::Dlp::V2::DataProfileAction::Export

Returns Export data profiles into a provided location.

Note: The following fields are mutually exclusive: export_data, pub_sub_notification, publish_to_chronicle, publish_to_scc, tag_resources, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::DataProfileAction::Export)

    Export data profiles into a provided location.

    Note: The following fields are mutually exclusive: export_data, pub_sub_notification, publish_to_chronicle, publish_to_scc, tag_resources, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.



4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 4746

class DataProfileAction
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If set, the detailed data profiles will be persisted to the location
  # of your choice whenever updated.
  # @!attribute [rw] profile_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store all profiles to BigQuery.
  #
  #     * The system will create a new dataset and table for you if none are
  #       are provided. The dataset will be named
  #       `sensitive_data_protection_discovery` and table will be named
  #       `discovery_profiles`. This table will be placed in the same project as
  #       the container project running the scan. After the first profile is
  #       generated and the dataset and table are created, the discovery scan
  #       configuration will be updated with the dataset and table names.
  #     * See [Analyze data profiles stored in
  #     BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles).
  #     * See [Sample queries for your BigQuery
  #     table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries).
  #     *  Data is inserted using [streaming
  #        insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #        and so data may be in the buffer for a period of time after the
  #        profile has finished.
  #      * The Pub/Sub notification is sent before the streaming buffer is
  #        guaranteed to be written, so data may not be instantly
  #        visible to queries by the time your topic receives the Pub/Sub
  #        notification.
  #      * The best practice is to use the same table for an entire organization
  #        so that you can take advantage of the [provided Data Studio
  #        reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report).
  #        If you use VPC Service Controls to define security perimeters, then
  #        you must use a separate table for each boundary.
  # @!attribute [rw] sample_findings_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store sample [data profile
  #     findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table
  #     or a new table in an existing dataset. Each regeneration will result in
  #     new rows in BigQuery. Data is inserted using [streaming
  #     insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #     and so data may be in the buffer for a period of time after the profile
  #     has finished.
  class Export
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Send a Pub/Sub message into the given Pub/Sub topic to connect other
  # systems to data profile generation. The message payload data will
  # be the byte serialization of `DataProfilePubSubMessage`.
  # @!attribute [rw] topic
  #   @return [::String]
  #     Cloud Pub/Sub topic to send notifications to.
  #     Format is projects/\\{project}/topics/\\{topic}.
  # @!attribute [rw] event
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType]
  #     The type of event that triggers a Pub/Sub. At most one
  #     `PubSubNotification` per EventType is permitted.
  # @!attribute [rw] pubsub_condition
  #   @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition]
  #     Conditions (e.g., data risk or sensitivity level) for triggering a
  #     Pub/Sub.
  # @!attribute [rw] detail_of_message
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel]
  #     How much data to include in the Pub/Sub message. If the user wishes to
  #     limit the size of the message, they can use resource_name and fetch the
  #     profile fields they wish to. Per table profile (not per column).
  class PubSubNotification
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The levels of detail that can be included in the Pub/Sub message.
    module DetailLevel
      # Unused.
      DETAIL_LEVEL_UNSPECIFIED = 0

      # The full table data profile.
      TABLE_PROFILE = 1

      # The name of the profiled resource.
      RESOURCE_NAME = 2

      # The full file store data profile.
      FILE_STORE_PROFILE = 3
    end
  end

  # Message expressing intention to publish to Google Security Operations.
  class PublishToChronicle
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, a summary finding will be created or updated in Security Command
  # Center for each profile.
  class PublishToSecurityCommandCenter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Create Dataplex Universal Catalog aspects for profiled resources with the
  # aspect type Sensitive Data Protection Profile. To learn more about aspects,
  # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether creating a Dataplex Universal Catalog aspect for a profiled
  #     resource should lower the risk of the profile for that resource. This
  #     also lowers the data risk of resources at the lower levels of the
  #     resource hierarchy. For example, reducing the data risk of a table data
  #     profile also reduces the data risk of the constituent column data
  #     profiles.
  class PublishToDataplexCatalog
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, attaches the [tags]
  # (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
  # provided to profiled resources. Tags support [access
  # control](https://cloud.google.com/iam/docs/tags-access-control). You can
  # conditionally grant or deny access to a resource based on whether the
  # resource has a specific tag.
  # @!attribute [rw] tag_conditions
  #   @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>]
  #     The tags to associate with different conditions.
  # @!attribute [rw] profile_generations_to_tag
  #   @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>]
  #     The profile generations for which the tag should be attached to
  #     resources. If you attach a tag to only new profiles, then if the
  #     sensitivity score of a profile subsequently changes, its tag doesn't
  #     change. By default, this field includes only new profiles. To include
  #     both new and updated profiles for tagging, this field should explicitly
  #     include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether applying a tag to a resource should lower the risk of the profile
  #     for that resource. For example, in conjunction with an [IAM deny
  #     policy](https://cloud.google.com/iam/docs/deny-overview), you can deny
  #     all principals a permission if a tag value is present, mitigating the
  #     risk of the resource. This also lowers the data risk of resources at the
  #     lower levels of the resource hierarchy. For example, reducing the data
  #     risk of a table data profile also reduces the data risk of the
  #     constituent column data profiles.
  class TagResources
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The tag to attach to profiles matching the condition. At most one
    # `TagCondition` can be specified per sensitivity level.
    # @!attribute [rw] tag
    #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue]
    #     The tag value to attach to resources.
    # @!attribute [rw] sensitivity_score
    #   @return [::Google::Cloud::Dlp::V2::SensitivityScore]
    #     Conditions attaching the tag to a resource on its profile having this
    #     sensitivity score.
    class TagCondition
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # A value of a tag.
    # @!attribute [rw] namespaced_value
    #   @return [::String]
    #     The namespaced name for the tag value to attach to resources. Must be
    #     in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for
    #     example, "123456/environment/prod" for an organization parent, or
    #     "my-project/environment/prod" for a project parent.
    class TagValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Types of event that can trigger an action.
  module EventType
    # Unused.
    EVENT_TYPE_UNSPECIFIED = 0

    # New profile (not a re-profile).
    NEW_PROFILE = 1

    # One of the following profile metrics changed: Data risk score,
    # Sensitivity score, Resource visibility, Encryption type, Predicted
    # infoTypes, Other infoTypes
    CHANGED_PROFILE = 2

    # Table data risk score or sensitivity score increased.
    SCORE_INCREASED = 3

    # A user (non-internal) error occurred.
    ERROR_CHANGED = 4
  end
end

#pub_sub_notification::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification

Returns Publish a message into the Pub/Sub topic.

Note: The following fields are mutually exclusive: pub_sub_notification, export_data, publish_to_chronicle, publish_to_scc, tag_resources, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification)

    Publish a message into the Pub/Sub topic.

    Note: The following fields are mutually exclusive: pub_sub_notification, export_data, publish_to_chronicle, publish_to_scc, tag_resources, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.



4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 4746

class DataProfileAction
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If set, the detailed data profiles will be persisted to the location
  # of your choice whenever updated.
  # @!attribute [rw] profile_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store all profiles to BigQuery.
  #
  #     * The system will create a new dataset and table for you if none are
  #       are provided. The dataset will be named
  #       `sensitive_data_protection_discovery` and table will be named
  #       `discovery_profiles`. This table will be placed in the same project as
  #       the container project running the scan. After the first profile is
  #       generated and the dataset and table are created, the discovery scan
  #       configuration will be updated with the dataset and table names.
  #     * See [Analyze data profiles stored in
  #     BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles).
  #     * See [Sample queries for your BigQuery
  #     table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries).
  #     *  Data is inserted using [streaming
  #        insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #        and so data may be in the buffer for a period of time after the
  #        profile has finished.
  #      * The Pub/Sub notification is sent before the streaming buffer is
  #        guaranteed to be written, so data may not be instantly
  #        visible to queries by the time your topic receives the Pub/Sub
  #        notification.
  #      * The best practice is to use the same table for an entire organization
  #        so that you can take advantage of the [provided Data Studio
  #        reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report).
  #        If you use VPC Service Controls to define security perimeters, then
  #        you must use a separate table for each boundary.
  # @!attribute [rw] sample_findings_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store sample [data profile
  #     findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table
  #     or a new table in an existing dataset. Each regeneration will result in
  #     new rows in BigQuery. Data is inserted using [streaming
  #     insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #     and so data may be in the buffer for a period of time after the profile
  #     has finished.
  class Export
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Send a Pub/Sub message into the given Pub/Sub topic to connect other
  # systems to data profile generation. The message payload data will
  # be the byte serialization of `DataProfilePubSubMessage`.
  # @!attribute [rw] topic
  #   @return [::String]
  #     Cloud Pub/Sub topic to send notifications to.
  #     Format is projects/\\{project}/topics/\\{topic}.
  # @!attribute [rw] event
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType]
  #     The type of event that triggers a Pub/Sub. At most one
  #     `PubSubNotification` per EventType is permitted.
  # @!attribute [rw] pubsub_condition
  #   @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition]
  #     Conditions (e.g., data risk or sensitivity level) for triggering a
  #     Pub/Sub.
  # @!attribute [rw] detail_of_message
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel]
  #     How much data to include in the Pub/Sub message. If the user wishes to
  #     limit the size of the message, they can use resource_name and fetch the
  #     profile fields they wish to. Per table profile (not per column).
  class PubSubNotification
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The levels of detail that can be included in the Pub/Sub message.
    module DetailLevel
      # Unused.
      DETAIL_LEVEL_UNSPECIFIED = 0

      # The full table data profile.
      TABLE_PROFILE = 1

      # The name of the profiled resource.
      RESOURCE_NAME = 2

      # The full file store data profile.
      FILE_STORE_PROFILE = 3
    end
  end

  # Message expressing intention to publish to Google Security Operations.
  class PublishToChronicle
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, a summary finding will be created or updated in Security Command
  # Center for each profile.
  class PublishToSecurityCommandCenter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Create Dataplex Universal Catalog aspects for profiled resources with the
  # aspect type Sensitive Data Protection Profile. To learn more about aspects,
  # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether creating a Dataplex Universal Catalog aspect for a profiled
  #     resource should lower the risk of the profile for that resource. This
  #     also lowers the data risk of resources at the lower levels of the
  #     resource hierarchy. For example, reducing the data risk of a table data
  #     profile also reduces the data risk of the constituent column data
  #     profiles.
  class PublishToDataplexCatalog
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, attaches the [tags]
  # (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
  # provided to profiled resources. Tags support [access
  # control](https://cloud.google.com/iam/docs/tags-access-control). You can
  # conditionally grant or deny access to a resource based on whether the
  # resource has a specific tag.
  # @!attribute [rw] tag_conditions
  #   @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>]
  #     The tags to associate with different conditions.
  # @!attribute [rw] profile_generations_to_tag
  #   @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>]
  #     The profile generations for which the tag should be attached to
  #     resources. If you attach a tag to only new profiles, then if the
  #     sensitivity score of a profile subsequently changes, its tag doesn't
  #     change. By default, this field includes only new profiles. To include
  #     both new and updated profiles for tagging, this field should explicitly
  #     include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether applying a tag to a resource should lower the risk of the profile
  #     for that resource. For example, in conjunction with an [IAM deny
  #     policy](https://cloud.google.com/iam/docs/deny-overview), you can deny
  #     all principals a permission if a tag value is present, mitigating the
  #     risk of the resource. This also lowers the data risk of resources at the
  #     lower levels of the resource hierarchy. For example, reducing the data
  #     risk of a table data profile also reduces the data risk of the
  #     constituent column data profiles.
  class TagResources
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The tag to attach to profiles matching the condition. At most one
    # `TagCondition` can be specified per sensitivity level.
    # @!attribute [rw] tag
    #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue]
    #     The tag value to attach to resources.
    # @!attribute [rw] sensitivity_score
    #   @return [::Google::Cloud::Dlp::V2::SensitivityScore]
    #     Conditions attaching the tag to a resource on its profile having this
    #     sensitivity score.
    class TagCondition
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # A value of a tag.
    # @!attribute [rw] namespaced_value
    #   @return [::String]
    #     The namespaced name for the tag value to attach to resources. Must be
    #     in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for
    #     example, "123456/environment/prod" for an organization parent, or
    #     "my-project/environment/prod" for a project parent.
    class TagValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Types of event that can trigger an action.
  module EventType
    # Unused.
    EVENT_TYPE_UNSPECIFIED = 0

    # New profile (not a re-profile).
    NEW_PROFILE = 1

    # One of the following profile metrics changed: Data risk score,
    # Sensitivity score, Resource visibility, Encryption type, Predicted
    # infoTypes, Other infoTypes
    CHANGED_PROFILE = 2

    # Table data risk score or sensitivity score increased.
    SCORE_INCREASED = 3

    # A user (non-internal) error occurred.
    ERROR_CHANGED = 4
  end
end

#publish_to_chronicle::Google::Cloud::Dlp::V2::DataProfileAction::PublishToChronicle

Returns Publishes generated data profiles to Google Security Operations. For more information, see Use Sensitive Data Protection data in context-aware analytics.

Note: The following fields are mutually exclusive: publish_to_chronicle, export_data, pub_sub_notification, publish_to_scc, tag_resources, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:



4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 4746

class DataProfileAction
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If set, the detailed data profiles will be persisted to the location
  # of your choice whenever updated.
  # @!attribute [rw] profile_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store all profiles to BigQuery.
  #
  #     * The system will create a new dataset and table for you if none are
  #       are provided. The dataset will be named
  #       `sensitive_data_protection_discovery` and table will be named
  #       `discovery_profiles`. This table will be placed in the same project as
  #       the container project running the scan. After the first profile is
  #       generated and the dataset and table are created, the discovery scan
  #       configuration will be updated with the dataset and table names.
  #     * See [Analyze data profiles stored in
  #     BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles).
  #     * See [Sample queries for your BigQuery
  #     table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries).
  #     *  Data is inserted using [streaming
  #        insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #        and so data may be in the buffer for a period of time after the
  #        profile has finished.
  #      * The Pub/Sub notification is sent before the streaming buffer is
  #        guaranteed to be written, so data may not be instantly
  #        visible to queries by the time your topic receives the Pub/Sub
  #        notification.
  #      * The best practice is to use the same table for an entire organization
  #        so that you can take advantage of the [provided Data Studio
  #        reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report).
  #        If you use VPC Service Controls to define security perimeters, then
  #        you must use a separate table for each boundary.
  # @!attribute [rw] sample_findings_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store sample [data profile
  #     findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table
  #     or a new table in an existing dataset. Each regeneration will result in
  #     new rows in BigQuery. Data is inserted using [streaming
  #     insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #     and so data may be in the buffer for a period of time after the profile
  #     has finished.
  class Export
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Send a Pub/Sub message into the given Pub/Sub topic to connect other
  # systems to data profile generation. The message payload data will
  # be the byte serialization of `DataProfilePubSubMessage`.
  # @!attribute [rw] topic
  #   @return [::String]
  #     Cloud Pub/Sub topic to send notifications to.
  #     Format is projects/\\{project}/topics/\\{topic}.
  # @!attribute [rw] event
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType]
  #     The type of event that triggers a Pub/Sub. At most one
  #     `PubSubNotification` per EventType is permitted.
  # @!attribute [rw] pubsub_condition
  #   @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition]
  #     Conditions (e.g., data risk or sensitivity level) for triggering a
  #     Pub/Sub.
  # @!attribute [rw] detail_of_message
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel]
  #     How much data to include in the Pub/Sub message. If the user wishes to
  #     limit the size of the message, they can use resource_name and fetch the
  #     profile fields they wish to. Per table profile (not per column).
  class PubSubNotification
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The levels of detail that can be included in the Pub/Sub message.
    module DetailLevel
      # Unused.
      DETAIL_LEVEL_UNSPECIFIED = 0

      # The full table data profile.
      TABLE_PROFILE = 1

      # The name of the profiled resource.
      RESOURCE_NAME = 2

      # The full file store data profile.
      FILE_STORE_PROFILE = 3
    end
  end

  # Message expressing intention to publish to Google Security Operations.
  class PublishToChronicle
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, a summary finding will be created or updated in Security Command
  # Center for each profile.
  class PublishToSecurityCommandCenter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Create Dataplex Universal Catalog aspects for profiled resources with the
  # aspect type Sensitive Data Protection Profile. To learn more about aspects,
  # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether creating a Dataplex Universal Catalog aspect for a profiled
  #     resource should lower the risk of the profile for that resource. This
  #     also lowers the data risk of resources at the lower levels of the
  #     resource hierarchy. For example, reducing the data risk of a table data
  #     profile also reduces the data risk of the constituent column data
  #     profiles.
  class PublishToDataplexCatalog
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, attaches the [tags]
  # (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
  # provided to profiled resources. Tags support [access
  # control](https://cloud.google.com/iam/docs/tags-access-control). You can
  # conditionally grant or deny access to a resource based on whether the
  # resource has a specific tag.
  # @!attribute [rw] tag_conditions
  #   @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>]
  #     The tags to associate with different conditions.
  # @!attribute [rw] profile_generations_to_tag
  #   @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>]
  #     The profile generations for which the tag should be attached to
  #     resources. If you attach a tag to only new profiles, then if the
  #     sensitivity score of a profile subsequently changes, its tag doesn't
  #     change. By default, this field includes only new profiles. To include
  #     both new and updated profiles for tagging, this field should explicitly
  #     include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether applying a tag to a resource should lower the risk of the profile
  #     for that resource. For example, in conjunction with an [IAM deny
  #     policy](https://cloud.google.com/iam/docs/deny-overview), you can deny
  #     all principals a permission if a tag value is present, mitigating the
  #     risk of the resource. This also lowers the data risk of resources at the
  #     lower levels of the resource hierarchy. For example, reducing the data
  #     risk of a table data profile also reduces the data risk of the
  #     constituent column data profiles.
  class TagResources
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The tag to attach to profiles matching the condition. At most one
    # `TagCondition` can be specified per sensitivity level.
    # @!attribute [rw] tag
    #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue]
    #     The tag value to attach to resources.
    # @!attribute [rw] sensitivity_score
    #   @return [::Google::Cloud::Dlp::V2::SensitivityScore]
    #     Conditions attaching the tag to a resource on its profile having this
    #     sensitivity score.
    class TagCondition
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # A value of a tag.
    # @!attribute [rw] namespaced_value
    #   @return [::String]
    #     The namespaced name for the tag value to attach to resources. Must be
    #     in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for
    #     example, "123456/environment/prod" for an organization parent, or
    #     "my-project/environment/prod" for a project parent.
    class TagValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Types of event that can trigger an action.
  module EventType
    # Unused.
    EVENT_TYPE_UNSPECIFIED = 0

    # New profile (not a re-profile).
    NEW_PROFILE = 1

    # One of the following profile metrics changed: Data risk score,
    # Sensitivity score, Resource visibility, Encryption type, Predicted
    # infoTypes, Other infoTypes
    CHANGED_PROFILE = 2

    # Table data risk score or sensitivity score increased.
    SCORE_INCREASED = 3

    # A user (non-internal) error occurred.
    ERROR_CHANGED = 4
  end
end

#publish_to_dataplex_catalog::Google::Cloud::Dlp::V2::DataProfileAction::PublishToDataplexCatalog

Returns Publishes a portion of each profile to Dataplex Universal Catalog with the aspect type Sensitive Data Protection Profile.

Note: The following fields are mutually exclusive: publish_to_dataplex_catalog, export_data, pub_sub_notification, publish_to_chronicle, publish_to_scc, tag_resources. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::DataProfileAction::PublishToDataplexCatalog)

    Publishes a portion of each profile to Dataplex Universal Catalog with the aspect type Sensitive Data Protection Profile.

    Note: The following fields are mutually exclusive: publish_to_dataplex_catalog, export_data, pub_sub_notification, publish_to_chronicle, publish_to_scc, tag_resources. If a field in that set is populated, all other fields in the set will automatically be cleared.



4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 4746

class DataProfileAction
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If set, the detailed data profiles will be persisted to the location
  # of your choice whenever updated.
  # @!attribute [rw] profile_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store all profiles to BigQuery.
  #
  #     * The system will create a new dataset and table for you if none are
  #       are provided. The dataset will be named
  #       `sensitive_data_protection_discovery` and table will be named
  #       `discovery_profiles`. This table will be placed in the same project as
  #       the container project running the scan. After the first profile is
  #       generated and the dataset and table are created, the discovery scan
  #       configuration will be updated with the dataset and table names.
  #     * See [Analyze data profiles stored in
  #     BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles).
  #     * See [Sample queries for your BigQuery
  #     table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries).
  #     *  Data is inserted using [streaming
  #        insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #        and so data may be in the buffer for a period of time after the
  #        profile has finished.
  #      * The Pub/Sub notification is sent before the streaming buffer is
  #        guaranteed to be written, so data may not be instantly
  #        visible to queries by the time your topic receives the Pub/Sub
  #        notification.
  #      * The best practice is to use the same table for an entire organization
  #        so that you can take advantage of the [provided Data Studio
  #        reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report).
  #        If you use VPC Service Controls to define security perimeters, then
  #        you must use a separate table for each boundary.
  # @!attribute [rw] sample_findings_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store sample [data profile
  #     findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table
  #     or a new table in an existing dataset. Each regeneration will result in
  #     new rows in BigQuery. Data is inserted using [streaming
  #     insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #     and so data may be in the buffer for a period of time after the profile
  #     has finished.
  class Export
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Send a Pub/Sub message into the given Pub/Sub topic to connect other
  # systems to data profile generation. The message payload data will
  # be the byte serialization of `DataProfilePubSubMessage`.
  # @!attribute [rw] topic
  #   @return [::String]
  #     Cloud Pub/Sub topic to send notifications to.
  #     Format is projects/\\{project}/topics/\\{topic}.
  # @!attribute [rw] event
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType]
  #     The type of event that triggers a Pub/Sub. At most one
  #     `PubSubNotification` per EventType is permitted.
  # @!attribute [rw] pubsub_condition
  #   @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition]
  #     Conditions (e.g., data risk or sensitivity level) for triggering a
  #     Pub/Sub.
  # @!attribute [rw] detail_of_message
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel]
  #     How much data to include in the Pub/Sub message. If the user wishes to
  #     limit the size of the message, they can use resource_name and fetch the
  #     profile fields they wish to. Per table profile (not per column).
  class PubSubNotification
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The levels of detail that can be included in the Pub/Sub message.
    module DetailLevel
      # Unused.
      DETAIL_LEVEL_UNSPECIFIED = 0

      # The full table data profile.
      TABLE_PROFILE = 1

      # The name of the profiled resource.
      RESOURCE_NAME = 2

      # The full file store data profile.
      FILE_STORE_PROFILE = 3
    end
  end

  # Message expressing intention to publish to Google Security Operations.
  class PublishToChronicle
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, a summary finding will be created or updated in Security Command
  # Center for each profile.
  class PublishToSecurityCommandCenter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Create Dataplex Universal Catalog aspects for profiled resources with the
  # aspect type Sensitive Data Protection Profile. To learn more about aspects,
  # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether creating a Dataplex Universal Catalog aspect for a profiled
  #     resource should lower the risk of the profile for that resource. This
  #     also lowers the data risk of resources at the lower levels of the
  #     resource hierarchy. For example, reducing the data risk of a table data
  #     profile also reduces the data risk of the constituent column data
  #     profiles.
  class PublishToDataplexCatalog
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, attaches the [tags]
  # (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
  # provided to profiled resources. Tags support [access
  # control](https://cloud.google.com/iam/docs/tags-access-control). You can
  # conditionally grant or deny access to a resource based on whether the
  # resource has a specific tag.
  # @!attribute [rw] tag_conditions
  #   @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>]
  #     The tags to associate with different conditions.
  # @!attribute [rw] profile_generations_to_tag
  #   @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>]
  #     The profile generations for which the tag should be attached to
  #     resources. If you attach a tag to only new profiles, then if the
  #     sensitivity score of a profile subsequently changes, its tag doesn't
  #     change. By default, this field includes only new profiles. To include
  #     both new and updated profiles for tagging, this field should explicitly
  #     include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether applying a tag to a resource should lower the risk of the profile
  #     for that resource. For example, in conjunction with an [IAM deny
  #     policy](https://cloud.google.com/iam/docs/deny-overview), you can deny
  #     all principals a permission if a tag value is present, mitigating the
  #     risk of the resource. This also lowers the data risk of resources at the
  #     lower levels of the resource hierarchy. For example, reducing the data
  #     risk of a table data profile also reduces the data risk of the
  #     constituent column data profiles.
  class TagResources
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The tag to attach to profiles matching the condition. At most one
    # `TagCondition` can be specified per sensitivity level.
    # @!attribute [rw] tag
    #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue]
    #     The tag value to attach to resources.
    # @!attribute [rw] sensitivity_score
    #   @return [::Google::Cloud::Dlp::V2::SensitivityScore]
    #     Conditions attaching the tag to a resource on its profile having this
    #     sensitivity score.
    class TagCondition
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # A value of a tag.
    # @!attribute [rw] namespaced_value
    #   @return [::String]
    #     The namespaced name for the tag value to attach to resources. Must be
    #     in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for
    #     example, "123456/environment/prod" for an organization parent, or
    #     "my-project/environment/prod" for a project parent.
    class TagValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Types of event that can trigger an action.
  module EventType
    # Unused.
    EVENT_TYPE_UNSPECIFIED = 0

    # New profile (not a re-profile).
    NEW_PROFILE = 1

    # One of the following profile metrics changed: Data risk score,
    # Sensitivity score, Resource visibility, Encryption type, Predicted
    # infoTypes, Other infoTypes
    CHANGED_PROFILE = 2

    # Table data risk score or sensitivity score increased.
    SCORE_INCREASED = 3

    # A user (non-internal) error occurred.
    ERROR_CHANGED = 4
  end
end

#publish_to_scc::Google::Cloud::Dlp::V2::DataProfileAction::PublishToSecurityCommandCenter

Returns Publishes findings to Security Command Center for each data profile.

Note: The following fields are mutually exclusive: publish_to_scc, export_data, pub_sub_notification, publish_to_chronicle, tag_resources, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::DataProfileAction::PublishToSecurityCommandCenter)

    Publishes findings to Security Command Center for each data profile.

    Note: The following fields are mutually exclusive: publish_to_scc, export_data, pub_sub_notification, publish_to_chronicle, tag_resources, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.



4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 4746

class DataProfileAction
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If set, the detailed data profiles will be persisted to the location
  # of your choice whenever updated.
  # @!attribute [rw] profile_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store all profiles to BigQuery.
  #
  #     * The system will create a new dataset and table for you if none are
  #       are provided. The dataset will be named
  #       `sensitive_data_protection_discovery` and table will be named
  #       `discovery_profiles`. This table will be placed in the same project as
  #       the container project running the scan. After the first profile is
  #       generated and the dataset and table are created, the discovery scan
  #       configuration will be updated with the dataset and table names.
  #     * See [Analyze data profiles stored in
  #     BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles).
  #     * See [Sample queries for your BigQuery
  #     table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries).
  #     *  Data is inserted using [streaming
  #        insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #        and so data may be in the buffer for a period of time after the
  #        profile has finished.
  #      * The Pub/Sub notification is sent before the streaming buffer is
  #        guaranteed to be written, so data may not be instantly
  #        visible to queries by the time your topic receives the Pub/Sub
  #        notification.
  #      * The best practice is to use the same table for an entire organization
  #        so that you can take advantage of the [provided Data Studio
  #        reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report).
  #        If you use VPC Service Controls to define security perimeters, then
  #        you must use a separate table for each boundary.
  # @!attribute [rw] sample_findings_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store sample [data profile
  #     findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table
  #     or a new table in an existing dataset. Each regeneration will result in
  #     new rows in BigQuery. Data is inserted using [streaming
  #     insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #     and so data may be in the buffer for a period of time after the profile
  #     has finished.
  class Export
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Send a Pub/Sub message into the given Pub/Sub topic to connect other
  # systems to data profile generation. The message payload data will
  # be the byte serialization of `DataProfilePubSubMessage`.
  # @!attribute [rw] topic
  #   @return [::String]
  #     Cloud Pub/Sub topic to send notifications to.
  #     Format is projects/\\{project}/topics/\\{topic}.
  # @!attribute [rw] event
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType]
  #     The type of event that triggers a Pub/Sub. At most one
  #     `PubSubNotification` per EventType is permitted.
  # @!attribute [rw] pubsub_condition
  #   @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition]
  #     Conditions (e.g., data risk or sensitivity level) for triggering a
  #     Pub/Sub.
  # @!attribute [rw] detail_of_message
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel]
  #     How much data to include in the Pub/Sub message. If the user wishes to
  #     limit the size of the message, they can use resource_name and fetch the
  #     profile fields they wish to. Per table profile (not per column).
  class PubSubNotification
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The levels of detail that can be included in the Pub/Sub message.
    module DetailLevel
      # Unused.
      DETAIL_LEVEL_UNSPECIFIED = 0

      # The full table data profile.
      TABLE_PROFILE = 1

      # The name of the profiled resource.
      RESOURCE_NAME = 2

      # The full file store data profile.
      FILE_STORE_PROFILE = 3
    end
  end

  # Message expressing intention to publish to Google Security Operations.
  class PublishToChronicle
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, a summary finding will be created or updated in Security Command
  # Center for each profile.
  class PublishToSecurityCommandCenter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Create Dataplex Universal Catalog aspects for profiled resources with the
  # aspect type Sensitive Data Protection Profile. To learn more about aspects,
  # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether creating a Dataplex Universal Catalog aspect for a profiled
  #     resource should lower the risk of the profile for that resource. This
  #     also lowers the data risk of resources at the lower levels of the
  #     resource hierarchy. For example, reducing the data risk of a table data
  #     profile also reduces the data risk of the constituent column data
  #     profiles.
  class PublishToDataplexCatalog
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, attaches the [tags]
  # (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
  # provided to profiled resources. Tags support [access
  # control](https://cloud.google.com/iam/docs/tags-access-control). You can
  # conditionally grant or deny access to a resource based on whether the
  # resource has a specific tag.
  # @!attribute [rw] tag_conditions
  #   @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>]
  #     The tags to associate with different conditions.
  # @!attribute [rw] profile_generations_to_tag
  #   @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>]
  #     The profile generations for which the tag should be attached to
  #     resources. If you attach a tag to only new profiles, then if the
  #     sensitivity score of a profile subsequently changes, its tag doesn't
  #     change. By default, this field includes only new profiles. To include
  #     both new and updated profiles for tagging, this field should explicitly
  #     include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether applying a tag to a resource should lower the risk of the profile
  #     for that resource. For example, in conjunction with an [IAM deny
  #     policy](https://cloud.google.com/iam/docs/deny-overview), you can deny
  #     all principals a permission if a tag value is present, mitigating the
  #     risk of the resource. This also lowers the data risk of resources at the
  #     lower levels of the resource hierarchy. For example, reducing the data
  #     risk of a table data profile also reduces the data risk of the
  #     constituent column data profiles.
  class TagResources
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The tag to attach to profiles matching the condition. At most one
    # `TagCondition` can be specified per sensitivity level.
    # @!attribute [rw] tag
    #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue]
    #     The tag value to attach to resources.
    # @!attribute [rw] sensitivity_score
    #   @return [::Google::Cloud::Dlp::V2::SensitivityScore]
    #     Conditions attaching the tag to a resource on its profile having this
    #     sensitivity score.
    class TagCondition
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # A value of a tag.
    # @!attribute [rw] namespaced_value
    #   @return [::String]
    #     The namespaced name for the tag value to attach to resources. Must be
    #     in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for
    #     example, "123456/environment/prod" for an organization parent, or
    #     "my-project/environment/prod" for a project parent.
    class TagValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Types of event that can trigger an action.
  module EventType
    # Unused.
    EVENT_TYPE_UNSPECIFIED = 0

    # New profile (not a re-profile).
    NEW_PROFILE = 1

    # One of the following profile metrics changed: Data risk score,
    # Sensitivity score, Resource visibility, Encryption type, Predicted
    # infoTypes, Other infoTypes
    CHANGED_PROFILE = 2

    # Table data risk score or sensitivity score increased.
    SCORE_INCREASED = 3

    # A user (non-internal) error occurred.
    ERROR_CHANGED = 4
  end
end

#tag_resources::Google::Cloud::Dlp::V2::DataProfileAction::TagResources

Returns Tags the profiled resources with the specified tag values.

Note: The following fields are mutually exclusive: tag_resources, export_data, pub_sub_notification, publish_to_chronicle, publish_to_scc, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::DataProfileAction::TagResources)

    Tags the profiled resources with the specified tag values.

    Note: The following fields are mutually exclusive: tag_resources, export_data, pub_sub_notification, publish_to_chronicle, publish_to_scc, publish_to_dataplex_catalog. If a field in that set is populated, all other fields in the set will automatically be cleared.



4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 4746

class DataProfileAction
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If set, the detailed data profiles will be persisted to the location
  # of your choice whenever updated.
  # @!attribute [rw] profile_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store all profiles to BigQuery.
  #
  #     * The system will create a new dataset and table for you if none are
  #       are provided. The dataset will be named
  #       `sensitive_data_protection_discovery` and table will be named
  #       `discovery_profiles`. This table will be placed in the same project as
  #       the container project running the scan. After the first profile is
  #       generated and the dataset and table are created, the discovery scan
  #       configuration will be updated with the dataset and table names.
  #     * See [Analyze data profiles stored in
  #     BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles).
  #     * See [Sample queries for your BigQuery
  #     table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries).
  #     *  Data is inserted using [streaming
  #        insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #        and so data may be in the buffer for a period of time after the
  #        profile has finished.
  #      * The Pub/Sub notification is sent before the streaming buffer is
  #        guaranteed to be written, so data may not be instantly
  #        visible to queries by the time your topic receives the Pub/Sub
  #        notification.
  #      * The best practice is to use the same table for an entire organization
  #        so that you can take advantage of the [provided Data Studio
  #        reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report).
  #        If you use VPC Service Controls to define security perimeters, then
  #        you must use a separate table for each boundary.
  # @!attribute [rw] sample_findings_table
  #   @return [::Google::Cloud::Dlp::V2::BigQueryTable]
  #     Store sample [data profile
  #     findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table
  #     or a new table in an existing dataset. Each regeneration will result in
  #     new rows in BigQuery. Data is inserted using [streaming
  #     insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert)
  #     and so data may be in the buffer for a period of time after the profile
  #     has finished.
  class Export
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Send a Pub/Sub message into the given Pub/Sub topic to connect other
  # systems to data profile generation. The message payload data will
  # be the byte serialization of `DataProfilePubSubMessage`.
  # @!attribute [rw] topic
  #   @return [::String]
  #     Cloud Pub/Sub topic to send notifications to.
  #     Format is projects/\\{project}/topics/\\{topic}.
  # @!attribute [rw] event
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType]
  #     The type of event that triggers a Pub/Sub. At most one
  #     `PubSubNotification` per EventType is permitted.
  # @!attribute [rw] pubsub_condition
  #   @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition]
  #     Conditions (e.g., data risk or sensitivity level) for triggering a
  #     Pub/Sub.
  # @!attribute [rw] detail_of_message
  #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel]
  #     How much data to include in the Pub/Sub message. If the user wishes to
  #     limit the size of the message, they can use resource_name and fetch the
  #     profile fields they wish to. Per table profile (not per column).
  class PubSubNotification
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The levels of detail that can be included in the Pub/Sub message.
    module DetailLevel
      # Unused.
      DETAIL_LEVEL_UNSPECIFIED = 0

      # The full table data profile.
      TABLE_PROFILE = 1

      # The name of the profiled resource.
      RESOURCE_NAME = 2

      # The full file store data profile.
      FILE_STORE_PROFILE = 3
    end
  end

  # Message expressing intention to publish to Google Security Operations.
  class PublishToChronicle
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, a summary finding will be created or updated in Security Command
  # Center for each profile.
  class PublishToSecurityCommandCenter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Create Dataplex Universal Catalog aspects for profiled resources with the
  # aspect type Sensitive Data Protection Profile. To learn more about aspects,
  # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether creating a Dataplex Universal Catalog aspect for a profiled
  #     resource should lower the risk of the profile for that resource. This
  #     also lowers the data risk of resources at the lower levels of the
  #     resource hierarchy. For example, reducing the data risk of a table data
  #     profile also reduces the data risk of the constituent column data
  #     profiles.
  class PublishToDataplexCatalog
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # If set, attaches the [tags]
  # (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
  # provided to profiled resources. Tags support [access
  # control](https://cloud.google.com/iam/docs/tags-access-control). You can
  # conditionally grant or deny access to a resource based on whether the
  # resource has a specific tag.
  # @!attribute [rw] tag_conditions
  #   @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>]
  #     The tags to associate with different conditions.
  # @!attribute [rw] profile_generations_to_tag
  #   @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>]
  #     The profile generations for which the tag should be attached to
  #     resources. If you attach a tag to only new profiles, then if the
  #     sensitivity score of a profile subsequently changes, its tag doesn't
  #     change. By default, this field includes only new profiles. To include
  #     both new and updated profiles for tagging, this field should explicitly
  #     include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`.
  # @!attribute [rw] lower_data_risk_to_low
  #   @return [::Boolean]
  #     Whether applying a tag to a resource should lower the risk of the profile
  #     for that resource. For example, in conjunction with an [IAM deny
  #     policy](https://cloud.google.com/iam/docs/deny-overview), you can deny
  #     all principals a permission if a tag value is present, mitigating the
  #     risk of the resource. This also lowers the data risk of resources at the
  #     lower levels of the resource hierarchy. For example, reducing the data
  #     risk of a table data profile also reduces the data risk of the
  #     constituent column data profiles.
  class TagResources
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The tag to attach to profiles matching the condition. At most one
    # `TagCondition` can be specified per sensitivity level.
    # @!attribute [rw] tag
    #   @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue]
    #     The tag value to attach to resources.
    # @!attribute [rw] sensitivity_score
    #   @return [::Google::Cloud::Dlp::V2::SensitivityScore]
    #     Conditions attaching the tag to a resource on its profile having this
    #     sensitivity score.
    class TagCondition
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # A value of a tag.
    # @!attribute [rw] namespaced_value
    #   @return [::String]
    #     The namespaced name for the tag value to attach to resources. Must be
    #     in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for
    #     example, "123456/environment/prod" for an organization parent, or
    #     "my-project/environment/prod" for a project parent.
    class TagValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Types of event that can trigger an action.
  module EventType
    # Unused.
    EVENT_TYPE_UNSPECIFIED = 0

    # New profile (not a re-profile).
    NEW_PROFILE = 1

    # One of the following profile metrics changed: Data risk score,
    # Sensitivity score, Resource visibility, Encryption type, Predicted
    # infoTypes, Other infoTypes
    CHANGED_PROFILE = 2

    # Table data risk score or sensitivity score increased.
    SCORE_INCREASED = 3

    # A user (non-internal) error occurred.
    ERROR_CHANGED = 4
  end
end