Show / Hide Table of Contents

Class MonitoredResourceBuilder

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

Inheritance
System.Object
MonitoredResourceBuilder
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax.Grpc
Assembly: Google.Api.Gax.Grpc.dll
Syntax
public static class MonitoredResourceBuilder

Properties

GlobalResource

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

Declaration
public static MonitoredResource GlobalResource { get; }
Property Value
Type Description
MonitoredResource
Remarks

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

Methods

FromPlatform()

Builds a MonitoredResource from the auto-detected platform, using Instance(). This call can block for up to 1 second.

Declaration
public static MonitoredResource FromPlatform()
Returns
Type Description
MonitoredResource

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

FromPlatform(Platform)

Builds a suitable MonitoredResource instance, given Platform information. Use FromPlatform() or FromPlatformAsync() to build a MonitoredResource from auto-detected platform information.

Declaration
public static MonitoredResource FromPlatform(Platform platform)
Parameters
Type Name Description
Platform platform

Platform information, usually auto-detected.

Returns
Type Description
MonitoredResource

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

FromPlatformAsync()

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

Declaration
public static Task<MonitoredResource> FromPlatformAsync()
Returns
Type Description
System.Threading.Tasks.Task<MonitoredResource>

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

Back to top