Skip to main content

shared_secure_embeds

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

Overview

Nameshared_secure_embeds
TypeResource
Iddatadog.dashboards.shared_secure_embeds

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringInternal share ID. (example: 12345)
attributesobjectAttributes of an existing secure embed shared dashboard.
typestringResource type for secure embed get responses. (secure_embed_get_response) (example: secure_embed_get_response)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_dashboard_secure_embedselectdashboard_id, tokenRetrieve an existing secure embed configuration for a dashboard.
create_dashboard_secure_embedinsertdashboard_id, dataCreate a secure embed share for a dashboard. The response includes a one-time credential used for HMAC-SHA256 signing. Store it securely — it cannot be retrieved again.
update_dashboard_secure_embedupdatedashboard_id, token, dataPartially update a secure embed configuration. All fields are optional (PATCH semantics).
delete_dashboard_secure_embeddeletedashboard_id, tokenDelete a secure embed share for a dashboard.

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
dashboard_idstringThe ID of the dashboard. (example: abc-def-ghi)
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.
tokenstringThe share token identifying the secure embed. (example: s3cur3t0k3n-abcdef123456)

SELECT examples

Retrieve an existing secure embed configuration for a dashboard.

SELECT
id,
attributes,
type
FROM datadog.dashboards.shared_secure_embeds
WHERE dashboard_id = '{{ dashboard_id }}' -- required
AND token = '{{ token }}' -- required
;

INSERT examples

Create a secure embed share for a dashboard. The response includes a one-time credential used for HMAC-SHA256 signing. Store it securely — it cannot be retrieved again.

INSERT INTO datadog.dashboards.shared_secure_embeds (
data,
dashboard_id
)
SELECT
'{{ data }}' /* required */,
'{{ dashboard_id }}'
RETURNING
data
;

UPDATE examples

Partially update a secure embed configuration. All fields are optional (PATCH semantics).

UPDATE datadog.dashboards.shared_secure_embeds
SET
data = '{{ data }}'
WHERE
dashboard_id = '{{ dashboard_id }}' --required
AND token = '{{ token }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete a secure embed share for a dashboard.

DELETE FROM datadog.dashboards.shared_secure_embeds
WHERE dashboard_id = '{{ dashboard_id }}' --required
AND token = '{{ token }}' --required
;