Skip to main content

archive_order

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

Overview

Namearchive_order
TypeResource
Iddatadog.logs.archive_order

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attributesobjectThe attributes associated with the archive order.
typestringType of the archive order definition. (default: archive_order, example: archive_order)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_logs_archive_orderselectregionGet the current order of your archives.
This endpoint takes no JSON arguments.
update_logs_archive_orderreplaceregionUpdate the order of your archives. Since logs are processed sequentially, reordering an archive may change
the structure and content of the data processed by other archives.

Note: Using the PUT method updates your archive's order by replacing the current order
with the new one.

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
regionstring(default: datadoghq.com)

SELECT examples

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

SELECT
attributes,
type
FROM datadog.logs.archive_order
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Update the order of your archives. Since logs are processed sequentially, reordering an archive may change
the structure and content of the data processed by other archives.

Note: Using the PUT method updates your archive's order by replacing the current order
with the new one.

REPLACE datadog.logs.archive_order
SET
data__data = '{{ data }}'
WHERE
region = '{{ region }}' --required
RETURNING
data;