Interface LoggingRpc (3.17.0)

public interface LoggingRpc extends AutoCloseable, ServiceRpc

Implements

AutoCloseable, com.google.cloud.ServiceRpc

Methods

create(CreateExclusionRequest request)

public abstract 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
Name Description
request CreateExclusionRequest

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

Returns
Type Description
ApiFuture<LogExclusion>

create(CreateLogMetricRequest request)

public abstract 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
Name Description
request CreateLogMetricRequest

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

Returns
Type Description
ApiFuture<LogMetric>

create(CreateSinkRequest request)

public abstract 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
Name Description
request CreateSinkRequest

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

Returns
Type Description
ApiFuture<LogSink>

delete(DeleteExclusionRequest request)

public abstract 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
Name Description
request DeleteExclusionRequest

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

Returns
Type Description
ApiFuture<Empty>

delete(DeleteLogMetricRequest request)

public abstract 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
Name Description
request DeleteLogMetricRequest

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

Returns
Type Description
ApiFuture<Empty>

delete(DeleteLogRequest request)

public abstract 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
Name Description
request DeleteLogRequest

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

Returns
Type Description
ApiFuture<Empty>

delete(DeleteSinkRequest request)

public abstract 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
Name Description
request DeleteSinkRequest

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

Returns
Type Description
ApiFuture<Empty>

get(GetExclusionRequest request)

public abstract 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
Name Description
request GetExclusionRequest

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

Returns
Type Description
ApiFuture<LogExclusion>

get(GetLogMetricRequest request)

public abstract 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
Name Description
request GetLogMetricRequest

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

Returns
Type Description
ApiFuture<LogMetric>

get(GetSinkRequest request)

public abstract 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
Name Description
request GetSinkRequest

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

Returns
Type Description
ApiFuture<LogSink>

getTailLogEntriesStream()

public default BidiStream<TailLogEntriesRequest,TailLogEntriesResponse> getTailLogEntriesStream()

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

Returns
Type Description
BidiStream<TailLogEntriesRequest,TailLogEntriesResponse>

list(ListExclusionsRequest request)

public abstract 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
Name Description
request ListExclusionsRequest

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

Returns
Type Description
ApiFuture<ListExclusionsResponse>

list(ListLogEntriesRequest request)

public abstract 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
Name Description
request ListLogEntriesRequest

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

Returns
Type Description
ApiFuture<ListLogEntriesResponse>

list(ListLogMetricsRequest request)

public abstract 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
Name Description
request ListLogMetricsRequest

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

Returns
Type Description
ApiFuture<ListLogMetricsResponse>

list(ListMonitoredResourceDescriptorsRequest request)

public abstract 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
Name Description
request ListMonitoredResourceDescriptorsRequest

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

Returns
Type Description
ApiFuture<ListMonitoredResourceDescriptorsResponse>

list(ListSinksRequest request)

public abstract 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
Name Description
request ListSinksRequest

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

Returns
Type Description
ApiFuture<ListSinksResponse>

listLogs(ListLogsRequest request)

public default 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
Name Description
request ListLogsRequest

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

Returns
Type Description
ApiFuture<ListLogsResponse>

update(UpdateExclusionRequest request)

public abstract 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
Name Description
request UpdateExclusionRequest

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

Returns
Type Description
ApiFuture<LogExclusion>

update(UpdateLogMetricRequest request)

public abstract 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
Name Description
request UpdateLogMetricRequest

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

Returns
Type Description
ApiFuture<LogMetric>

update(UpdateSinkRequest request)

public abstract 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
Name Description
request UpdateSinkRequest

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

Returns
Type Description
ApiFuture<LogSink>

write(WriteLogEntriesRequest request)

public abstract 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
Name Description
request WriteLogEntriesRequest

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

Returns
Type Description
ApiFuture<WriteLogEntriesResponse>