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 (default: team_links, example: team_links)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_team_linkselectteam_id, link_id, regionGet a single link for a team.
get_team_linksselectteam_id, regionGet all links for a given team.
create_team_linkinsertteam_id, region, data__dataAdd a new link to a team.
update_team_linkupdateteam_id, link_id, region, data__dataUpdate a team link.
delete_team_linkdeleteteam_id, link_id, regionRemove 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
regionstring(default: datadoghq.com)
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
AND region = '{{ region }}' -- required
;

INSERT examples

Add a new link to a team.

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

UPDATE examples

Update a team link.

UPDATE datadog.organization.team_links
SET
data__data = '{{ data }}'
WHERE
team_id = '{{ team_id }}' --required
AND link_id = '{{ link_id }}' --required
AND region = '{{ region }}' --required
AND data__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
AND region = '{{ region }}' --required
;