Sha256: 32e430fd26b8a3bc31193df740888783e7fd8f2fd40877d109f3d33f19987c8e

Contents?: true

Size: 588 Bytes

Versions: 25

Compression:

Stored size: 588 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,
  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

25 entries across 25 versions & 1 rubygems

Version Path
datadog_api_client-2.19.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.18.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.17.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.16.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.15.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.14.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.13.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.12.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.11.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.10.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.9.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.8.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.7.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.6.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.5.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.4.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.3.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.2.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.1.0 examples/v1/logs-indexes/CreateLogsIndex.rb
datadog_api_client-2.0.2 examples/v1/logs-indexes/CreateLogsIndex.rb