Optional. Endpoint configuration attributes that can be used to control different aspects of the message delivery. The only currently supported attribute isx-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). If not present during theCreateSubscriptioncall, it will default to the version of the Pub/Sub API used to make such call. If not present in aModifyPushConfigcall, its value will not be changed.GetSubscriptioncalls will always return a valid version, even if the subscription was created without this attribute. The only supported values for thex-goog-versionattribute are: * *v1beta1: uses the push format defined in the v1beta1 Pub/Sub API. * *v1orv1beta2: uses the push format defined in the v1 Pub/Sub API. For example:attributes { "x-goog-version": "v1" }
Optional. When set, the payload to the push endpoint is not wrapped.
getPushEndpoint
Optional. A URL locating the endpoint to which messages should be pushed.
For example, a Webhook endpoint might usehttps://example.com/push.
Returns
Type
Description
string
setPushEndpoint
Optional. A URL locating the endpoint to which messages should be pushed.
For example, a Webhook endpoint might usehttps://example.com/push.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getAttributes
Optional. Endpoint configuration attributes that can be used to control
different aspects of the message delivery.
The only currently supported attribute isx-goog-version, which you can
use to change the format of the pushed message. This attribute
indicates the version of the data expected by the endpoint. This
controls the shape of the pushed message (i.e., its fields and metadata).
If not present during theCreateSubscriptioncall, it will default to
the version of the Pub/Sub API used to make such call. If not present in aModifyPushConfigcall, its value will not be changed.GetSubscriptioncalls will always return a valid version, even if the subscription was
created without this attribute.
The only supported values for thex-goog-versionattribute are:
v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
v1orv1beta2: uses the push format defined in the v1 Pub/Sub API.
For example:attributes { "x-goog-version": "v1" }
Optional. Endpoint configuration attributes that can be used to control
different aspects of the message delivery.
The only currently supported attribute isx-goog-version, which you can
use to change the format of the pushed message. This attribute
indicates the version of the data expected by the endpoint. This
controls the shape of the pushed message (i.e., its fields and metadata).
If not present during theCreateSubscriptioncall, it will default to
the version of the Pub/Sub API used to make such call. If not present in aModifyPushConfigcall, its value will not be changed.GetSubscriptioncalls will always return a valid version, even if the subscription was
created without this attribute.
The only supported values for thex-goog-versionattribute are:
v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
v1orv1beta2: uses the push format defined in the v1 Pub/Sub API.
For example:attributes { "x-goog-version": "v1" }
[[["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,["# Cloud PubSub V1 Client - Class PushConfig (2.13.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.13.2 (latest)](/php/docs/reference/cloud-pubsub/latest/V1.PushConfig)\n- [2.13.1](/php/docs/reference/cloud-pubsub/2.13.1/V1.PushConfig)\n- [2.12.0](/php/docs/reference/cloud-pubsub/2.12.0/V1.PushConfig)\n- [2.11.3](/php/docs/reference/cloud-pubsub/2.11.3/V1.PushConfig)\n- [2.10.1](/php/docs/reference/cloud-pubsub/2.10.1/V1.PushConfig)\n- [2.9.1](/php/docs/reference/cloud-pubsub/2.9.1/V1.PushConfig)\n- [2.8.2](/php/docs/reference/cloud-pubsub/2.8.2/V1.PushConfig)\n- [2.7.0](/php/docs/reference/cloud-pubsub/2.7.0/V1.PushConfig)\n- [2.6.0](/php/docs/reference/cloud-pubsub/2.6.0/V1.PushConfig)\n- [2.5.2](/php/docs/reference/cloud-pubsub/2.5.2/V1.PushConfig)\n- [2.4.0](/php/docs/reference/cloud-pubsub/2.4.0/V1.PushConfig)\n- [2.3.0](/php/docs/reference/cloud-pubsub/2.3.0/V1.PushConfig)\n- [2.2.1](/php/docs/reference/cloud-pubsub/2.2.1/V1.PushConfig)\n- [2.1.2](/php/docs/reference/cloud-pubsub/2.1.2/V1.PushConfig)\n- [1.50.0](/php/docs/reference/cloud-pubsub/1.50.0/V1.PushConfig)\n- [1.49.0](/php/docs/reference/cloud-pubsub/1.49.0/V1.PushConfig)\n- [1.48.0](/php/docs/reference/cloud-pubsub/1.48.0/V1.PushConfig)\n- [1.47.0](/php/docs/reference/cloud-pubsub/1.47.0/V1.PushConfig)\n- [1.46.5](/php/docs/reference/cloud-pubsub/1.46.5/V1.PushConfig)\n- [1.45.2](/php/docs/reference/cloud-pubsub/1.45.2/V1.PushConfig)\n- [1.44.0](/php/docs/reference/cloud-pubsub/1.44.0/V1.PushConfig)\n- [1.43.2](/php/docs/reference/cloud-pubsub/1.43.2/V1.PushConfig)\n- [1.42.1](/php/docs/reference/cloud-pubsub/1.42.1/V1.PushConfig)\n- [1.41.3](/php/docs/reference/cloud-pubsub/1.41.3/V1.PushConfig)\n- [1.40.1](/php/docs/reference/cloud-pubsub/1.40.1/V1.PushConfig)\n- [1.39.3](/php/docs/reference/cloud-pubsub/1.39.3/V1.PushConfig) \nReference documentation and code samples for the Cloud PubSub V1 Client class PushConfig.\n\nConfiguration for a push delivery endpoint.\n\nGenerated from protobuf message `google.pubsub.v1.PushConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ PubSub \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPushEndpoint\n\nOptional. A URL locating the endpoint to which messages should be pushed.\n\nFor example, a Webhook endpoint might use `https://example.com/push`.\n\n### setPushEndpoint\n\nOptional. A URL locating the endpoint to which messages should be pushed.\n\nFor example, a Webhook endpoint might use `https://example.com/push`.\n\n### getAttributes\n\nOptional. Endpoint configuration attributes that can be used to control\ndifferent aspects of the message delivery.\n\nThe only currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the pushed message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the pushed message (i.e., its fields and metadata).\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the Pub/Sub API used to make such call. If not present in a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\nThe only supported values for the `x-goog-version` attribute are:\n\n- `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n- `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. For example: `attributes { \"x-goog-version\": \"v1\" }`\n\n### setAttributes\n\nOptional. Endpoint configuration attributes that can be used to control\ndifferent aspects of the message delivery.\n\nThe only currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the pushed message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the pushed message (i.e., its fields and metadata).\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the Pub/Sub API used to make such call. If not present in a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\nThe only supported values for the `x-goog-version` attribute are:\n\n- `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n- `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. For example: `attributes { \"x-goog-version\": \"v1\" }`\n\n### getOidcToken\n\nOptional. If specified, Pub/Sub will generate and attach an OIDC JWT\ntoken as an `Authorization` header in the HTTP request for every pushed\nmessage.\n\n### hasOidcToken\n\n### setOidcToken\n\nOptional. If specified, Pub/Sub will generate and attach an OIDC JWT\ntoken as an `Authorization` header in the HTTP request for every pushed\nmessage.\n\n### getPubsubWrapper\n\nOptional. When set, the payload to the push endpoint is in the form of\nthe JSON representation of a PubsubMessage\n(\u003chttps://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage\u003e).\n\n### hasPubsubWrapper\n\n### setPubsubWrapper\n\nOptional. When set, the payload to the push endpoint is in the form of\nthe JSON representation of a PubsubMessage\n(\u003chttps://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage\u003e).\n\n### getNoWrapper\n\nOptional. When set, the payload to the push endpoint is not wrapped.\n\n### hasNoWrapper\n\n### setNoWrapper\n\nOptional. When set, the payload to the push endpoint is not wrapped.\n\n### getAuthenticationMethod\n\n### getWrapper"]]