31
31
public final class Criteria extends com .google .api .client .json .GenericJson {
32
32
33
33
/**
34
- * Optional. The filter string to match on Alert fields when silencing the alerts. It follows the
35
- * standard https://google.aip.dev/160 syntax. A filter string used to apply the snooze to
36
- * specific incidents that have matching filter values. Filters can be defined for snoozes that
37
- * apply to one alerting policy. Filters must be a string formatted as one or more resource labels
38
- * with specific label values. If multiple resource labels are used, then they must be connected
39
- * with an AND operator. For example, the following filter applies the snooze to incidents that
40
- * have an instance ID of 1234567890 and a zone of us-central1-a:
41
- * resource.labels.instance_id="1234567890" AND resource.labels.zone="us-central1-a"
34
+ * Optional. When you define a snooze, you can also define a filter for that snooze. The filter is
35
+ * a string containing one or more key-value pairs. The string uses the standard
36
+ * https://google.aip.dev/160 filter syntax. If you define a filter for a snooze, then the snooze
37
+ * can only apply to one alert policy. When the snooze is active, incidents won't be created when
38
+ * the incident would have key-value pairs (labels) that match those specified by the filter in
39
+ * the snooze.Snooze filters support resource, metric, and metadata labels. If multiple labels are
40
+ * used, then they must be connected with an AND operator. For example, the following filter
41
+ * applies the snooze to incidents that have a resource label with an instance ID of "1234567890",
42
+ * a metric label with an instance name of "group", a metadata user label with a key of "foo" and
43
+ * a value of "bar", and a metadata system label with a key of "region" and a value of "us-
44
+ * central1": "filter": "resource.labels.instance_id=\"1234567890\" AND
45
+ * metric.labels.instance_name=\"test_group\" AND metadata.user_labels.foo=\"bar\" AND
46
+ * metadata.system_labels.region=\"us-central1\""
42
47
* The value may be {@code null}.
43
48
*/
44
49
@ com .google .api .client .util .Key
@@ -55,29 +60,39 @@ public final class Criteria extends com.google.api.client.json.GenericJson {
55
60
private java .util .List <java .lang .String > policies ;
56
61
57
62
/**
58
- * Optional. The filter string to match on Alert fields when silencing the alerts. It follows the
59
- * standard https://google.aip.dev/160 syntax. A filter string used to apply the snooze to
60
- * specific incidents that have matching filter values. Filters can be defined for snoozes that
61
- * apply to one alerting policy. Filters must be a string formatted as one or more resource labels
62
- * with specific label values. If multiple resource labels are used, then they must be connected
63
- * with an AND operator. For example, the following filter applies the snooze to incidents that
64
- * have an instance ID of 1234567890 and a zone of us-central1-a:
65
- * resource.labels.instance_id="1234567890" AND resource.labels.zone="us-central1-a"
63
+ * Optional. When you define a snooze, you can also define a filter for that snooze. The filter is
64
+ * a string containing one or more key-value pairs. The string uses the standard
65
+ * https://google.aip.dev/160 filter syntax. If you define a filter for a snooze, then the snooze
66
+ * can only apply to one alert policy. When the snooze is active, incidents won't be created when
67
+ * the incident would have key-value pairs (labels) that match those specified by the filter in
68
+ * the snooze.Snooze filters support resource, metric, and metadata labels. If multiple labels are
69
+ * used, then they must be connected with an AND operator. For example, the following filter
70
+ * applies the snooze to incidents that have a resource label with an instance ID of "1234567890",
71
+ * a metric label with an instance name of "group", a metadata user label with a key of "foo" and
72
+ * a value of "bar", and a metadata system label with a key of "region" and a value of "us-
73
+ * central1": "filter": "resource.labels.instance_id=\"1234567890\" AND
74
+ * metric.labels.instance_name=\"test_group\" AND metadata.user_labels.foo=\"bar\" AND
75
+ * metadata.system_labels.region=\"us-central1\""
66
76
* @return value or {@code null} for none
67
77
*/
68
78
public java .lang .String getFilter () {
69
79
return filter ;
70
80
}
71
81
72
82
/**
73
- * Optional. The filter string to match on Alert fields when silencing the alerts. It follows the
74
- * standard https://google.aip.dev/160 syntax. A filter string used to apply the snooze to
75
- * specific incidents that have matching filter values. Filters can be defined for snoozes that
76
- * apply to one alerting policy. Filters must be a string formatted as one or more resource labels
77
- * with specific label values. If multiple resource labels are used, then they must be connected
78
- * with an AND operator. For example, the following filter applies the snooze to incidents that
79
- * have an instance ID of 1234567890 and a zone of us-central1-a:
80
- * resource.labels.instance_id="1234567890" AND resource.labels.zone="us-central1-a"
83
+ * Optional. When you define a snooze, you can also define a filter for that snooze. The filter is
84
+ * a string containing one or more key-value pairs. The string uses the standard
85
+ * https://google.aip.dev/160 filter syntax. If you define a filter for a snooze, then the snooze
86
+ * can only apply to one alert policy. When the snooze is active, incidents won't be created when
87
+ * the incident would have key-value pairs (labels) that match those specified by the filter in
88
+ * the snooze.Snooze filters support resource, metric, and metadata labels. If multiple labels are
89
+ * used, then they must be connected with an AND operator. For example, the following filter
90
+ * applies the snooze to incidents that have a resource label with an instance ID of "1234567890",
91
+ * a metric label with an instance name of "group", a metadata user label with a key of "foo" and
92
+ * a value of "bar", and a metadata system label with a key of "region" and a value of "us-
93
+ * central1": "filter": "resource.labels.instance_id=\"1234567890\" AND
94
+ * metric.labels.instance_name=\"test_group\" AND metadata.user_labels.foo=\"bar\" AND
95
+ * metadata.system_labels.region=\"us-central1\""
81
96
* @param filter filter or {@code null} for none
82
97
*/
83
98
public Criteria setFilter (java .lang .String filter ) {
0 commit comments