Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::Snooze::Criteria.
Criteria specific to the AlertPolicys that this Snooze applies to. The
Snooze will suppress alerts that come from one of the AlertPolicys
whose names are supplied.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#filter
deffilter()->::String
Returns
(::String) —
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
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 of
1234567890 and a zone of us-central1-a:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
#filter=
deffilter=(value)->::String
Parameter
value (::String) —
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
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 of
1234567890 and a zone of us-central1-a:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
Returns
(::String) —
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
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 of
1234567890 and a zone of us-central1-a:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
#policies
defpolicies()->::Array<::String>
Returns
(::Array<::String>) — The specific AlertPolicy names for the alert that should be snoozed.
The format is:
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if filter is specified at the same
time.
#policies=
defpolicies=(value)->::Array<::String>
Parameter
value (::Array<::String>) — The specific AlertPolicy names for the alert that should be snoozed.
The format is:
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if filter is specified at the same
time.
Returns
(::Array<::String>) — The specific AlertPolicy names for the alert that should be snoozed.
The format is:
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if filter is specified at the same
time.
[[["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 Monitoring V3 API - Class Google::Cloud::Monitoring::V3::Snooze::Criteria (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-Snooze-Criteria)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-Snooze-Criteria) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::Snooze::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\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #filter\n\n def filter() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. The filter string to match on Alert fields when silencing the\n alerts. It follows the standard https://google.aip.dev/160 syntax.\n A filter string used to apply the snooze to specific incidents\n that have matching filter values.\n Filters can be defined for snoozes that apply to one alerting\n policy.\n Filters must be a string formatted as one or more resource labels with\n specific label values. If multiple resource labels are used, then they\n must be connected with an AND operator. For example, the following filter\n applies the snooze to incidents that have an instance ID of\n `1234567890` and a zone of `us-central1-a`:\n\n resource.labels.instance_id=\"1234567890\" AND\n resource.labels.zone=\"us-central1-a\"\n\n### #filter=\n\n def filter=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n Optional. The filter string to match on Alert fields when silencing the\n alerts. It follows the standard https://google.aip.dev/160 syntax.\n A filter string used to apply the snooze to specific incidents\n that have matching filter values.\n Filters can be defined for snoozes that apply to one alerting\n policy.\n Filters must be a string formatted as one or more resource labels with\n specific label values. If multiple resource labels are used, then they\n must be connected with an AND operator. For example, the following filter\n applies the snooze to incidents that have an instance ID of\n `1234567890` and a zone of `us-central1-a`: \n\n resource.labels.instance_id=\"1234567890\" AND\n resource.labels.zone=\"us-central1-a\"\n\n**Returns**\n\n- (::String) --- Optional. The filter string to match on Alert fields when silencing the\n alerts. It follows the standard https://google.aip.dev/160 syntax.\n A filter string used to apply the snooze to specific incidents\n that have matching filter values.\n Filters can be defined for snoozes that apply to one alerting\n policy.\n Filters must be a string formatted as one or more resource labels with\n specific label values. If multiple resource labels are used, then they\n must be connected with an AND operator. For example, the following filter\n applies the snooze to incidents that have an instance ID of\n `1234567890` and a zone of `us-central1-a`:\n\n resource.labels.instance_id=\"1234567890\" AND\n resource.labels.zone=\"us-central1-a\"\n\n### #policies\n\n def policies() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- The specific `AlertPolicy` names for the alert that should be snoozed. The format is:\n\n\n projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]\n\n There is a limit of 16 policies per snooze. This limit is checked during\n snooze creation.\n Exactly 1 alert policy is required if `filter` is specified at the same\n time.\n\n### #policies=\n\n def policies=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- The specific `AlertPolicy` names for the alert that should be snoozed. The format is:\n\n\n projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]\n\n There is a limit of 16 policies per snooze. This limit is checked during\n snooze creation.\n Exactly 1 alert policy is required if `filter` is specified at the same\ntime. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- The specific `AlertPolicy` names for the alert that should be snoozed. The format is:\n\n\n projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]\n\n There is a limit of 16 policies per snooze. This limit is checked during\n snooze creation.\n Exactly 1 alert policy is required if `filter` is specified at the same\n time."]]