Sha256: 19eb2a226c5e8f0e04665926846a96f632a274a0fdc63fa70314b2eb2b94b2c0

Contents?: true

Size: 840 Bytes

Versions: 4

Compression:

Stored size: 840 Bytes

Contents

# Update an index returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::LogsIndexesAPI.new

body = DatadogAPIClient::V1::LogsIndexUpdateRequest.new({
  daily_limit: 300000000,
  daily_limit_reset: DatadogAPIClient::V1::LogsDailyLimitReset.new({
    reset_time: "14:00",
    reset_utc_offset: "+02:00",
  }),
  daily_limit_warning_threshold_percentage: 70,
  disable_daily_limit: false,
  exclusion_filters: [
    DatadogAPIClient::V1::LogsExclusion.new({
      filter: DatadogAPIClient::V1::LogsExclusionFilter.new({
        query: "*",
        sample_rate: 1.0,
      }),
      name: "payment",
    }),
  ],
  filter: DatadogAPIClient::V1::LogsFilter.new({
    query: "source:python",
  }),
  num_flex_logs_retention_days: 360,
  num_retention_days: 15,
})
p api_instance.update_logs_index("name", body)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
datadog_api_client-2.28.1 examples/v1/logs-indexes/UpdateLogsIndex.rb
datadog_api_client-2.27.1 examples/v1/logs-indexes/UpdateLogsIndex.rb
datadog_api_client-2.26.1 examples/v1/logs-indexes/UpdateLogsIndex.rb
datadog_api_client-2.26.0 examples/v1/logs-indexes/UpdateLogsIndex.rb