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. (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. (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 , region | Retrieves a specific datastore by its ID. | |
list_datastores | select | region | Lists all datastores for the organization. | |
create_datastore | insert | region | Creates a new datastore. | |
update_datastore | update | datastore_id , region | Updates an existing datastore's attributes. | |
delete_datastore | delete | datastore_id , region | 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. |
region | string | (default: datadoghq.com) |
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
AND region = '{{ region }}' -- required
;
Lists all datastores for the organization.
SELECT
id,
attributes,
type
FROM datadog.actions.datastores
WHERE region = '{{ region }}' -- required
;
INSERT
examples
- create_datastore
- Manifest
Creates a new datastore.
INSERT INTO datadog.actions.datastores (
data__data,
region
)
SELECT
'{{ data }}',
'{{ region }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: datastores
props:
- name: region
value: string
description: Required parameter for the datastores resource.
- name: data
value: object
description: |
Data wrapper containing the configuration needed to create a new datastore.
UPDATE
examples
- update_datastore
Updates an existing datastore's attributes.
UPDATE datadog.actions.datastores
SET
data__data = '{{ data }}'
WHERE
datastore_id = '{{ datastore_id }}' --required
AND region = '{{ region }}' --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
AND region = '{{ region }}' --required
;