Skip to main content

team_links

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

Overview

Nameteam_links
TypeResource
Iddatadog.organization.team_links

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe team link's identifier (example: b8626d7e-cedd-11eb-abf5-da7ad0900001)
attributesobjectTeam link attributes
typestringTeam link type (team_links) (default: team_links, example: team_links)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_team_linkselectteam_id, link_idGet a single link for a team.
get_team_linksselectteam_idGet all links for a given team.
create_team_linkinsertteam_id, dataAdd a new link to a team.
update_team_linkupdateteam_id, link_id, dataUpdate a team link.
delete_team_linkdeleteteam_id, link_idRemove a link from a team.

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
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.
team_idstringNone

SELECT examples

Get a single link for a team.

SELECT
id,
attributes,
type
FROM datadog.organization.team_links
WHERE team_id = '{{ team_id }}' -- required
AND link_id = '{{ link_id }}' -- required
;

INSERT examples

Add a new link to a team.

INSERT INTO datadog.organization.team_links (
data,
team_id
)
SELECT
'{{ data }}' /* required */,
'{{ team_id }}'
RETURNING
data
;

UPDATE examples

Update a team link.

UPDATE datadog.organization.team_links
SET
data = '{{ data }}'
WHERE
team_id = '{{ team_id }}' --required
AND link_id = '{{ link_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Remove a link from a team.

DELETE FROM datadog.organization.team_links
WHERE team_id = '{{ team_id }}' --required
AND link_id = '{{ link_id }}' --required
;