# Google Cloud Monitoring v3 API - Class Snooze.Types.Criteria (3.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.16.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.15.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.14.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.13.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.12.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.11.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.10.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.9.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.8.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.7.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.6.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.5.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.4.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.3.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.2.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.1.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [3.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.0.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.6.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.5.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.4.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.3.0/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria)

    public sealed class Snooze.Types.Criteria : IMessage<Snooze.Types.Criteria>, IEquatable<Snooze.Types.Criteria>, IDeepCloneable<Snooze.Types.Criteria>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Monitoring v3 API class Snooze.Types.Criteria.

Criteria specific to the `AlertPolicy`s that this `Snooze` applies to. The
`Snooze` will suppress alerts that come from one of the `AlertPolicy`s
whose names are supplied.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Snooze.Types.Criteria

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Snooze](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types)[Criteria](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Snooze](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types)[Criteria](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Snooze](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types)[Criteria](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Monitoring.V3](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3)

## Assembly

Google.Cloud.Monitoring.V3.dll

## Constructors

### Criteria()

    public Criteria()

### Criteria(Criteria)

    public Criteria(Snooze.Types.Criteria other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snoozehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria` |

## Properties

### Filter

    public string Filter { get; set; }

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"

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Policies

    public RepeatedField<string> Policies { get; }

The specific `AlertPolicy` names 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 if `filter` is specified at the same
time.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### PoliciesAsAlertPolicyNames

    public ResourceNameList<AlertPolicyName> PoliciesAsAlertPolicyNames { get; }

[AlertPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.AlertPolicyName)-typed view over the [Policies](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria#Google_Cloud_Monitoring_V3_Snooze_Types_Criteria_Policies) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNameList-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.AlertPolicyName` |   |

### PoliciesAsResourceNames

    public ResourceNameList<IResourceName> PoliciesAsResourceNames { get; }

[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html)-typed view over the [Policies](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.Snooze.Types.Criteria#Google_Cloud_Monitoring_V3_Snooze_Types_Criteria_Policies) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNameList-1.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` |   |