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

Parameter
Name Description
platform Platform

Platform 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().

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.