Sha256: 40055680ef867ba089b8ee085c0a3096421acdfff53142805debb32cf4d844ba

Contents?: true

Size: 768 Bytes

Versions: 5

Compression:

Stored size: 768 Bytes

Contents

# Create an index returns "OK" response

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

body = DatadogAPIClient::V1::LogsIndex.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,
  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",
  }),
  name: "main",
  num_retention_days: 15,
})
p api_instance.create_logs_index(body)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
datadog_api_client-2.25.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.24.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.22.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.21.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.20.0 examples/v1/logs-indexes/CreateLogsIndex.rb