Class: Google::Apis::LoggingV2::SavedQuery

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 has been saved by a user.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SavedQuery

Returns a new instance of SavedQuery.



3695
3696
3697
# File 'lib/google/apis/logging_v2/classes.rb', line 3695

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

Instance Attribute Details

#create_timeString

Output only. The timestamp when the saved query was created. Corresponds to the JSON property createTime

Returns:

  • (String)


3648
3649
3650
# File 'lib/google/apis/logging_v2/classes.rb', line 3648

def create_time
  @create_time
end

#descriptionString

Optional. A human readable description of the saved query. Corresponds to the JSON property description

Returns:

  • (String)


3653
3654
3655
# File 'lib/google/apis/logging_v2/classes.rb', line 3653

def description
  @description
end

#display_nameString

Required. The user specified title for the SavedQuery. Corresponds to the JSON property displayName

Returns:

  • (String)


3658
3659
3660
# File 'lib/google/apis/logging_v2/classes.rb', line 3658

def display_name
  @display_name
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



3666
3667
3668
# File 'lib/google/apis/logging_v2/classes.rb', line 3666

def logging_query
  @logging_query
end

#nameString

Output only. Resource name of the saved query.In the format: "projects/[ PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For a list of supported locations, see Supported Regions (https://cloud.google.com/logging/ docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn't provide a QUERY_ID, the system will generate an alphanumeric ID. Corresponds to the JSON property name

Returns:

  • (String)


3676
3677
3678
# File 'lib/google/apis/logging_v2/classes.rb', line 3676

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



3683
3684
3685
# File 'lib/google/apis/logging_v2/classes.rb', line 3683

def ops_analytics_query
  @ops_analytics_query
end

#update_timeString

Output only. The timestamp when the saved query was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


3688
3689
3690
# File 'lib/google/apis/logging_v2/classes.rb', line 3688

def update_time
  @update_time
end

#visibilityString

Required. The visibility status of this query, which determines its ownership. Corresponds to the JSON property visibility

Returns:

  • (String)


3693
3694
3695
# File 'lib/google/apis/logging_v2/classes.rb', line 3693

def visibility
  @visibility
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
# File 'lib/google/apis/logging_v2/classes.rb', line 3700

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @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)
  @update_time = args[:update_time] if args.key?(:update_time)
  @visibility = args[:visibility] if args.key?(:visibility)
end