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.



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

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



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

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)


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

def sql_query_text
  @sql_query_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3484
3485
3486
3487
# File 'lib/google/apis/logging_v2/classes.rb', line 3484

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