# Workload Manager v1 API - Class ResourceFilter (1.0.0-beta01)

    public sealed class ResourceFilter : IMessage<ResourceFilter>, IEquatable<ResourceFilter>, IDeepCloneable<ResourceFilter>, IBufferMessage, IMessage

Reference documentation and code samples for the Workload Manager v1 API class ResourceFilter.

Resource filter for an evaluation defining the scope of resources to be
evaluated.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ResourceFilter](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.ResourceFilter), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ResourceFilter](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.ResourceFilter), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ResourceFilter](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.ResourceFilter), [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.WorkloadManager.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1)

## Assembly

Google.Cloud.WorkloadManager.V1.dll

## Constructors

### ResourceFilter()

    public ResourceFilter()

### ResourceFilter(ResourceFilter)

    public ResourceFilter(ResourceFilter other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.ResourceFilter` |

## Properties

### GceInstanceFilter

    public GceInstanceFilter GceInstanceFilter { get; set; }

Filter compute engine resources.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.GceInstanceFilter` |   |

### InclusionLabels

    public MapField<string, string> InclusionLabels { get; }

Labels to filter resources by. Each key-value pair in the map must exist
on the resource for it to be included (e.g. VM instance labels).
For example, specifying `{ "env": "prod", "database": "nosql" }` will only
include resources that have labels `env=prod` and `database=nosql`.

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

### ResourceIdPatterns

    public RepeatedField<string> ResourceIdPatterns { get; }

The pattern to filter resources by their id
For example, a pattern of ".*prod-cluster.*" will match all resources that
contain "prod-cluster" in their ID.

| **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` |   |

### Scopes

    public RepeatedField<string> Scopes { get; }

The scopes of evaluation resource.
Format:

- `projects/{project_id}`
- `folders/{folder_id}`
- `organizations/{organization_id}`

| **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` |   |