Skip to main content

dashboard_lists

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

Overview

Namedashboard_lists
TypeResource
Iddatadog.dashboards.dashboard_lists

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idinteger (int64)The ID of the dashboard list.
namestringThe name of the dashboard list. (example: My Dashboard)
authorobjectObject describing the creator of the shared element.
createdstring (date-time)Date of creation of the dashboard list.
dashboard_countinteger (int64)The number of dashboards in the list.
is_favoritebooleanWhether or not the list is in the favorites.
modifiedstring (date-time)Date of last edition of the dashboard list.
typestringThe type of dashboard list. (example: manual_dashboard_list)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_dashboard_listselectlist_idFetch an existing dashboard list's definition.
list_dashboard_listsselectFetch all of your existing dashboard list definitions.
create_dashboard_listinsertnameCreate an empty dashboard list.
update_dashboard_listreplacelist_id, nameUpdate the name of a dashboard list.
delete_dashboard_listdeletelist_idDelete a dashboard list.

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
list_idinteger (int64)ID of the dashboard list to delete.
sitestringThe 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

Fetch an existing dashboard list's definition.

SELECT
id,
name,
author,
created,
dashboard_count,
is_favorite,
modified,
type
FROM datadog.dashboards.dashboard_lists
WHERE list_id = '{{ list_id }}' -- required
;

INSERT examples

Create an empty dashboard list.

INSERT INTO datadog.dashboards.dashboard_lists (
name
)
SELECT
'{{ name }}' /* required */
RETURNING
id,
name,
author,
created,
dashboard_count,
is_favorite,
modified,
type
;

REPLACE examples

Update the name of a dashboard list.

REPLACE datadog.dashboards.dashboard_lists
SET
name = '{{ name }}'
WHERE
list_id = '{{ list_id }}' --required
AND name = '{{ name }}' --required
RETURNING
id,
name,
author,
created,
dashboard_count,
is_favorite,
modified,
type;

DELETE examples

Delete a dashboard list.

DELETE FROM datadog.dashboards.dashboard_lists
WHERE list_id = '{{ list_id }}' --required
;