Skip to main content

org_groups

Creates, updates, deletes, gets or lists an org_groups resource.

Overview

Nameorg_groups
TypeResource
Iddatadog.organization.org_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)The ID of the org group. (example: a1b2c3d4-e5f6-7890-abcd-ef0123456789)
attributesobjectAttributes of an org group.
typestringOrg groups resource type. (org_groups) (example: org_groups)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_org_groupselectorg_group_idGet a specific organization group by its ID.
list_org_groupsselectpage[number], page[size], sortList all organization groups that the requesting organization has access to.
create_org_groupinsertdataCreate a new organization group.
update_org_groupupdateorg_group_id, dataUpdate the name of an existing organization group.
delete_org_groupdeleteorg_group_idDelete an organization group by its 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
org_group_idstring (uuid)The ID of the org group.
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.
page[number]integer (int64)The page number to return.
page[size]integer (int64)The number of items per page. Maximum is 1000.
sortstringField to sort org groups by. Supported values: name, uuid, -name, -uuid. Defaults to uuid.

SELECT examples

Get a specific organization group by its ID.

SELECT
id,
attributes,
type
FROM datadog.organization.org_groups
WHERE org_group_id = '{{ org_group_id }}' -- required
;

INSERT examples

Create a new organization group.

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

UPDATE examples

Update the name of an existing organization group.

UPDATE datadog.organization.org_groups
SET
data = '{{ data }}'
WHERE
org_group_id = '{{ org_group_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete an organization group by its ID.

DELETE FROM datadog.organization.org_groups
WHERE org_group_id = '{{ org_group_id }}' --required
;