Skip to main content

team_hierarchy_links

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

Overview

Nameteam_hierarchy_links
TypeResource
Iddatadog.organization.team_hierarchy_links

Fields

The following fields are returned by SELECT queries:

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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_team_hierarchy_linkselectlink_idGet a single team hierarchy link for the given link_id.
list_team_hierarchy_linksselectpage[number], page[size], filter[parent_team], filter[sub_team]List all team hierarchy links that match the provided filters.
add_team_hierarchy_linkinsertdataCreate a new team hierarchy link between a parent team and a sub team.
remove_team_hierarchy_linkdeletelink_idRemove a team hierarchy link by the given link_id.

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.
filter[parent_team]stringFilter by parent team ID
filter[sub_team]stringFilter by sub team ID
page[number]integer (int64)Specific page number to return.
page[size]integer (int64)Number of items to return per page. The maximum allowed value is 100.

SELECT examples

Get a single team hierarchy link for the given link_id.

SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.team_hierarchy_links
WHERE link_id = '{{ link_id }}' -- required
;

INSERT examples

Create a new team hierarchy link between a parent team and a sub team.

INSERT INTO datadog.organization.team_hierarchy_links (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data,
included,
links
;

DELETE examples

Remove a team hierarchy link by the given link_id.

DELETE FROM datadog.organization.team_hierarchy_links
WHERE link_id = '{{ link_id }}' --required
;