datastores
Creates, updates, deletes, gets or lists a datastores resource.
Overview
| Name | datastores |
| Type | Resource |
| Id | datadog.actions.datastores |
Fields
The following fields are returned by SELECT queries:
- get_datastore
- list_datastores
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the datastore. |
attributes | object | Detailed information about a datastore. |
type | string | The resource type for datastores. (datastores) (default: datastores, example: datastores) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the datastore. |
attributes | object | Detailed information about a datastore. |
type | string | The resource type for datastores. (datastores) (default: datastores, example: datastores) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_datastore | select | datastore_id | Retrieves a specific datastore by its ID. | |
list_datastores | select | Lists all datastores for the organization. | ||
create_datastore | insert | Creates a new datastore. | ||
update_datastore | update | datastore_id | Updates an existing datastore's attributes. | |
delete_datastore | delete | datastore_id | Deletes a datastore by its unique identifier. |
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 |
|---|---|---|
datastore_id | string | The unique identifier of the datastore to retrieve. |
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_datastore
- list_datastores
Retrieves a specific datastore by its ID.
SELECT
id,
attributes,
type
FROM datadog.actions.datastores
WHERE datastore_id = '{{ datastore_id }}' -- required
;
Lists all datastores for the organization.
SELECT
id,
attributes,
type
FROM datadog.actions.datastores
;
INSERT examples
- create_datastore
- Manifest
Creates a new datastore.
INSERT INTO datadog.actions.datastores (
data
)
SELECT
'{{ data }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: datastores
props:
- name: data
description: |
Data wrapper containing the configuration needed to create a new datastore.
value:
attributes:
description: "{{ description }}"
name: "{{ name }}"
org_access: "{{ org_access }}"
primary_column_name: "{{ primary_column_name }}"
primary_key_generation_strategy: "{{ primary_key_generation_strategy }}"
id: "{{ id }}"
type: "{{ type }}"
UPDATE examples
- update_datastore
Updates an existing datastore's attributes.
UPDATE datadog.actions.datastores
SET
data = '{{ data }}'
WHERE
datastore_id = '{{ datastore_id }}' --required
RETURNING
data;
DELETE examples
- delete_datastore
Deletes a datastore by its unique identifier.
DELETE FROM datadog.actions.datastores
WHERE datastore_id = '{{ datastore_id }}' --required
;