Class MonitoredResourceBuilder (4.2.0)

public static class MonitoredResourceBuilder

Helper methods to build a Google.Api.MonitoredResource instance. See the Monitored Resource List for details.

Inheritance

Object > MonitoredResourceBuilder

Namespace

Google.Api.Gax.Grpc

Assembly

Google.Api.Gax.Grpc.dll

Properties

GlobalResource

public static MonitoredResource GlobalResource { get; }

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

Property Value
TypeDescription
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(). This call can block for up to 1 second.

Returns
TypeDescription
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 information. Use FromPlatform() or FromPlatformAsync() to build a Google.Api.MonitoredResource from auto-detected platform information.

Parameter
NameDescription
platformPlatform

Platform information, usually auto-detected.

Returns
TypeDescription
Google.Api.MonitoredResource

A Google.Api.MonitoredResource instance, populated most suitably for the given platform.

FromPlatformAsync()

public static async Task<MonitoredResource> FromPlatformAsync()

Builds a Google.Api.MonitoredResource from the auto-detected platform, using Instance().

Returns
TypeDescription
Task<Google.Api.MonitoredResource>

A task, the result of which will be a Google.Api.MonitoredResource instance, populated most suitably for the given platform.