Google Cloud Logging v2 API - Class LoggingServiceV2.LoggingServiceV2Client (4.1.0)

public class LoggingServiceV2.LoggingServiceV2Client : ClientBase<LoggingServiceV2.LoggingServiceV2Client>

Reference documentation and code samples for the Google Cloud Logging v2 API class LoggingServiceV2.LoggingServiceV2Client.

Client for LoggingServiceV2

Inheritance

object > ClientBase > ClientBaseLoggingServiceV2LoggingServiceV2Client > LoggingServiceV2.LoggingServiceV2Client

Namespace

Google.Cloud.Logging.V2

Assembly

Google.Cloud.Logging.V2.dll

Constructors

LoggingServiceV2Client()

protected LoggingServiceV2Client()

Protected parameterless constructor to allow creation of test doubles.

LoggingServiceV2Client(CallInvoker)

public LoggingServiceV2Client(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

LoggingServiceV2Client(ChannelBase)

public LoggingServiceV2Client(ChannelBase channel)

Creates a new client for LoggingServiceV2

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

LoggingServiceV2Client(ClientBaseConfiguration)

protected LoggingServiceV2Client(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

DeleteLog(DeleteLogRequest, CallOptions)

public virtual Empty DeleteLog(DeleteLogRequest request, CallOptions options)

Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.

Parameters
NameDescription
requestDeleteLogRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteLog(DeleteLogRequest, Metadata, DateTime?, CancellationToken)

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

Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.

Parameters
NameDescription
requestDeleteLogRequest

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.

DeleteLogAsync(DeleteLogRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteLogAsync(DeleteLogRequest request, CallOptions options)

Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.

Parameters
NameDescription
requestDeleteLogRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteLogAsync(DeleteLogRequest, Metadata, DateTime?, CancellationToken)

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

Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.

Parameters
NameDescription
requestDeleteLogRequest

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.

ListLogEntries(ListLogEntriesRequest, CallOptions)

public virtual ListLogEntriesResponse ListLogEntries(ListLogEntriesRequest request, CallOptions options)

Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.

Parameters
NameDescription
requestListLogEntriesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListLogEntriesResponse

The response received from the server.

ListLogEntries(ListLogEntriesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListLogEntriesResponse ListLogEntries(ListLogEntriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.

Parameters
NameDescription
requestListLogEntriesRequest

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
ListLogEntriesResponse

The response received from the server.

ListLogEntriesAsync(ListLogEntriesRequest, CallOptions)

public virtual AsyncUnaryCall<ListLogEntriesResponse> ListLogEntriesAsync(ListLogEntriesRequest request, CallOptions options)

Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.

Parameters
NameDescription
requestListLogEntriesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListLogEntriesResponse

The call object.

ListLogEntriesAsync(ListLogEntriesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListLogEntriesResponse> ListLogEntriesAsync(ListLogEntriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.

Parameters
NameDescription
requestListLogEntriesRequest

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
AsyncUnaryCallListLogEntriesResponse

The call object.

ListLogs(ListLogsRequest, CallOptions)

public virtual ListLogsResponse ListLogs(ListLogsRequest request, CallOptions options)

Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.

Parameters
NameDescription
requestListLogsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListLogsResponse

The response received from the server.

ListLogs(ListLogsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListLogsResponse ListLogs(ListLogsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.

Parameters
NameDescription
requestListLogsRequest

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
ListLogsResponse

The response received from the server.

ListLogsAsync(ListLogsRequest, CallOptions)

public virtual AsyncUnaryCall<ListLogsResponse> ListLogsAsync(ListLogsRequest request, CallOptions options)

Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.

Parameters
NameDescription
requestListLogsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListLogsResponse

The call object.

ListLogsAsync(ListLogsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListLogsResponse> ListLogsAsync(ListLogsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.

Parameters
NameDescription
requestListLogsRequest

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
AsyncUnaryCallListLogsResponse

The call object.

ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest, CallOptions)

public virtual ListMonitoredResourceDescriptorsResponse ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest request, CallOptions options)

Lists the descriptors for monitored resource types used by Logging.

Parameters
NameDescription
requestListMonitoredResourceDescriptorsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListMonitoredResourceDescriptorsResponse

The response received from the server.

ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListMonitoredResourceDescriptorsResponse ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the descriptors for monitored resource types used by Logging.

Parameters
NameDescription
requestListMonitoredResourceDescriptorsRequest

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
ListMonitoredResourceDescriptorsResponse

The response received from the server.

ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest, CallOptions)

public virtual AsyncUnaryCall<ListMonitoredResourceDescriptorsResponse> ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest request, CallOptions options)

Lists the descriptors for monitored resource types used by Logging.

Parameters
NameDescription
requestListMonitoredResourceDescriptorsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListMonitoredResourceDescriptorsResponse

The call object.

ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListMonitoredResourceDescriptorsResponse> ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the descriptors for monitored resource types used by Logging.

Parameters
NameDescription
requestListMonitoredResourceDescriptorsRequest

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
AsyncUnaryCallListMonitoredResourceDescriptorsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override LoggingServiceV2.LoggingServiceV2Client NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
LoggingServiceV2LoggingServiceV2Client
Overrides

TailLogEntries(CallOptions)

public virtual AsyncDuplexStreamingCall<TailLogEntriesRequest, TailLogEntriesResponse> TailLogEntries(CallOptions options)

Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.

Parameter
NameDescription
optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncDuplexStreamingCallTailLogEntriesRequestTailLogEntriesResponse

The call object.

TailLogEntries(Metadata, DateTime?, CancellationToken)

public virtual AsyncDuplexStreamingCall<TailLogEntriesRequest, TailLogEntriesResponse> TailLogEntries(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.

Parameters
NameDescription
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
AsyncDuplexStreamingCallTailLogEntriesRequestTailLogEntriesResponse

The call object.

WriteLogEntries(WriteLogEntriesRequest, CallOptions)

public virtual WriteLogEntriesResponse WriteLogEntries(WriteLogEntriesRequest request, CallOptions options)

Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)

Parameters
NameDescription
requestWriteLogEntriesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
WriteLogEntriesResponse

The response received from the server.

WriteLogEntries(WriteLogEntriesRequest, Metadata, DateTime?, CancellationToken)

public virtual WriteLogEntriesResponse WriteLogEntries(WriteLogEntriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)

Parameters
NameDescription
requestWriteLogEntriesRequest

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
WriteLogEntriesResponse

The response received from the server.

WriteLogEntriesAsync(WriteLogEntriesRequest, CallOptions)

public virtual AsyncUnaryCall<WriteLogEntriesResponse> WriteLogEntriesAsync(WriteLogEntriesRequest request, CallOptions options)

Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)

Parameters
NameDescription
requestWriteLogEntriesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallWriteLogEntriesResponse

The call object.

WriteLogEntriesAsync(WriteLogEntriesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<WriteLogEntriesResponse> WriteLogEntriesAsync(WriteLogEntriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)

Parameters
NameDescription
requestWriteLogEntriesRequest

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
AsyncUnaryCallWriteLogEntriesResponse

The call object.