4.10.0 (latest) 4.8.0 4.4.0 4.3.1 4.2.0 4.0.0 3.2.0

    public static class MonitoredResourceBuilder

Helper methods to build a Google.Api.MonitoredResource instance.
See the [Monitored Resource List](https://cloud.google.com/logging/docs/api/v2/resource-list) for details.

## Inheritance

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

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Api.Gax.Grpc](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.md.txt)

## Assembly

Google.Api.Gax.Grpc.dll

## Properties

### GlobalResource

    public static MonitoredResource GlobalResource { get; }

An instance of a "global" resource, with Google.Api.MonitoredResource.Type
set to "global", and an empty set of Google.Api.MonitoredResource.Labels.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Google.Api.MonitoredResource` |   |

**Remarks** A new instance is returned with each call, as the returned object is mutable.

## Methods

### FromPlatform()

    public static MonitoredResource FromPlatform()

Builds a Google.Api.MonitoredResource from the auto-detected
platform, using [Instance()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Platform.md.txt#Google_Api_Gax_Platform_Instance).
This call can block for up to 1 second.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google.Api.MonitoredResource` | A Google.Api.MonitoredResource instance, populated most suitably for the given platform. |

### FromPlatform(Platform)

    public static MonitoredResource FromPlatform(Platform platform)

Builds a suitable Google.Api.MonitoredResource instance, given
[Platform](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Platform.md.txt) information.
Use [FromPlatform()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.MonitoredResourceBuilder.md.txt#Google_Api_Gax_Grpc_MonitoredResourceBuilder_FromPlatform) or [FromPlatformAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.MonitoredResourceBuilder.md.txt#Google_Api_Gax_Grpc_MonitoredResourceBuilder_FromPlatformAsync) to build a
Google.Api.MonitoredResource from auto-detected platform information.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `platform` | `Platform` [Platform](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Platform.md.txt) information, usually auto-detected. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google.Api.MonitoredResource` | A Google.Api.MonitoredResource instance, populated most suitably for the given platform. |

### FromPlatformAsync()

    public static Task<MonitoredResource> FromPlatformAsync()

Builds a Google.Api.MonitoredResource from the auto-detected
platform, using [Instance()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Platform.md.txt#Google_Api_Gax_Platform_Instance).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskGoogle.Api.MonitoredResource` | A task, the result of which will be a Google.Api.MonitoredResource instance, populated most suitably for the given platform. |