Google Cloud Monitoring v3 API - Class MetricServiceClientImpl (3.13.0)

public sealed class MetricServiceClientImpl : MetricServiceClient

Reference documentation and code samples for the Google Cloud Monitoring v3 API class MetricServiceClientImpl.

MetricService client wrapper implementation, for convenient use.

Inheritance

object > MetricServiceClient > MetricServiceClientImpl

Namespace

Google.Cloud.Monitoring.V3

Assembly

Google.Cloud.Monitoring.V3.dll

Remarks

Manages metric descriptors, monitored resource descriptors, and time series data.

Constructors

MetricServiceClientImpl(MetricServiceClient, MetricServiceSettings, ILogger)

public MetricServiceClientImpl(MetricService.MetricServiceClient grpcClient, MetricServiceSettings settings, ILogger logger)

Constructs a client wrapper for the MetricService service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient MetricServiceMetricServiceClient

The underlying gRPC client.

settings MetricServiceSettings

The base MetricServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override MetricService.MetricServiceClient GrpcClient { get; }

The underlying gRPC MetricService client

Property Value
Type Description
MetricServiceMetricServiceClient
Overrides

Methods

CreateMetricDescriptor(CreateMetricDescriptorRequest, CallSettings)

public override MetricDescriptor CreateMetricDescriptor(CreateMetricDescriptorRequest request, CallSettings callSettings = null)

Creates a new metric descriptor. The creation is executed asynchronously. User-created metric descriptors define custom metrics. The metric descriptor is updated if it already exists, except that metric labels are never removed.

Parameters
Name Description
request CreateMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MetricDescriptor

The RPC response.

Overrides

CreateMetricDescriptorAsync(CreateMetricDescriptorRequest, CallSettings)

public override Task<MetricDescriptor> CreateMetricDescriptorAsync(CreateMetricDescriptorRequest request, CallSettings callSettings = null)

Creates a new metric descriptor. The creation is executed asynchronously. User-created metric descriptors define custom metrics. The metric descriptor is updated if it already exists, except that metric labels are never removed.

Parameters
Name Description
request CreateMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMetricDescriptor

A Task containing the RPC response.

Overrides

CreateServiceTimeSeries(CreateTimeSeriesRequest, CallSettings)

public override void CreateServiceTimeSeries(CreateTimeSeriesRequest request, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
Name Description
request CreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

CreateServiceTimeSeriesAsync(CreateTimeSeriesRequest, CallSettings)

public override Task CreateServiceTimeSeriesAsync(CreateTimeSeriesRequest request, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
Name Description
request CreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

CreateTimeSeries(CreateTimeSeriesRequest, CallSettings)

public override void CreateTimeSeries(CreateTimeSeriesRequest request, CallSettings callSettings = null)

Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. This method does not support resource locations constraint of an organization policy.

Parameters
Name Description
request CreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

CreateTimeSeriesAsync(CreateTimeSeriesRequest, CallSettings)

public override Task CreateTimeSeriesAsync(CreateTimeSeriesRequest request, CallSettings callSettings = null)

Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. This method does not support resource locations constraint of an organization policy.

Parameters
Name Description
request CreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

DeleteMetricDescriptor(DeleteMetricDescriptorRequest, CallSettings)

public override void DeleteMetricDescriptor(DeleteMetricDescriptorRequest request, CallSettings callSettings = null)

Deletes a metric descriptor. Only user-created custom metrics can be deleted.

Parameters
Name Description
request DeleteMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteMetricDescriptorAsync(DeleteMetricDescriptorRequest, CallSettings)

public override Task DeleteMetricDescriptorAsync(DeleteMetricDescriptorRequest request, CallSettings callSettings = null)

Deletes a metric descriptor. Only user-created custom metrics can be deleted.

Parameters
Name Description
request DeleteMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

GetMetricDescriptor(GetMetricDescriptorRequest, CallSettings)

public override MetricDescriptor GetMetricDescriptor(GetMetricDescriptorRequest request, CallSettings callSettings = null)

Gets a single metric descriptor.

Parameters
Name Description
request GetMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MetricDescriptor

The RPC response.

Overrides

GetMetricDescriptorAsync(GetMetricDescriptorRequest, CallSettings)

public override Task<MetricDescriptor> GetMetricDescriptorAsync(GetMetricDescriptorRequest request, CallSettings callSettings = null)

Gets a single metric descriptor.

Parameters
Name Description
request GetMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMetricDescriptor

A Task containing the RPC response.

Overrides

GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest, CallSettings)

public override MonitoredResourceDescriptor GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest request, CallSettings callSettings = null)

Gets a single monitored resource descriptor.

Parameters
Name Description
request GetMonitoredResourceDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MonitoredResourceDescriptor

The RPC response.

Overrides

GetMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest, CallSettings)

public override Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest request, CallSettings callSettings = null)

Gets a single monitored resource descriptor.

Parameters
Name Description
request GetMonitoredResourceDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMonitoredResourceDescriptor

A Task containing the RPC response.

Overrides

ListMetricDescriptors(ListMetricDescriptorsRequest, CallSettings)

public override PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptors(ListMetricDescriptorsRequest request, CallSettings callSettings = null)

Lists metric descriptors that match a filter.

Parameters
Name Description
request ListMetricDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListMetricDescriptorsResponseMetricDescriptor

A pageable sequence of MetricDescriptor resources.

Overrides

ListMetricDescriptorsAsync(ListMetricDescriptorsRequest, CallSettings)

public override PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptorsAsync(ListMetricDescriptorsRequest request, CallSettings callSettings = null)

Lists metric descriptors that match a filter.

Parameters
Name Description
request ListMetricDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListMetricDescriptorsResponseMetricDescriptor

A pageable asynchronous sequence of MetricDescriptor resources.

Overrides

ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest, CallSettings)

public override PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest request, CallSettings callSettings = null)

Lists monitored resource descriptors that match a filter.

Parameters
Name Description
request ListMonitoredResourceDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListMonitoredResourceDescriptorsResponseMonitoredResourceDescriptor

A pageable sequence of MonitoredResourceDescriptor resources.

Overrides

ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest, CallSettings)

public override PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest request, CallSettings callSettings = null)

Lists monitored resource descriptors that match a filter.

Parameters
Name Description
request ListMonitoredResourceDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListMonitoredResourceDescriptorsResponseMonitoredResourceDescriptor

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Overrides

ListTimeSeries(ListTimeSeriesRequest, CallSettings)

public override PagedEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeries(ListTimeSeriesRequest request, CallSettings callSettings = null)

Lists time series that match a filter.

Parameters
Name Description
request ListTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListTimeSeriesResponseTimeSeries

A pageable sequence of TimeSeries resources.

Overrides

ListTimeSeriesAsync(ListTimeSeriesRequest, CallSettings)

public override PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeriesAsync(ListTimeSeriesRequest request, CallSettings callSettings = null)

Lists time series that match a filter.

Parameters
Name Description
request ListTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListTimeSeriesResponseTimeSeries

A pageable asynchronous sequence of TimeSeries resources.

Overrides