public class SinkInfo extends Object implements Serializable
Sink destination can either be a Google Cloud Storage bucket (see SinkInfo.Destination.BucketDestination, a Google Cloud BigQuery dataset (see SinkInfo.Destination.DatasetDestination) or a Google Cloud Pub/Sub topic (see SinkInfo.Destination.TopicDestination).
| Modifier and Type | Class and Description |
|---|---|
static class |
SinkInfo.Builder
A builder for
SinkInfo objects. |
static class |
SinkInfo.Destination |
static class |
SinkInfo.VersionFormat
Available log entry formats.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
<T extends SinkInfo.Destination> |
getDestination()
Returns the export destination.
|
String |
getFilter()
Returns an advanced logs filter.
|
String |
getName()
Returns the name of the sink.
|
SinkInfo.VersionFormat |
getVersionFormat()
Returns the log entry version to use for this sink's exported log entries.
|
int |
hashCode() |
static SinkInfo.Builder |
newBuilder(String name,
SinkInfo.Destination destination)
Returns a builder for
SinkInfo objects given the name of the sink and its destination. |
static SinkInfo |
of(String name,
SinkInfo.Destination destination)
Creates a
SinkInfo object given the name of the sink and its destination. |
SinkInfo.Builder |
toBuilder()
Returns a builder for this
SinkInfo object. |
String |
toString() |
public String getName()
my-severe-errors-to-pubsub. Sink identifiers are
limited to 1000 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-..public <T extends SinkInfo.Destination> T getDestination()
SinkInfo.Destination.BucketDestination for
sinks that export logs to Google Cloud Storage buckets. Returns SinkInfo.Destination.DatasetDestination for sinks that export logs to Google Cloud BigQuery datasets.
Returns SinkInfo.Destination.TopicDestination for sinks that export logs to Google Cloud Pub/Sub
topics.public String getFilter()
getVersionFormat(),
regardless of the format of the log entry that wa originally written to Stackdriver Logging.
Example (V2 format): logName=projects/my-projectid/logs/syslog AND severity>=ERROR.public SinkInfo.VersionFormat getVersionFormat()
public SinkInfo.Builder toBuilder()
SinkInfo object.public static SinkInfo.Builder newBuilder(String name, SinkInfo.Destination destination)
SinkInfo objects given the name of the sink and its destination.public static SinkInfo of(String name, SinkInfo.Destination destination)
SinkInfo object given the name of the sink and its destination.Copyright © 2019 Google LLC. All rights reserved.