Class GrpcLoggingRpc (3.15.17)

public class GrpcLoggingRpc implements LoggingRpc

Inheritance

java.lang.Object > GrpcLoggingRpc

Implements

LoggingRpc

Constructors

GrpcLoggingRpc(LoggingOptions options)

public GrpcLoggingRpc(LoggingOptions options)
Parameter
NameDescription
optionsLoggingOptions

Methods

close()

public void close()
Exceptions
TypeDescription
Exception

create(CreateExclusionRequest request)

public ApiFuture<LogExclusion> create(CreateExclusionRequest request)

Sends a request to create a new exclusion in a specified parent resource. This method returns an ApiFuture object to consume the result. ApiFuture#get() returns the created exclusion.

Parameter
NameDescription
requestCreateExclusionRequest
Returns
TypeDescription
ApiFuture<LogExclusion>

create(CreateLogMetricRequest request)

public ApiFuture<LogMetric> create(CreateLogMetricRequest request)

Sends a request to create a log metric. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns the created metric.

Parameter
NameDescription
requestCreateLogMetricRequest
Returns
TypeDescription
ApiFuture<LogMetric>

create(CreateSinkRequest request)

public ApiFuture<LogSink> create(CreateSinkRequest request)

Sends a request to create a sink. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns the created sink.

Parameter
NameDescription
requestCreateSinkRequest
Returns
TypeDescription
ApiFuture<LogSink>

delete(DeleteExclusionRequest request)

public ApiFuture<Empty> delete(DeleteExclusionRequest request)

Sends a request to delete an exclusion. This method returns an ApiFuture object to consume the result. ApiFuture#get() returns Empty#getDefaultInstance() or null if the log exclusion was not found.

Parameter
NameDescription
requestDeleteExclusionRequest
Returns
TypeDescription
ApiFuture<Empty>

delete(DeleteLogMetricRequest request)

public ApiFuture<Empty> delete(DeleteLogMetricRequest request)

Sends a request to delete a log metric. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns Empty#getDefaultInstance() or null if the log was not found.

Parameter
NameDescription
requestDeleteLogMetricRequest
Returns
TypeDescription
ApiFuture<Empty>

delete(DeleteLogRequest request)

public ApiFuture<Empty> delete(DeleteLogRequest request)

Sends a request to deletes a log. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns Empty#getDefaultInstance() or null if the log was not found. The deleted log will reappear if it receives new log entries.

Parameter
NameDescription
requestDeleteLogRequest
Returns
TypeDescription
ApiFuture<Empty>

delete(DeleteSinkRequest request)

public ApiFuture<Empty> delete(DeleteSinkRequest request)

Sends a request to delete a sink. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns Empty#getDefaultInstance() or null if the sink was not found.

Parameter
NameDescription
requestDeleteSinkRequest
Returns
TypeDescription
ApiFuture<Empty>

get(GetExclusionRequest request)

public ApiFuture<LogExclusion> get(GetExclusionRequest request)

Sends a request to get the description of an exclusion. This method returns an ApiFuture object to consume the result. ApiFuture#get() returns the requested exclusion or null if not found.

Parameter
NameDescription
requestGetExclusionRequest
Returns
TypeDescription
ApiFuture<LogExclusion>

get(GetLogMetricRequest request)

public ApiFuture<LogMetric> get(GetLogMetricRequest request)

Sends a request to get a log metric. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns the requested log metric or null if not found.

Parameter
NameDescription
requestGetLogMetricRequest
Returns
TypeDescription
ApiFuture<LogMetric>

get(GetSinkRequest request)

public ApiFuture<LogSink> get(GetSinkRequest request)

Sends a request to get a sink. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns the requested sink or null if not found.

Parameter
NameDescription
requestGetSinkRequest
Returns
TypeDescription
ApiFuture<LogSink>

getTailLogEntriesStream()

public BidiStream<TailLogEntriesRequest,TailLogEntriesResponse> getTailLogEntriesStream()

This method returns a {code BidiStream} object to consume the stream of log entries.

Returns
TypeDescription
BidiStream<TailLogEntriesRequest,TailLogEntriesResponse>

list(ListExclusionsRequest request)

public ApiFuture<ListExclusionsResponse> list(ListExclusionsRequest request)

Sends a request to list all the exclusions in parent resource. Use this method to retrieve exclusions from Cloud Logging. This method returns an ApiFuture object to consume the result. ApiFuture#get() returns a response object containing the listing result.

Parameter
NameDescription
requestListExclusionsRequest
Returns
TypeDescription
ApiFuture<ListExclusionsResponse>

list(ListLogEntriesRequest request)

public ApiFuture<ListLogEntriesResponse> list(ListLogEntriesRequest request)

Sends a request to list log entries. Use this method to retrieve log entries from Cloud Logging. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns a response object containing the listing result.

Parameter
NameDescription
requestListLogEntriesRequest
Returns
TypeDescription
ApiFuture<ListLogEntriesResponse>

list(ListLogMetricsRequest request)

public ApiFuture<ListLogMetricsResponse> list(ListLogMetricsRequest request)

Sends a request to list the log metrics in a project. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns a response object containing the listing result.

Parameter
NameDescription
requestListLogMetricsRequest
Returns
TypeDescription
ApiFuture<ListLogMetricsResponse>

list(ListMonitoredResourceDescriptorsRequest request)

public ApiFuture<ListMonitoredResourceDescriptorsResponse> list(ListMonitoredResourceDescriptorsRequest request)

Sends a request to list monitored resource descriptors. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns a response object containing the listing result.

Parameter
NameDescription
requestListMonitoredResourceDescriptorsRequest
Returns
TypeDescription
ApiFuture<ListMonitoredResourceDescriptorsResponse>

list(ListSinksRequest request)

public ApiFuture<ListSinksResponse> list(ListSinksRequest request)

Sends a request to list the sinks in a project. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns a response object containing the listing result.

Parameter
NameDescription
requestListSinksRequest
Returns
TypeDescription
ApiFuture<ListSinksResponse>

listLogs(ListLogsRequest request)

public ApiFuture<ListLogsResponse> listLogs(ListLogsRequest request)

Sends a request to list the log names in a project. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns a response object containing the listing result.

Parameter
NameDescription
requestListLogsRequest
Returns
TypeDescription
ApiFuture<ListLogsResponse>

update(UpdateExclusionRequest request)

public ApiFuture<LogExclusion> update(UpdateExclusionRequest request)

Sends a request to change one or more properties of an existing exclusion. This method returns an ApiFuture object to consume the result. ApiFuture#get() returns the updated exclusion.

Parameter
NameDescription
requestUpdateExclusionRequest
Returns
TypeDescription
ApiFuture<LogExclusion>

update(UpdateLogMetricRequest request)

public ApiFuture<LogMetric> update(UpdateLogMetricRequest request)

Sends a request to update a log metric. If the log metric does not exist, it is created. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns the updated or created log metric.

Parameter
NameDescription
requestUpdateLogMetricRequest
Returns
TypeDescription
ApiFuture<LogMetric>

update(UpdateSinkRequest request)

public ApiFuture<LogSink> update(UpdateSinkRequest request)

Sends a request to update a sink. If the sink does not exist, it is created. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns the updated or created sink.

Parameter
NameDescription
requestUpdateSinkRequest
Returns
TypeDescription
ApiFuture<LogSink>

write(WriteLogEntriesRequest request)

public ApiFuture<WriteLogEntriesResponse> write(WriteLogEntriesRequest request)

Sends a request to write log entries to Cloud Logging. This method returns a ApiFuture object to consume the result. ApiFuture#get() returns a response object for the write operation.

Parameter
NameDescription
requestWriteLogEntriesRequest
Returns
TypeDescription
ApiFuture<WriteLogEntriesResponse>