Reference documentation and code samples for the Google Cloud Eventarc V1 Client class EventFilter.
Filters events based on exact matches on the CloudEvents attributes.
Generated from protobuf messagegoogle.cloud.eventarc.v1.EventFilter
Namespace
Google \ Cloud \ Eventarc \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ attribute
string
Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. You canretrieve a specific provider's supported event types. All triggers MUST provide a filter for the 'type' attribute.
↳ value
string
Required. The value for the attribute.
↳ operator
string
Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The allowed values arepath_patternandmatch-path-pattern.path_patternis only allowed for GCFv1 triggers.
All triggers MUST provide a filter for the 'type' attribute.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getValue
Required. The value for the attribute.
Returns
Type
Description
string
setValue
Required. The value for the attribute.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOperator
Optional. The operator used for matching the events with the value of the
filter. If not specified, only events that have an exact key-value pair
specified in the filter are matched. The allowed values arepath_patternandmatch-path-pattern.path_patternis only allowed for GCFv1
triggers.
Returns
Type
Description
string
setOperator
Optional. The operator used for matching the events with the value of the
filter. If not specified, only events that have an exact key-value pair
specified in the filter are matched. The allowed values arepath_patternandmatch-path-pattern.path_patternis only allowed for GCFv1
triggers.
[[["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 EventFilter (2.1.5)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.5 (latest)](/php/docs/reference/cloud-eventarc/latest/V1.EventFilter)\n- [2.1.4](/php/docs/reference/cloud-eventarc/2.1.4/V1.EventFilter)\n- [2.0.1](/php/docs/reference/cloud-eventarc/2.0.1/V1.EventFilter)\n- [1.3.5](/php/docs/reference/cloud-eventarc/1.3.5/V1.EventFilter)\n- [1.2.2](/php/docs/reference/cloud-eventarc/1.2.2/V1.EventFilter)\n- [1.1.1](/php/docs/reference/cloud-eventarc/1.1.1/V1.EventFilter)\n- [1.0.5](/php/docs/reference/cloud-eventarc/1.0.5/V1.EventFilter) \nReference documentation and code samples for the Google Cloud Eventarc V1 Client class EventFilter.\n\nFilters events based on exact matches on the CloudEvents attributes.\n\nGenerated from protobuf message `google.cloud.eventarc.v1.EventFilter`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Eventarc \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAttribute\n\nRequired. The name of a CloudEvents attribute. Currently, only a subset of\nattributes are supported for filtering. You can [retrieve a specific\nprovider's supported event\ntypes](/eventarc/docs/list-providers#describe-provider).\n\nAll triggers MUST provide a filter for the 'type' attribute.\n\n### setAttribute\n\nRequired. The name of a CloudEvents attribute. Currently, only a subset of\nattributes are supported for filtering. You can [retrieve a specific\nprovider's supported event\ntypes](/eventarc/docs/list-providers#describe-provider).\n\nAll triggers MUST provide a filter for the 'type' attribute.\n\n### getValue\n\nRequired. The value for the attribute.\n\n### setValue\n\nRequired. The value for the attribute.\n\n### getOperator\n\nOptional. The operator used for matching the events with the value of the\nfilter. If not specified, only events that have an exact key-value pair\nspecified in the filter are matched. The allowed values are `path_pattern`\nand `match-path-pattern`. `path_pattern` is only allowed for GCFv1\ntriggers.\n\n### setOperator\n\nOptional. The operator used for matching the events with the value of the\nfilter. If not specified, only events that have an exact key-value pair\nspecified in the filter are matched. The allowed values are `path_pattern`\nand `match-path-pattern`. `path_pattern` is only allowed for GCFv1\ntriggers."]]