Class MonitoredResourceBuilder
Helper methods to build a MonitoredResource instance. See the Monitored Resource List for details.
Inheritance
Inherited Members
Namespace: Google.Api.Gax.Grpc
Assembly: Google.Api.Gax.Grpc.dll
Syntax
public static class MonitoredResourceBuilder
Properties
GlobalResource
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. |