Class: Google::Apis::LoggingV2beta1::LogSink

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

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

#destinationString

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

Returns:

  • (String)


128
129
130
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 128

def destination
  @destination
end

#end_timeString

Optional. Time at which this sink expires. Corresponds to the JSON property endTime

Returns:

  • (String)


144
145
146
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 144

def end_time
  @end_time
end

#filterString

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

Returns:

  • (String)


139
140
141
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 139

def filter
  @filter
end

#nameString

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

Returns:

  • (String)


153
154
155
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 153

def name
  @name
end

#output_version_formatString

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

Returns:

  • (String)


169
170
171
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 169

def output_version_format
  @output_version_format
end

#start_timeString

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

Returns:

  • (String)


161
162
163
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 161

def start_time
  @start_time
end

#writer_identityString

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

Returns:

  • (String)


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