Class: DatadogAPIClient::V1::LogsIndexUpdateRequest

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

Overview

Object for updating a Datadog Log index.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogsIndexUpdateRequest

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
# File 'lib/datadog_api_client/v1/models/logs_index_update_request.rb', line 79

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsIndexUpdateRequest` 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::LogsIndexUpdateRequest`. 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?(:'daily_limit')
    self.daily_limit = attributes[:'daily_limit']
  end

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

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

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

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

Instance Attribute Details

#daily_limitObject

The number of log events you can send in this index per day before you are rate-limited.



27
28
29
# File 'lib/datadog_api_client/v1/models/logs_index_update_request.rb', line 27

def daily_limit
  @daily_limit
end

#disable_daily_limitObject

If true, sets the ‘daily_limit` value to null and the index is not limited on a daily basis (any specified `daily_limit` value in the request is ignored). If false or omitted, the index’s current ‘daily_limit` is maintained.



30
31
32
# File 'lib/datadog_api_client/v1/models/logs_index_update_request.rb', line 30

def disable_daily_limit
  @disable_daily_limit
end

#exclusion_filtersObject

An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored.



33
34
35
# File 'lib/datadog_api_client/v1/models/logs_index_update_request.rb', line 33

def exclusion_filters
  @exclusion_filters
end

#filterObject

Returns the value of attribute filter.



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

def filter
  @filter
end

#num_retention_daysObject

The number of days before logs are deleted from this index. Available values depend on retention plans specified in your organization’s contract/subscriptions. Note: Changing the retention for an index adjusts the length of retention for all logs already in this index. It may also affect billing.



38
39
40
# File 'lib/datadog_api_client/v1/models/logs_index_update_request.rb', line 38

def num_retention_days
  @num_retention_days
end