Class: Google::Apis::MonitoringV1::QueryInstantRequest

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

Overview

QueryInstantRequest holds all parameters of the Prometheus upstream instant query API plus GCM specific parameters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryInstantRequest

Returns a new instance of QueryInstantRequest.



1647
1648
1649
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1647

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

Instance Attribute Details

#queryString

A PromQL query string. Query lanauge documentation: https://prometheus.io/docs/ prometheus/latest/querying/basics/. Corresponds to the JSON property query

Returns:

  • (String)


1630
1631
1632
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1630

def query
  @query
end

#timeString

The single point in time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. Corresponds to the JSON property time

Returns:

  • (String)


1636
1637
1638
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1636

def time
  @time
end

#timeoutString

An upper bound timeout for the query. Either a Prometheus duration string ( https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) or floating point seconds. This non-standard encoding must be used for compatibility with the open source API. Clients may still implement timeouts at the connection level while ignoring this field. Corresponds to the JSON property timeout

Returns:

  • (String)


1645
1646
1647
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1645

def timeout
  @timeout
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1652
1653
1654
1655
1656
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1652

def update!(**args)
  @query = args[:query] if args.key?(:query)
  @time = args[:time] if args.key?(:time)
  @timeout = args[:timeout] if args.key?(:timeout)
end