# Interface LoggingRpc (3.34.0)

3.34.0 (latest) 3.32.0 3.29.0 3.28.0 3.26.0 3.24.0 3.23.10 3.22.6 3.21.4 3.20.7 3.19.0 3.18.0 3.17.2 3.16.2 3.15.17 3.14.9 3.13.7 3.12.1 3.11.10 3.10.7 3.9.0 3.8.0 3.7.6 3.6.4 3.5.3

    public interface LoggingRpc extends AutoCloseable, ServiceRpc

## Implements

[AutoCloseable](https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html), 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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.CreateExclusionRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.CreateLogMetricRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.CreateSinkRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html#com_google_protobuf_Empty_getDefaultInstance_) or
`null` if the log exclusion was not found.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.DeleteExclusionRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### 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()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html#com_google_protobuf_Empty_getDefaultInstance_) or
`null` if the log was not found.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.DeleteLogMetricRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### 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()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html#com_google_protobuf_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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.DeleteLogRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### 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()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html#com_google_protobuf_Empty_getDefaultInstance_) or `null` if
the sink was not found.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.DeleteSinkRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### 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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.GetExclusionRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.GetLogMetricRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.GetSinkRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.BidiStream.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.TailLogEntriesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListExclusionsRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListLogEntriesRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListLogMetricsRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListMonitoredResourceDescriptorsRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListSinksRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListLogsRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.UpdateExclusionRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.UpdateLogMetricRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.UpdateSinkRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.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` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest` the request object containing all of the parameters for the API call |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/api-common/latest/com.google.api.core.ApiFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesResponse>` |   |