Skip to main content

index_order

Creates, updates, deletes, gets or lists an index_order resource.

Overview

Nameindex_order
TypeResource
Iddatadog.logs.index_order

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
index_namesarrayArray of strings identifying by their name(s) the index(es) of your organization. Logs are tested against the query filter of each index one by one, following the order of the array. Logs are eventually stored in the first matching index.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_logs_index_orderselectGet the current order of your log indexes. This endpoint takes no JSON arguments.
update_logs_index_orderreplaceindex_namesThis endpoint updates the index order of your organization.<br />It returns the index order object passed in the request body when the request is successful.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.

SELECT examples

Get the current order of your log indexes. This endpoint takes no JSON arguments.

SELECT
index_names
FROM datadog.logs.index_order
;

REPLACE examples

This endpoint updates the index order of your organization.<br />It returns the index order object passed in the request body when the request is successful.

REPLACE datadog.logs.index_order
SET
index_names = '{{ index_names }}'
WHERE
index_names = '{{ index_names }}' --required
RETURNING
index_names;