Class: Google::Apis::LoggingV2::OpsAnalyticsQuery

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 query that can be run in Log Analytics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OpsAnalyticsQuery

Returns a new instance of OpsAnalyticsQuery.



3473
3474
3475
# File 'lib/google/apis/logging_v2/classes.rb', line 3473

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

Instance Attribute Details

#query_builderGoogle::Apis::LoggingV2::QueryBuilderConfig

Defines a structured query configuration that can be used instead of writing raw SQL. This configuration represents the components of a SQL query (FROM, SELECT, WHERE, ORDER BY, LIMIT) and is typically converted into an executable query (e.g., BigQuery SQL) by the backend service to retrieve data for analysis or visualization. Corresponds to the JSON property queryBuilder



3464
3465
3466
# File 'lib/google/apis/logging_v2/classes.rb', line 3464

def query_builder
  @query_builder
end

#sql_query_textString

Optional. A Log Analytics SQL query in text format.If both sql_query_text and query_builder fields are set, then the sql_query_text will be used, if its non- empty. At least one of the two fields must be set. Corresponds to the JSON property sqlQueryText

Returns:

  • (String)


3471
3472
3473
# File 'lib/google/apis/logging_v2/classes.rb', line 3471

def sql_query_text
  @sql_query_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3478
3479
3480
3481
# File 'lib/google/apis/logging_v2/classes.rb', line 3478

def update!(**args)
  @query_builder = args[:query_builder] if args.key?(:query_builder)
  @sql_query_text = args[:sql_query_text] if args.key?(:sql_query_text)
end