Reference documentation and code samples for the Google Cloud Eventarc V1 Client class Pubsub.
Represents a Pub/Sub transport.
Generated from protobuf messagegoogle.cloud.eventarc.v1.Pubsub
Namespace
Google \ Cloud \ Eventarc \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ topic
string
Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format:projects/{PROJECT_ID}/topics/{TOPIC_NAME}. You can set an existing topic for triggers of the typegoogle.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.
↳ subscription
string
Output only. The name of the Pub/Sub subscription created and managed by Eventarc as a transport for the event delivery. Format:projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.
getTopic
Optional. The name of the Pub/Sub topic created and managed by Eventarc as
a transport for the event delivery. Format:projects/{PROJECT_ID}/topics/{TOPIC_NAME}.
You can set an existing topic for triggers of the typegoogle.cloud.pubsub.topic.v1.messagePublished. The topic you provide
here is not deleted by Eventarc at trigger deletion.
Returns
Type
Description
string
setTopic
Optional. The name of the Pub/Sub topic created and managed by Eventarc as
a transport for the event delivery. Format:projects/{PROJECT_ID}/topics/{TOPIC_NAME}.
You can set an existing topic for triggers of the typegoogle.cloud.pubsub.topic.v1.messagePublished. The topic you provide
here is not deleted by Eventarc at trigger deletion.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSubscription
Output only. The name of the Pub/Sub subscription created and managed by
Eventarc as a transport for the event delivery. Format:projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.
Returns
Type
Description
string
setSubscription
Output only. The name of the Pub/Sub subscription created and managed by
Eventarc as a transport for the event delivery. Format:projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.
[[["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-09 UTC."],[],[],null,["# Google Cloud Eventarc V1 Client - Class Pubsub (2.1.5)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.5 (latest)](/php/docs/reference/cloud-eventarc/latest/V1.Pubsub)\n- [2.1.4](/php/docs/reference/cloud-eventarc/2.1.4/V1.Pubsub)\n- [2.0.1](/php/docs/reference/cloud-eventarc/2.0.1/V1.Pubsub)\n- [1.3.5](/php/docs/reference/cloud-eventarc/1.3.5/V1.Pubsub)\n- [1.2.2](/php/docs/reference/cloud-eventarc/1.2.2/V1.Pubsub)\n- [1.1.1](/php/docs/reference/cloud-eventarc/1.1.1/V1.Pubsub)\n- [1.0.5](/php/docs/reference/cloud-eventarc/1.0.5/V1.Pubsub) \nReference documentation and code samples for the Google Cloud Eventarc V1 Client class Pubsub.\n\nRepresents a Pub/Sub transport.\n\nGenerated from protobuf message `google.cloud.eventarc.v1.Pubsub`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Eventarc \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getTopic\n\nOptional. The name of the Pub/Sub topic created and managed by Eventarc as\na transport for the event delivery. Format:\n`projects/{PROJECT_ID}/topics/{TOPIC_NAME}`.\n\nYou can set an existing topic for triggers of the type\n`google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide\nhere is not deleted by Eventarc at trigger deletion.\n\n### setTopic\n\nOptional. The name of the Pub/Sub topic created and managed by Eventarc as\na transport for the event delivery. Format:\n`projects/{PROJECT_ID}/topics/{TOPIC_NAME}`.\n\nYou can set an existing topic for triggers of the type\n`google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide\nhere is not deleted by Eventarc at trigger deletion.\n\n### getSubscription\n\nOutput only. The name of the Pub/Sub subscription created and managed by\nEventarc as a transport for the event delivery. Format:\n`projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.\n\n### setSubscription\n\nOutput only. The name of the Pub/Sub subscription created and managed by\nEventarc as a transport for the event delivery. Format:\n`projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`."]]