Reference documentation and code samples for the Google Cloud Eventarc V1 Client class MessageBus.
MessageBus for the messages flowing through the system. The admin has
visibility and control over the messages being published and consumed and can
restrict publishers and subscribers to only a subset of data available in the
system by defining authorization policies.
Generated from protobuf messagegoogle.cloud.eventarc.v1.MessageBus
Namespace
Google \ Cloud \ Eventarc \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. Resource name of the form projects/{project}/locations/{location}/messageBuses/{message_bus}
↳ uid
string
Output only. Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
↳ etag
string
Output only. This checksum is computed by the server based on the value of other fields, and might be sent only on update and delete requests to ensure that the client has an up-to-date value before proceeding.
Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the patternprojects/*/locations/*/keyRings/*/cryptoKeys/*.
Optional. Config to control Platform logging for the Message Bus. This log configuration is applied to the Message Bus itself, and all the Enrollments attached to it.
getName
Identifier. Resource name of the form
projects/{project}/locations/{location}/messageBuses/{message_bus}
Returns
Type
Description
string
setName
Identifier. Resource name of the form
projects/{project}/locations/{location}/messageBuses/{message_bus}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUid
Output only. Server assigned unique identifier for the channel. The value
is a UUID4 string and guaranteed to remain unchanged until the resource is
deleted.
Returns
Type
Description
string
setUid
Output only. Server assigned unique identifier for the channel. The value
is a UUID4 string and guaranteed to remain unchanged until the resource is
deleted.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEtag
Output only. This checksum is computed by the server based on the value of
other fields, and might be sent only on update and delete requests to
ensure that the client has an up-to-date value before proceeding.
Returns
Type
Description
string
setEtag
Output only. This checksum is computed by the server based on the value of
other fields, and might be sent only on update and delete requests to
ensure that the client has an up-to-date value before proceeding.
Optional. Resource name of a KMS crypto key (managed by the user) used to
encrypt/decrypt their event data.
It must match the patternprojects/*/locations/*/keyRings/*/cryptoKeys/*.
Returns
Type
Description
string
setCryptoKeyName
Optional. Resource name of a KMS crypto key (managed by the user) used to
encrypt/decrypt their event data.
It must match the patternprojects/*/locations/*/keyRings/*/cryptoKeys/*.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLoggingConfig
Optional. Config to control Platform logging for the Message Bus. This log
configuration is applied to the Message Bus itself, and all the Enrollments
attached to it.
Optional. Config to control Platform logging for the Message Bus. This log
configuration is applied to the Message Bus itself, and all the Enrollments
attached to it.
[[["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,["# Google Cloud Eventarc V1 Client - Class MessageBus (2.1.5)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.5 (latest)](/php/docs/reference/cloud-eventarc/latest/V1.MessageBus)\n- [2.1.4](/php/docs/reference/cloud-eventarc/2.1.4/V1.MessageBus)\n- [2.0.1](/php/docs/reference/cloud-eventarc/2.0.1/V1.MessageBus)\n- [1.3.5](/php/docs/reference/cloud-eventarc/1.3.5/V1.MessageBus)\n- [1.2.2](/php/docs/reference/cloud-eventarc/1.2.2/V1.MessageBus)\n- [1.1.1](/php/docs/reference/cloud-eventarc/1.1.1/V1.MessageBus)\n- [1.0.5](/php/docs/reference/cloud-eventarc/1.0.5/V1.MessageBus) \nReference documentation and code samples for the Google Cloud Eventarc V1 Client class MessageBus.\n\nMessageBus for the messages flowing through the system. The admin has\nvisibility and control over the messages being published and consumed and can\nrestrict publishers and subscribers to only a subset of data available in the\nsystem by defining authorization policies.\n\nGenerated from protobuf message `google.cloud.eventarc.v1.MessageBus`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Eventarc \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. Resource name of the form\nprojects/{project}/locations/{location}/messageBuses/{message_bus}\n\n### setName\n\nIdentifier. Resource name of the form\nprojects/{project}/locations/{location}/messageBuses/{message_bus}\n\n### getUid\n\nOutput only. Server assigned unique identifier for the channel. The value\nis a UUID4 string and guaranteed to remain unchanged until the resource is\ndeleted.\n\n### setUid\n\nOutput only. Server assigned unique identifier for the channel. The value\nis a UUID4 string and guaranteed to remain unchanged until the resource is\ndeleted.\n\n### getEtag\n\nOutput only. This checksum is computed by the server based on the value of\nother fields, and might be sent only on update and delete requests to\nensure that the client has an up-to-date value before proceeding.\n\n### setEtag\n\nOutput only. This checksum is computed by the server based on the value of\nother fields, and might be sent only on update and delete requests to\nensure that the client has an up-to-date value before proceeding.\n\n### getCreateTime\n\nOutput only. The creation time.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The creation time.\n\n### getUpdateTime\n\nOutput only. The last-modified time.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The last-modified time.\n\n### getLabels\n\nOptional. Resource labels.\n\n### setLabels\n\nOptional. Resource labels.\n\n### getAnnotations\n\nOptional. Resource annotations.\n\n### setAnnotations\n\nOptional. Resource annotations.\n\n### getDisplayName\n\nOptional. Resource display name.\n\n### setDisplayName\n\nOptional. Resource display name.\n\n### getCryptoKeyName\n\nOptional. Resource name of a KMS crypto key (managed by the user) used to\nencrypt/decrypt their event data.\n\nIt must match the pattern\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.\n\n### setCryptoKeyName\n\nOptional. Resource name of a KMS crypto key (managed by the user) used to\nencrypt/decrypt their event data.\n\nIt must match the pattern\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.\n\n### getLoggingConfig\n\nOptional. Config to control Platform logging for the Message Bus. This log\nconfiguration is applied to the Message Bus itself, and all the Enrollments\nattached to it.\n\n### hasLoggingConfig\n\n### clearLoggingConfig\n\n### setLoggingConfig\n\nOptional. Config to control Platform logging for the Message Bus. This log\nconfiguration is applied to the Message Bus itself, and all the Enrollments\nattached to it."]]