Class: Google::Apis::LoggingV2::RecentQuery

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/logging_v2/classes.rb,
lib/google/apis/logging_v2/representations.rb,
lib/google/apis/logging_v2/representations.rb

Overview

Describes a recent query executed on the Logs Explorer or Log Analytics page within the last ~ 30 days.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RecentQuery

Returns a new instance of RecentQuery.



3312
3313
3314
# File 'lib/google/apis/logging_v2/classes.rb', line 3312

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#last_run_timeString

Output only. The timestamp when this query was last run. Corresponds to the JSON property lastRunTime

Returns:

  • (String)


3287
3288
3289
# File 'lib/google/apis/logging_v2/classes.rb', line 3287

def last_run_time
  @last_run_time
end

#logging_queryGoogle::Apis::LoggingV2::LoggingQuery

Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. Corresponds to the JSON property loggingQuery



3295
3296
3297
# File 'lib/google/apis/logging_v2/classes.rb', line 3295

def logging_query
  @logging_query
end

#nameString

Output only. Resource name of the recent query.In the format: "projects/[ PROJECT_ID]/locations/[LOCATION_ID]/recentQueries/[QUERY_ID]" For a list of supported locations, see Supported Regions (https://cloud.google.com/logging/ docs/region-support)The QUERY_ID is a system generated alphanumeric ID. Corresponds to the JSON property name

Returns:

  • (String)


3303
3304
3305
# File 'lib/google/apis/logging_v2/classes.rb', line 3303

def name
  @name
end

#ops_analytics_queryGoogle::Apis::LoggingV2::OpsAnalyticsQuery

Describes an analytics query that can be run in the Log Analytics page of Google Cloud console.Preview: This is a preview feature and may be subject to change before final release. Corresponds to the JSON property opsAnalyticsQuery



3310
3311
3312
# File 'lib/google/apis/logging_v2/classes.rb', line 3310

def ops_analytics_query
  @ops_analytics_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3317
3318
3319
3320
3321
3322
# File 'lib/google/apis/logging_v2/classes.rb', line 3317

def update!(**args)
  @last_run_time = args[:last_run_time] if args.key?(:last_run_time)
  @logging_query = args[:logging_query] if args.key?(:logging_query)
  @name = args[:name] if args.key?(:name)
  @ops_analytics_query = args[:ops_analytics_query] if args.key?(:ops_analytics_query)
end