Class: Google::Apis::LoggingV2beta1::LogSink
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2beta1::LogSink
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/logging_v2beta1/classes.rb,
generated/google/apis/logging_v2beta1/representations.rb,
generated/google/apis/logging_v2beta1/representations.rb
Overview
Describes a sink used to export log entries outside of Stackdriver Logging.
Instance Attribute Summary collapse
-
#destination ⇒ String
Required.
-
#end_time ⇒ String
Optional.
-
#filter ⇒ String
Optional.
-
#name ⇒ String
Required.
-
#output_version_format ⇒ String
Optional.
-
#start_time ⇒ String
Optional.
-
#writer_identity ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LogSink
constructor
A new instance of LogSink.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ LogSink
Returns a new instance of LogSink.
184 185 186 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 184 def initialize(**args) update!(**args) end |
Instance Attribute Details
#destination ⇒ String
Required. The export destination. See
Exporting Logs With Sinks.
Examples:
"storage.googleapis.com/my-gcs-bucket"
"bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
"pubsub.googleapis.com/projects/my-project/topics/my-topic"
Corresponds to the JSON property destination
128 129 130 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 128 def destination @destination end |
#end_time ⇒ String
Optional. Time at which this sink expires.
Corresponds to the JSON property endTime
144 145 146 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 144 def end_time @end_time end |
#filter ⇒ String
Optional. An advanced logs filter.
Only log entries matching the filter are exported. The filter
must be consistent with the log entry format specified by the
outputVersionFormat
parameter, regardless of the format of the
log entry that was originally written to Stackdriver Logging.
Example filter (V2 format):
logName=projects/my-projectid/logs/syslog AND severity>=ERROR
Corresponds to the JSON property filter
139 140 141 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 139 def filter @filter end |
#name ⇒ String
Required. The client-assigned sink identifier, unique within the
project. Example: "my-syslog-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 _-.
. The maximum length
of the name is 100 characters.
Corresponds to the JSON property name
153 154 155 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 153 def name @name end |
#output_version_format ⇒ String
Optional. The log entry version to use for this sink's exported log
entries. This version does not have to correspond to the version of the
log entry that was written to Stackdriver Logging. If omitted, the
v2 format is used.
Corresponds to the JSON property outputVersionFormat
169 170 171 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 169 def output_version_format @output_version_format end |
#start_time ⇒ String
Optional. Time range for which this sink is active.
Logs are exported only if start_time <= entry.timestamp < end_time
Both start_time and end_time may be omitted to specify
(half) infinite ranges. The start_time must be less than the end_time.
Corresponds to the JSON property startTime
161 162 163 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 161 def start_time @start_time end |
#writer_identity ⇒ String
Output only. The IAM identity to which the destination needs to grant write
access. This may be a service account or a group.
Examples (Do not assume these specific values):
"serviceAccount:[email protected]"
"group:[email protected]"
For GCS destinations, the role "roles/owner" is required on the bucket
For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
required on the topic
For BigQuery, the role "roles/editor" is required on the dataset
Corresponds to the JSON property writerIdentity
182 183 184 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 182 def writer_identity @writer_identity end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
189 190 191 192 193 194 195 196 197 |
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 189 def update!(**args) @destination = args[:destination] if args.key?(:destination) @filter = args[:filter] if args.key?(:filter) @end_time = args[:end_time] if args.key?(:end_time) @name = args[:name] if args.key?(:name) @start_time = args[:start_time] if args.key?(:start_time) @output_version_format = args[:output_version_format] if args.key?(:output_version_format) @writer_identity = args[:writer_identity] if args.key?(:writer_identity) end |