Google Cloud Eventarc V1 Client - Class Pubsub (1.1.1)

Reference documentation and code samples for the Google Cloud Eventarc V1 Client class Pubsub.

Represents a Pub/Sub transport.

Generated from protobuf message google.cloud.eventarc.v1.Pubsub

Namespace

Google \ Cloud \ Eventarc \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
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 type google.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 type google.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.

Returns
TypeDescription
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 type google.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this