public static final class Sink.Builder extends SinkInfo.Builder
Sink
objects.Modifier and Type | Method and Description |
---|---|
Sink |
build()
Creates a
SinkInfo object for this builder. |
Sink.Builder |
setDestination(SinkInfo.Destination destination)
Sets the export destination.
|
Sink.Builder |
setFilter(String filter)
Sets an advanced logs filter.
|
Sink.Builder |
setName(String name)
Sets the name of the sink.
|
Sink.Builder |
setVersionFormat(SinkInfo.VersionFormat versionFormat)
Sets the log entry version to use for this sink's exported log entries.
|
public Sink.Builder setName(String name)
SinkInfo.Builder
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 _-.
.setName
in class SinkInfo.Builder
public Sink.Builder setDestination(SinkInfo.Destination destination)
SinkInfo.Builder
SinkInfo.Destination.BucketDestination
object to create a
sink that exports logs to a Google Cloud Storage bucket. Use a SinkInfo.Destination.DatasetDestination
object to create a sink that exports logs to a Google Cloud
BigQuery dataset. Use a SinkInfo.Destination.TopicDestination
object to create a sink that
exports logs to a Google Cloud Pub/Sub topic.setDestination
in class SinkInfo.Builder
public Sink.Builder setFilter(String filter)
SinkInfo.Builder
#setVersionFormat(VersionFormat)
, regardless of the format of the log entry that was
originally written to Stackdriver Logging. Example (V2 format): logName=projects/my-projectid/logs/syslog AND severity>=ERROR
.setFilter
in class SinkInfo.Builder
public Sink.Builder setVersionFormat(SinkInfo.VersionFormat versionFormat)
SinkInfo.Builder
setVersionFormat
in class SinkInfo.Builder
public Sink build()
SinkInfo.Builder
SinkInfo
object for this builder.build
in class SinkInfo.Builder
Copyright © 2019 Google LLC. All rights reserved.