Google Cloud Logging v2 API - Class MetricsServiceV2.MetricsServiceV2Client (4.2.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

MetricsServiceV2Client(ChannelBase)

public MetricsServiceV2Client(ChannelBase channel)

Creates a new client for MetricsServiceV2

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

MetricsServiceV2Client(ClientBaseConfiguration)

protected MetricsServiceV2Client(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateLogMetric(CreateLogMetricRequest, CallOptions)

public virtual LogMetric CreateLogMetric(CreateLogMetricRequest request, CallOptions options)

Creates a logs-based metric.

Parameters
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallLogMetric

The call object.

DeleteLogMetric(DeleteLogMetricRequest, CallOptions)

public virtual Empty DeleteLogMetric(DeleteLogMetricRequest request, CallOptions options)

Deletes a logs-based metric.

Parameters
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

GetLogMetric(GetLogMetricRequest, CallOptions)

public virtual LogMetric GetLogMetric(GetLogMetricRequest request, CallOptions options)

Gets a logs-based metric.

Parameters
NameDescription
requestGetLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallLogMetric

The call object.

ListLogMetrics(ListLogMetricsRequest, CallOptions)

public virtual ListLogMetricsResponse ListLogMetrics(ListLogMetricsRequest request, CallOptions options)

Lists logs-based metrics.

Parameters
NameDescription
requestListLogMetricsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListLogMetricsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListLogMetricsResponse

The response received from the server.

ListLogMetricsAsync(ListLogMetricsRequest, CallOptions)

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

Lists logs-based metrics.

Parameters
NameDescription
requestListLogMetricsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListLogMetricsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListLogMetricsResponse

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
MetricsServiceV2MetricsServiceV2Client
Overrides

UpdateLogMetric(UpdateLogMetricRequest, CallOptions)

public virtual LogMetric UpdateLogMetric(UpdateLogMetricRequest request, CallOptions options)

Creates or updates a logs-based metric.

Parameters
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallLogMetric

The call object.