Google Cloud Logging v2 API - Class MetricsServiceV2.MetricsServiceV2Client (4.4.0)

public class MetricsServiceV2.MetricsServiceV2Client : ClientBase<MetricsServiceV2.MetricsServiceV2Client>

Reference documentation and code samples for the Google Cloud Logging v2 API class MetricsServiceV2.MetricsServiceV2Client.

Client for MetricsServiceV2

Inheritance

object > ClientBase > ClientBaseMetricsServiceV2MetricsServiceV2Client > MetricsServiceV2.MetricsServiceV2Client

Namespace

Google.Cloud.Logging.V2

Assembly

Google.Cloud.Logging.V2.dll

Constructors

MetricsServiceV2Client()

protected MetricsServiceV2Client()

Protected parameterless constructor to allow creation of test doubles.

MetricsServiceV2Client(CallInvoker)

public MetricsServiceV2Client(CallInvoker callInvoker)

Creates a new client for MetricsServiceV2 that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

MetricsServiceV2Client(ChannelBase)

public MetricsServiceV2Client(ChannelBase channel)

Creates a new client for MetricsServiceV2

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

MetricsServiceV2Client(ClientBaseConfiguration)

protected MetricsServiceV2Client(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateLogMetric(CreateLogMetricRequest, CallOptions)

public virtual LogMetric CreateLogMetric(CreateLogMetricRequest request, CallOptions options)

Creates a logs-based metric.

Parameters
Name Description
request CreateLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
LogMetric

The response received from the server.

CreateLogMetric(CreateLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual LogMetric CreateLogMetric(CreateLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a logs-based metric.

Parameters
Name Description
request CreateLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
LogMetric

The response received from the server.

CreateLogMetricAsync(CreateLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<LogMetric> CreateLogMetricAsync(CreateLogMetricRequest request, CallOptions options)

Creates a logs-based metric.

Parameters
Name Description
request CreateLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallLogMetric

The call object.

CreateLogMetricAsync(CreateLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<LogMetric> CreateLogMetricAsync(CreateLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a logs-based metric.

Parameters
Name Description
request CreateLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallLogMetric

The call object.

DeleteLogMetric(DeleteLogMetricRequest, CallOptions)

public virtual Empty DeleteLogMetric(DeleteLogMetricRequest request, CallOptions options)

Deletes a logs-based metric.

Parameters
Name Description
request DeleteLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteLogMetric(DeleteLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteLogMetric(DeleteLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a logs-based metric.

Parameters
Name Description
request DeleteLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteLogMetricAsync(DeleteLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteLogMetricAsync(DeleteLogMetricRequest request, CallOptions options)

Deletes a logs-based metric.

Parameters
Name Description
request DeleteLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteLogMetricAsync(DeleteLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteLogMetricAsync(DeleteLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a logs-based metric.

Parameters
Name Description
request DeleteLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

GetLogMetric(GetLogMetricRequest, CallOptions)

public virtual LogMetric GetLogMetric(GetLogMetricRequest request, CallOptions options)

Gets a logs-based metric.

Parameters
Name Description
request GetLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
LogMetric

The response received from the server.

GetLogMetric(GetLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual LogMetric GetLogMetric(GetLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a logs-based metric.

Parameters
Name Description
request GetLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
LogMetric

The response received from the server.

GetLogMetricAsync(GetLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<LogMetric> GetLogMetricAsync(GetLogMetricRequest request, CallOptions options)

Gets a logs-based metric.

Parameters
Name Description
request GetLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallLogMetric

The call object.

GetLogMetricAsync(GetLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<LogMetric> GetLogMetricAsync(GetLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a logs-based metric.

Parameters
Name Description
request GetLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallLogMetric

The call object.

ListLogMetrics(ListLogMetricsRequest, CallOptions)

public virtual ListLogMetricsResponse ListLogMetrics(ListLogMetricsRequest request, CallOptions options)

Lists logs-based metrics.

Parameters
Name Description
request ListLogMetricsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListLogMetricsResponse

The response received from the server.

ListLogMetrics(ListLogMetricsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListLogMetricsResponse ListLogMetrics(ListLogMetricsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists logs-based metrics.

Parameters
Name Description
request ListLogMetricsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListLogMetricsResponse

The response received from the server.

ListLogMetricsAsync(ListLogMetricsRequest, CallOptions)

public virtual AsyncUnaryCall<ListLogMetricsResponse> ListLogMetricsAsync(ListLogMetricsRequest request, CallOptions options)

Lists logs-based metrics.

Parameters
Name Description
request ListLogMetricsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListLogMetricsResponse

The call object.

ListLogMetricsAsync(ListLogMetricsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListLogMetricsResponse> ListLogMetricsAsync(ListLogMetricsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists logs-based metrics.

Parameters
Name Description
request ListLogMetricsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListLogMetricsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override MetricsServiceV2.MetricsServiceV2Client NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
MetricsServiceV2MetricsServiceV2Client
Overrides

UpdateLogMetric(UpdateLogMetricRequest, CallOptions)

public virtual LogMetric UpdateLogMetric(UpdateLogMetricRequest request, CallOptions options)

Creates or updates a logs-based metric.

Parameters
Name Description
request UpdateLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
LogMetric

The response received from the server.

UpdateLogMetric(UpdateLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual LogMetric UpdateLogMetric(UpdateLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates or updates a logs-based metric.

Parameters
Name Description
request UpdateLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
LogMetric

The response received from the server.

UpdateLogMetricAsync(UpdateLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<LogMetric> UpdateLogMetricAsync(UpdateLogMetricRequest request, CallOptions options)

Creates or updates a logs-based metric.

Parameters
Name Description
request UpdateLogMetricRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallLogMetric

The call object.

UpdateLogMetricAsync(UpdateLogMetricRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<LogMetric> UpdateLogMetricAsync(UpdateLogMetricRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates or updates a logs-based metric.

Parameters
Name Description
request UpdateLogMetricRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallLogMetric

The call object.