Reference documentation and code samples for the Stackdriver Monitoring V3 Client class Criteria.
Criteria specific to theAlertPolicys that thisSnoozeapplies to. TheSnoozewill suppress alerts that come from one of theAlertPolicys
whose names are supplied.
Generated from protobuf messagegoogle.monitoring.v3.Snooze.Criteria
Namespace
Google \ Cloud \ Monitoring \ V3 \ Snooze
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ policies
array
The specificAlertPolicynames for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation. Exactly 1 alert policy is required iffilteris specified at the same time.
↳ filter
string
Optional. The filter string to match on Alert fields when silencing the alerts. It follows the standardhttps://google.aip.dev/160syntax. A filter string used to apply the snooze to specific incidents that have matching filter values. Filters can be defined for snoozes that apply to one alerting policy. Filters must be a string formatted as one or more resource labels with specific label values. If multiple resource labels are used, then they must be connected with an AND operator. For example, the following filter applies the snooze to incidents that have an instance ID of1234567890and a zone ofus-central1-a: resource.labels.instance_id="1234567890" AND resource.labels.zone="us-central1-a"
getPolicies
The specificAlertPolicynames for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required iffilteris specified at the same
time.
The specificAlertPolicynames for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required iffilteris specified at the same
time.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getFilter
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standardhttps://google.aip.dev/160syntax.
A filter string used to apply the snooze to specific incidents
that have matching filter values.
Filters can be defined for snoozes that apply to one alerting
policy.
Filters must be a string formatted as one or more resource labels with
specific label values. If multiple resource labels are used, then they
must be connected with an AND operator. For example, the following filter
applies the snooze to incidents that have an instance ID of1234567890and a zone ofus-central1-a:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
Returns
Type
Description
string
setFilter
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standardhttps://google.aip.dev/160syntax.
A filter string used to apply the snooze to specific incidents
that have matching filter values.
Filters can be defined for snoozes that apply to one alerting
policy.
Filters must be a string formatted as one or more resource labels with
specific label values. If multiple resource labels are used, then they
must be connected with an AND operator. For example, the following filter
applies the snooze to incidents that have an instance ID of1234567890and a zone ofus-central1-a:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
[[["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,["# Stackdriver Monitoring V3 Client - Class Criteria (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.Snooze.Criteria)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.Snooze.Criteria)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.Snooze.Criteria)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.Snooze.Criteria)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.Snooze.Criteria)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.Snooze.Criteria)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.Snooze.Criteria)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.Snooze.Criteria)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.Snooze.Criteria)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.Snooze.Criteria)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.Snooze.Criteria)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.Snooze.Criteria)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.Snooze.Criteria)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.Snooze.Criteria) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class Criteria.\n\nCriteria specific to the `AlertPolicy`s that this `Snooze` applies to. The\n`Snooze` will suppress alerts that come from one of the `AlertPolicy`s\nwhose names are supplied.\n\nGenerated from protobuf message `google.monitoring.v3.Snooze.Criteria`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3 \\\\ Snooze\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPolicies\n\nThe specific `AlertPolicy` names for the alert that should be snoozed.\n\nThe format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]/alertPolicies/\\[POLICY_ID\\]\nThere is a limit of 16 policies per snooze. This limit is checked during\nsnooze creation.\nExactly 1 alert policy is required if `filter` is specified at the same\ntime.\n\n### setPolicies\n\nThe specific `AlertPolicy` names for the alert that should be snoozed.\n\nThe format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]/alertPolicies/\\[POLICY_ID\\]\nThere is a limit of 16 policies per snooze. This limit is checked during\nsnooze creation.\nExactly 1 alert policy is required if `filter` is specified at the same\ntime.\n\n### getFilter\n\nOptional. The filter string to match on Alert fields when silencing the\nalerts. It follows the standard \u003chttps://google.aip.dev/160\u003e syntax.\n\nA filter string used to apply the snooze to specific incidents\nthat have matching filter values.\nFilters can be defined for snoozes that apply to one alerting\npolicy.\nFilters must be a string formatted as one or more resource labels with\nspecific label values. If multiple resource labels are used, then they\nmust be connected with an AND operator. For example, the following filter\napplies the snooze to incidents that have an instance ID of\n`1234567890` and a zone of `us-central1-a`:\nresource.labels.instance_id=\"1234567890\" AND\nresource.labels.zone=\"us-central1-a\"\n\n### setFilter\n\nOptional. The filter string to match on Alert fields when silencing the\nalerts. It follows the standard \u003chttps://google.aip.dev/160\u003e syntax.\n\nA filter string used to apply the snooze to specific incidents\nthat have matching filter values.\nFilters can be defined for snoozes that apply to one alerting\npolicy.\nFilters must be a string formatted as one or more resource labels with\nspecific label values. If multiple resource labels are used, then they\nmust be connected with an AND operator. For example, the following filter\napplies the snooze to incidents that have an instance ID of\n`1234567890` and a zone of `us-central1-a`:\nresource.labels.instance_id=\"1234567890\" AND\nresource.labels.zone=\"us-central1-a\""]]