Class: DatadogAPIClient::V1::LogQueryDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/log_query_definition.rb

Overview

The log query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogQueryDefinition

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    attributes Model attributes in the form of hash



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/datadog_api_client/v1/models/log_query_definition.rb', line 78

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogQueryDefinition` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'compute')
    self.compute = attributes[:'compute']
  end

  if attributes.key?(:'group_by')
    if (value = attributes[:'group_by']).is_a?(Array)
      self.group_by = value
    end
  end

  if attributes.key?(:'index')
    self.index = attributes[:'index']
  end

  if attributes.key?(:'multi_compute')
    if (value = attributes[:'multi_compute']).is_a?(Array)
      self.multi_compute = value
    end
  end

  if attributes.key?(:'search')
    self.search = attributes[:'search']
  end
end

Instance Attribute Details

#computeObject

Returns the value of attribute compute.



26
27
28
# File 'lib/datadog_api_client/v1/models/log_query_definition.rb', line 26

def compute
  @compute
end

#group_byObject

List of tag prefixes to group by in the case of a cluster check.



29
30
31
# File 'lib/datadog_api_client/v1/models/log_query_definition.rb', line 29

def group_by
  @group_by
end

#indexObject

A coma separated-list of index names. Use "*" query all indexes at once. [Multiple Indexes](docs.datadoghq.com/logs/indexes/#multiple-indexes)



32
33
34
# File 'lib/datadog_api_client/v1/models/log_query_definition.rb', line 32

def index
  @index
end

#multi_computeObject

This field is mutually exclusive with ‘compute`.



35
36
37
# File 'lib/datadog_api_client/v1/models/log_query_definition.rb', line 35

def multi_compute
  @multi_compute
end

#searchObject

Returns the value of attribute search.



37
38
39
# File 'lib/datadog_api_client/v1/models/log_query_definition.rb', line 37

def search
  @search
end