# Cloud Data Loss Prevention (DLP) V2 API - Class Google::Cloud::Dlp::V2::Action (v1.17.0)

1.17.0 (latest) 1.16.1 1.15.2 1.14.0 1.13.0 1.12.1 1.11.0 1.10.0 1.9.1 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.0 1.1.0 1.0.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.2 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.1 Reference documentation and code samples for the Cloud Data Loss Prevention (DLP) V2 API class Google::Cloud::Dlp::V2::Action.

A task to execute on the completion of a job.
See <https://cloud.google.com/sensitive-data-protection/docs/concepts-actions>
to learn more.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #deidentify

    def deidentify() -> ::Google::Cloud::Dlp::V2::Action::Deidentify

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::Deidentify](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-Deidentify)) --- Create a de-identified copy of the input data.


  Note: The following fields are mutually exclusive: `deidentify`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #deidentify=

    def deidentify=(value) -> ::Google::Cloud::Dlp::V2::Action::Deidentify

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::Deidentify](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-Deidentify)) --- Create a de-identified copy of the input data.


  Note: The following fields are mutually exclusive: `deidentify`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::Deidentify](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-Deidentify)) --- Create a de-identified copy of the input data.


  Note: The following fields are mutually exclusive: `deidentify`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #job_notification_emails

    def job_notification_emails() -> ::Google::Cloud::Dlp::V2::Action::JobNotificationEmails

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::JobNotificationEmails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-JobNotificationEmails)) --- Sends an email when the job completes. The email goes to IAM project owners and technical [Essential
  Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).


  Note: The following fields are mutually exclusive: `job_notification_emails`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #job_notification_emails=

    def job_notification_emails=(value) -> ::Google::Cloud::Dlp::V2::Action::JobNotificationEmails

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::JobNotificationEmails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-JobNotificationEmails)) --- Sends an email when the job completes. The email goes to IAM project owners and technical [Essential
  Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).


  Note: The following fields are mutually exclusive: `job_notification_emails`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::JobNotificationEmails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-JobNotificationEmails)) --- Sends an email when the job completes. The email goes to IAM project owners and technical [Essential
  Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).


  Note: The following fields are mutually exclusive: `job_notification_emails`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #pub_sub

    def pub_sub() -> ::Google::Cloud::Dlp::V2::Action::PublishToPubSub

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishToPubSub](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishToPubSub)) --- Publish a notification to a Pub/Sub topic.


  Note: The following fields are mutually exclusive: `pub_sub`, `save_findings`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #pub_sub=

    def pub_sub=(value) -> ::Google::Cloud::Dlp::V2::Action::PublishToPubSub

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::PublishToPubSub](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishToPubSub)) --- Publish a notification to a Pub/Sub topic.


  Note: The following fields are mutually exclusive: `pub_sub`, `save_findings`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishToPubSub](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishToPubSub)) --- Publish a notification to a Pub/Sub topic.


  Note: The following fields are mutually exclusive: `pub_sub`, `save_findings`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_findings_to_cloud_data_catalog

    def publish_findings_to_cloud_data_catalog() -> ::Google::Cloud::Dlp::V2::Action::PublishFindingsToCloudDataCatalog

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishFindingsToCloudDataCatalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishFindingsToCloudDataCatalog)) --- Deprecated because Data Catalog is being turned down. Use publish_findings_to_dataplex_catalog to publish findings to Dataplex Universal Catalog.


  Note: The following fields are mutually exclusive: `publish_findings_to_cloud_data_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_findings_to_cloud_data_catalog=

    def publish_findings_to_cloud_data_catalog=(value) -> ::Google::Cloud::Dlp::V2::Action::PublishFindingsToCloudDataCatalog

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::PublishFindingsToCloudDataCatalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishFindingsToCloudDataCatalog)) --- Deprecated because Data Catalog is being turned down. Use publish_findings_to_dataplex_catalog to publish findings to Dataplex Universal Catalog.


  Note: The following fields are mutually exclusive: `publish_findings_to_cloud_data_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishFindingsToCloudDataCatalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishFindingsToCloudDataCatalog)) --- Deprecated because Data Catalog is being turned down. Use publish_findings_to_dataplex_catalog to publish findings to Dataplex Universal Catalog.


  Note: The following fields are mutually exclusive: `publish_findings_to_cloud_data_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_findings_to_dataplex_catalog

    def publish_findings_to_dataplex_catalog() -> ::Google::Cloud::Dlp::V2::Action::PublishFindingsToDataplexCatalog

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishFindingsToDataplexCatalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishFindingsToDataplexCatalog)) --- Publish findings as an aspect to Dataplex Universal Catalog.


  Note: The following fields are mutually exclusive: `publish_findings_to_dataplex_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_findings_to_dataplex_catalog=

    def publish_findings_to_dataplex_catalog=(value) -> ::Google::Cloud::Dlp::V2::Action::PublishFindingsToDataplexCatalog

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::PublishFindingsToDataplexCatalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishFindingsToDataplexCatalog)) --- Publish findings as an aspect to Dataplex Universal Catalog.


  Note: The following fields are mutually exclusive: `publish_findings_to_dataplex_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishFindingsToDataplexCatalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishFindingsToDataplexCatalog)) --- Publish findings as an aspect to Dataplex Universal Catalog.


  Note: The following fields are mutually exclusive: `publish_findings_to_dataplex_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_summary_to_cscc

    def publish_summary_to_cscc() -> ::Google::Cloud::Dlp::V2::Action::PublishSummaryToCscc

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishSummaryToCscc](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishSummaryToCscc)) --- Publish summary to Cloud Security Command Center (Alpha).


  Note: The following fields are mutually exclusive: `publish_summary_to_cscc`, `save_findings`, `pub_sub`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_summary_to_cscc=

    def publish_summary_to_cscc=(value) -> ::Google::Cloud::Dlp::V2::Action::PublishSummaryToCscc

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::PublishSummaryToCscc](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishSummaryToCscc)) --- Publish summary to Cloud Security Command Center (Alpha).


  Note: The following fields are mutually exclusive: `publish_summary_to_cscc`, `save_findings`, `pub_sub`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishSummaryToCscc](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishSummaryToCscc)) --- Publish summary to Cloud Security Command Center (Alpha).


  Note: The following fields are mutually exclusive: `publish_summary_to_cscc`, `save_findings`, `pub_sub`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_to_stackdriver

    def publish_to_stackdriver() -> ::Google::Cloud::Dlp::V2::Action::PublishToStackdriver

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishToStackdriver](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishToStackdriver)) --- Enable Stackdriver metric dlp.googleapis.com/finding_count.


  Note: The following fields are mutually exclusive: `publish_to_stackdriver`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #publish_to_stackdriver=

    def publish_to_stackdriver=(value) -> ::Google::Cloud::Dlp::V2::Action::PublishToStackdriver

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::PublishToStackdriver](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishToStackdriver)) --- Enable Stackdriver metric dlp.googleapis.com/finding_count.


  Note: The following fields are mutually exclusive: `publish_to_stackdriver`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::PublishToStackdriver](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-PublishToStackdriver)) --- Enable Stackdriver metric dlp.googleapis.com/finding_count.


  Note: The following fields are mutually exclusive: `publish_to_stackdriver`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #save_findings

    def save_findings() -> ::Google::Cloud::Dlp::V2::Action::SaveFindings

**Returns**

- ([::Google::Cloud::Dlp::V2::Action::SaveFindings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-SaveFindings)) --- Save resulting findings in a provided location.


  Note: The following fields are mutually exclusive: `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #save_findings=

    def save_findings=(value) -> ::Google::Cloud::Dlp::V2::Action::SaveFindings

**Parameter**

- **value** ([::Google::Cloud::Dlp::V2::Action::SaveFindings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-SaveFindings)) --- Save resulting findings in a provided location.


  Note: The following fields are mutually exclusive: `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dlp::V2::Action::SaveFindings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest/Google-Cloud-Dlp-V2-Action-SaveFindings)) --- Save resulting findings in a provided location.


  Note: The following fields are mutually exclusive: `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared.