public class GrpcLoggingRpc extends Object implements LoggingRpc
Constructor and Description |
---|
GrpcLoggingRpc(LoggingOptions options) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
com.google.api.core.ApiFuture<LogExclusion> |
create(CreateExclusionRequest request)
Sends a request to create a new exclusion in a specified parent resource.
|
com.google.api.core.ApiFuture<LogMetric> |
create(CreateLogMetricRequest request)
Sends a request to create a log metric.
|
com.google.api.core.ApiFuture<LogSink> |
create(CreateSinkRequest request)
Sends a request to create a sink.
|
com.google.api.core.ApiFuture<com.google.protobuf.Empty> |
delete(DeleteExclusionRequest request)
Sends a request to delete an exclusion.
|
com.google.api.core.ApiFuture<com.google.protobuf.Empty> |
delete(DeleteLogMetricRequest request)
Sends a request to delete a log metric.
|
com.google.api.core.ApiFuture<com.google.protobuf.Empty> |
delete(DeleteLogRequest request)
Sends a request to deletes a log.
|
com.google.api.core.ApiFuture<com.google.protobuf.Empty> |
delete(DeleteSinkRequest request)
Sends a request to delete a sink.
|
com.google.api.core.ApiFuture<LogExclusion> |
get(GetExclusionRequest request)
Sends a request to get the description of an exclusion.
|
com.google.api.core.ApiFuture<LogMetric> |
get(GetLogMetricRequest request)
Sends a request to get a log metric.
|
com.google.api.core.ApiFuture<LogSink> |
get(GetSinkRequest request)
Sends a request to get a sink.
|
com.google.api.gax.rpc.BidiStream<TailLogEntriesRequest,TailLogEntriesResponse> |
getTailLogEntriesStream()
This method returns a {code BidiStream} object to consume the stream of log entries.
|
com.google.api.core.ApiFuture<ListExclusionsResponse> |
list(ListExclusionsRequest request)
Sends a request to list all the exclusions in parent resource.
|
com.google.api.core.ApiFuture<ListLogEntriesResponse> |
list(ListLogEntriesRequest request)
Sends a request to list log entries.
|
com.google.api.core.ApiFuture<ListLogMetricsResponse> |
list(ListLogMetricsRequest request)
Sends a request to list the log metrics in a project.
|
com.google.api.core.ApiFuture<ListMonitoredResourceDescriptorsResponse> |
list(ListMonitoredResourceDescriptorsRequest request)
Sends a request to list monitored resource descriptors.
|
com.google.api.core.ApiFuture<ListSinksResponse> |
list(ListSinksRequest request)
Sends a request to list the sinks in a project.
|
com.google.api.core.ApiFuture<ListLogsResponse> |
listLogs(ListLogsRequest request)
Sends a request to list the log names in a project.
|
com.google.api.core.ApiFuture<LogExclusion> |
update(UpdateExclusionRequest request)
Sends a request to change one or more properties of an existing exclusion.
|
com.google.api.core.ApiFuture<LogMetric> |
update(UpdateLogMetricRequest request)
Sends a request to update a log metric.
|
com.google.api.core.ApiFuture<LogSink> |
update(UpdateSinkRequest request)
Sends a request to update a sink.
|
com.google.api.core.ApiFuture<WriteLogEntriesResponse> |
write(WriteLogEntriesRequest request)
Sends a request to write log entries to Cloud Logging.
|
public GrpcLoggingRpc(LoggingOptions options) throws IOException
IOException
public com.google.api.core.ApiFuture<LogSink> create(CreateSinkRequest request)
LoggingRpc
ApiFuture
object to consume the
result. Future.get()
returns the created sink.create
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogSink> update(UpdateSinkRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns the
updated or created sink.update
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogSink> get(GetSinkRequest request)
LoggingRpc
ApiFuture
object to consume the
result. Future.get()
returns the requested sink or null
if not found.get
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<ListSinksResponse> list(ListSinksRequest request)
LoggingRpc
ApiFuture
object
to consume the result. Future.get()
returns a response object containing the listing
result.list
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<com.google.protobuf.Empty> delete(DeleteSinkRequest request)
LoggingRpc
ApiFuture
object to consume the
result. Future.get()
returns Empty.getDefaultInstance()
or null
if
the sink was not found.delete
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogExclusion> create(CreateExclusionRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns the created
exclusion.create
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogExclusion> get(GetExclusionRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns the requested
exclusion or null
if not found.get
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogExclusion> update(UpdateExclusionRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns the updated
exclusion.update
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<ListExclusionsResponse> list(ListExclusionsRequest request)
LoggingRpc
ApiFuture
object to consume the
result. Future.get()
returns a response object containing the listing result.list
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<com.google.protobuf.Empty> delete(DeleteExclusionRequest request)
LoggingRpc
ApiFuture
object to
consume the result. Future.get()
returns Empty.getDefaultInstance()
or
null
if the log exclusion was not found.delete
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<ListLogsResponse> listLogs(ListLogsRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns a response object containing the
listing result.listLogs
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<com.google.protobuf.Empty> delete(DeleteLogRequest request)
LoggingRpc
ApiFuture
object to consume the
result. Future.get()
returns Empty.getDefaultInstance()
or null
if
the log was not found. The deleted log will reappear if it receives new log entries.delete
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<WriteLogEntriesResponse> write(WriteLogEntriesRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns a response object for the write
operation.write
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<ListLogEntriesResponse> list(ListLogEntriesRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns a response object containing the listing result.list
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.gax.rpc.BidiStream<TailLogEntriesRequest,TailLogEntriesResponse> getTailLogEntriesStream()
LoggingRpc
getTailLogEntriesStream
in interface LoggingRpc
public com.google.api.core.ApiFuture<ListMonitoredResourceDescriptorsResponse> list(ListMonitoredResourceDescriptorsRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns a response object containing the
listing result.list
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogMetric> create(CreateLogMetricRequest request)
LoggingRpc
ApiFuture
object to
consume the result. Future.get()
returns the created metric.create
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogMetric> update(UpdateLogMetricRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns the updated or created log metric.update
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<LogMetric> get(GetLogMetricRequest request)
LoggingRpc
ApiFuture
object to consume
the result. Future.get()
returns the requested log metric or null
if not
found.get
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<ListLogMetricsResponse> list(ListLogMetricsRequest request)
LoggingRpc
ApiFuture
object to consume the result. Future.get()
returns a response object containing the
listing result.list
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic com.google.api.core.ApiFuture<com.google.protobuf.Empty> delete(DeleteLogMetricRequest request)
LoggingRpc
ApiFuture
object to
consume the result. Future.get()
returns Empty.getDefaultInstance()
or
null
if the log was not found.delete
in interface LoggingRpc
request
- the request object containing all of the parameters for the API callpublic void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2023 Google LLC. All rights reserved.