Skip to main content

datastores

Creates, updates, deletes, gets or lists a datastores resource.

Overview

Namedatastores
TypeResource
Iddatadog.actions.datastores

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the datastore.
attributesobjectDetailed information about a datastore.
typestringThe resource type for datastores. (default: datastores, example: datastores)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_datastoreselectdatastore_id, regionRetrieves a specific datastore by its ID.
list_datastoresselectregionLists all datastores for the organization.
create_datastoreinsertregionCreates a new datastore.
update_datastoreupdatedatastore_id, regionUpdates an existing datastore's attributes.
delete_datastoredeletedatastore_id, regionDeletes 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.

NameDatatypeDescription
datastore_idstringThe unique identifier of the datastore to retrieve.
regionstring(default: datadoghq.com)

SELECT examples

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
;

INSERT examples

Creates a new datastore.

INSERT INTO datadog.actions.datastores (
data__data,
region
)
SELECT
'{{ data }}',
'{{ region }}'
RETURNING
data
;

UPDATE examples

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

Deletes a datastore by its unique identifier.

DELETE FROM datadog.actions.datastores
WHERE datastore_id = '{{ datastore_id }}' --required
AND region = '{{ region }}' --required
;