archives
Creates, updates, deletes, gets or lists an archives resource.
Overview
| Name | archives |
| Type | Resource |
| Id | datadog.logs.archives |
Fields
The following fields are returned by SELECT queries:
- get_logs_archive
- list_logs_archives
| Name | Datatype | Description |
|---|---|---|
id | string | The archive ID. (example: a2zcMylnM4OCHpYusxIi3g) |
attributes | object | The attributes associated with the archive. |
type | string | The type of the resource. The value should always be archives. (default: archives, example: archives) |
| Name | Datatype | Description |
|---|---|---|
id | string | The archive ID. (example: a2zcMylnM4OCHpYusxIi3g) |
attributes | object | The attributes associated with the archive. |
type | string | The type of the resource. The value should always be archives. (default: archives, example: archives) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_logs_archive | select | archive_id | Get a specific archive from your organization. | |
list_logs_archives | select | Get the list of configured logs archives with their definitions. | ||
create_logs_archive | insert | Create an archive in your organization. | ||
update_logs_archive | replace | archive_id | Update a given archive configuration.<br /><br />Note: Using this method updates your archive configuration by replacing<br />your current configuration with the new one sent to your Datadog organization. | |
delete_logs_archive | delete | archive_id | Delete a given archive from your organization. |
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.
| Name | Datatype | Description |
|---|---|---|
archive_id | string | The ID of the archive. |
site | string | The 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_logs_archive
- list_logs_archives
Get a specific archive from your organization.
SELECT
id,
attributes,
type
FROM datadog.logs.archives
WHERE archive_id = '{{ archive_id }}' -- required
;
Get the list of configured logs archives with their definitions.
SELECT
id,
attributes,
type
FROM datadog.logs.archives
;
INSERT examples
- create_logs_archive
- Manifest
Create an archive in your organization.
INSERT INTO datadog.logs.archives (
data
)
SELECT
'{{ data }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: archives
props:
- name: data
description: |
The definition of an archive.
value:
attributes:
compression_method: "{{ compression_method }}"
destination:
container: "{{ container }}"
integration:
client_id: "{{ client_id }}"
tenant_id: "{{ tenant_id }}"
path: "{{ path }}"
region: "{{ region }}"
storage_account: "{{ storage_account }}"
type: "{{ type }}"
bucket: "{{ bucket }}"
encryption:
key: "{{ key }}"
type: "{{ type }}"
storage_class: "{{ storage_class }}"
include_tags: {{ include_tags }}
lookup_attributes:
- "{{ lookup_attributes }}"
name: "{{ name }}"
partitioning_attributes:
- "{{ partitioning_attributes }}"
query: "{{ query }}"
rehydration_max_scan_size_in_gb: {{ rehydration_max_scan_size_in_gb }}
rehydration_tags:
- "{{ rehydration_tags }}"
type: "{{ type }}"
REPLACE examples
- update_logs_archive
Update a given archive configuration.<br /><br />Note: Using this method updates your archive configuration by replacing<br />your current configuration with the new one sent to your Datadog organization.
REPLACE datadog.logs.archives
SET
data = '{{ data }}'
WHERE
archive_id = '{{ archive_id }}' --required
RETURNING
data;
DELETE examples
- delete_logs_archive
Delete a given archive from your organization.
DELETE FROM datadog.logs.archives
WHERE archive_id = '{{ archive_id }}' --required
;