team_hierarchy_links
Creates, updates, deletes, gets or lists a team_hierarchy_links resource.
Overview
| Name | team_hierarchy_links |
| Type | Resource |
| Id | datadog.organization.team_hierarchy_links |
Fields
The following fields are returned by SELECT queries:
- get_team_hierarchy_link
- list_team_hierarchy_links
| Name | Datatype | Description |
|---|---|---|
id | string | The team hierarchy link's identifier (example: b8626d7e-cedd-11eb-abf5-da7ad0900001) |
attributes | object | Team hierarchy link attributes |
relationships | object | Team hierarchy link relationships |
type | string | Team hierarchy link type (team_hierarchy_links) (default: team_hierarchy_links, example: team_hierarchy_links) |
| Name | Datatype | Description |
|---|---|---|
id | string | The team hierarchy link's identifier (example: b8626d7e-cedd-11eb-abf5-da7ad0900001) |
attributes | object | Team hierarchy link attributes |
relationships | object | Team hierarchy link relationships |
type | string | Team hierarchy link type (team_hierarchy_links) (default: team_hierarchy_links, example: team_hierarchy_links) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_team_hierarchy_link | select | link_id | Get a single team hierarchy link for the given link_id. | |
list_team_hierarchy_links | select | page[number], page[size], filter[parent_team], filter[sub_team] | List all team hierarchy links that match the provided filters. | |
add_team_hierarchy_link | insert | data | Create a new team hierarchy link between a parent team and a sub team. | |
remove_team_hierarchy_link | delete | link_id | Remove 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.
| Name | Datatype | Description |
|---|---|---|
link_id | string | The team hierarchy link's identifier |
site | string | The 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] | string | Filter by parent team ID |
filter[sub_team] | string | Filter 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_team_hierarchy_link
- list_team_hierarchy_links
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
;
List all team hierarchy links that match the provided filters.
SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.team_hierarchy_links
WHERE page[number] = '{{ page[number] }}'
AND page[size] = '{{ page[size] }}'
AND filter[parent_team] = '{{ filter[parent_team] }}'
AND filter[sub_team] = '{{ filter[sub_team] }}'
;
INSERT examples
- add_team_hierarchy_link
- Manifest
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
;
# Description fields are for documentation purposes
- name: team_hierarchy_links
props:
- name: data
description: |
Data provided when creating a team hierarchy link
value:
relationships:
parent_team:
data:
id: "{{ id }}"
type: "{{ type }}"
sub_team:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
DELETE examples
- remove_team_hierarchy_link
Remove a team hierarchy link by the given link_id.
DELETE FROM datadog.organization.team_hierarchy_links
WHERE link_id = '{{ link_id }}' --required
;