Reference documentation and code samples for the Data Loss Prevention V2 Client class PubSubNotification.
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 ofDataProfilePubSubMessage.
Generated from protobuf messagegoogle.privacy.dlp.v2.DataProfileAction.PubSubNotification
Namespace
Google \ Cloud \ Dlp \ V2 \ DataProfileAction
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ topic
string
Cloud Pub/Sub topic to send notifications to. Format is projects/{project}/topics/{topic}.
↳ event
int
The type of event that triggers a Pub/Sub. At most onePubSubNotificationper EventType is permitted.
Conditions (e.g., data risk or sensitivity level) for triggering a Pub/Sub.
↳ detail_of_message
int
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).
getTopic
Cloud Pub/Sub topic to send notifications to.
Format is projects/{project}/topics/{topic}.
Returns
Type
Description
string
setTopic
Cloud Pub/Sub topic to send notifications to.
Format is projects/{project}/topics/{topic}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEvent
The type of event that triggers a Pub/Sub. At most onePubSubNotificationper EventType is permitted.
Returns
Type
Description
int
setEvent
The type of event that triggers a Pub/Sub. At most onePubSubNotificationper EventType is permitted.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getPubsubCondition
Conditions (e.g., data risk or sensitivity level) for triggering a
Pub/Sub.
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).
Returns
Type
Description
int
setDetailOfMessage
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).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Data Loss Prevention V2 Client - Class PubSubNotification (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.DataProfileAction.PubSubNotification)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.DataProfileAction.PubSubNotification)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.DataProfileAction.PubSubNotification)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.DataProfileAction.PubSubNotification)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.DataProfileAction.PubSubNotification)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.DataProfileAction.PubSubNotification)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.DataProfileAction.PubSubNotification)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.DataProfileAction.PubSubNotification)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.DataProfileAction.PubSubNotification)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.DataProfileAction.PubSubNotification)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.DataProfileAction.PubSubNotification)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.DataProfileAction.PubSubNotification)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.DataProfileAction.PubSubNotification)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.DataProfileAction.PubSubNotification)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.DataProfileAction.PubSubNotification)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.DataProfileAction.PubSubNotification)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.DataProfileAction.PubSubNotification)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.DataProfileAction.PubSubNotification)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.DataProfileAction.PubSubNotification) \nReference documentation and code samples for the Data Loss Prevention V2 Client class PubSubNotification.\n\nSend a Pub/Sub message into the given Pub/Sub topic to connect other\nsystems to data profile generation. The message payload data will\nbe the byte serialization of `DataProfilePubSubMessage`.\n\nGenerated from protobuf message `google.privacy.dlp.v2.DataProfileAction.PubSubNotification`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2 \\\\ DataProfileAction\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getTopic\n\nCloud Pub/Sub topic to send notifications to.\n\nFormat is projects/{project}/topics/{topic}.\n\n### setTopic\n\nCloud Pub/Sub topic to send notifications to.\n\nFormat is projects/{project}/topics/{topic}.\n\n### getEvent\n\nThe type of event that triggers a Pub/Sub. At most one\n`PubSubNotification` per EventType is permitted.\n\n### setEvent\n\nThe type of event that triggers a Pub/Sub. At most one\n`PubSubNotification` per EventType is permitted.\n\n### getPubsubCondition\n\nConditions (e.g., data risk or sensitivity level) for triggering a\nPub/Sub.\n\n### hasPubsubCondition\n\n### clearPubsubCondition\n\n### setPubsubCondition\n\nConditions (e.g., data risk or sensitivity level) for triggering a\nPub/Sub.\n\n### getDetailOfMessage\n\nHow much data to include in the Pub/Sub message. If the user wishes to\nlimit the size of the message, they can use resource_name and fetch the\nprofile fields they wish to. Per table profile (not per column).\n\n### setDetailOfMessage\n\nHow much data to include in the Pub/Sub message. If the user wishes to\nlimit the size of the message, they can use resource_name and fetch the\nprofile fields they wish to. Per table profile (not per column)."]]