org_groups
Creates, updates, deletes, gets or lists an org_groups resource.
Overview
| Name | org_groups |
| Type | Resource |
| Id | datadog.organization.org_groups |
Fields
The following fields are returned by SELECT queries:
- get_org_group
- list_org_groups
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the org group. (example: a1b2c3d4-e5f6-7890-abcd-ef0123456789) |
attributes | object | Attributes of an org group. |
type | string | Org groups resource type. (org_groups) (example: org_groups) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the org group. (example: a1b2c3d4-e5f6-7890-abcd-ef0123456789) |
attributes | object | Attributes of an org group. |
type | string | Org groups resource type. (org_groups) (example: org_groups) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_org_group | select | org_group_id | Get a specific organization group by its ID. | |
list_org_groups | select | page[number], page[size], sort | List all organization groups that the requesting organization has access to. | |
create_org_group | insert | data | Create a new organization group. | |
update_org_group | update | org_group_id, data | Update the name of an existing organization group. | |
delete_org_group | delete | org_group_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
org_group_id | string (uuid) | The ID of the org group. |
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. |
page[number] | integer (int64) | The page number to return. |
page[size] | integer (int64) | The number of items per page. Maximum is 1000. |
sort | string | Field to sort org groups by. Supported values: name, uuid, -name, -uuid. Defaults to uuid. |
SELECT examples
- get_org_group
- list_org_groups
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
;
List all organization groups that the requesting organization has access to.
SELECT
id,
attributes,
type
FROM datadog.organization.org_groups
WHERE page[number] = '{{ page[number] }}'
AND page[size] = '{{ page[size] }}'
AND sort = '{{ sort }}'
;
INSERT examples
- create_org_group
- Manifest
Create a new organization group.
INSERT INTO datadog.organization.org_groups (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: org_groups
props:
- name: data
description: |
Data for creating an org group.
value:
attributes:
name: "{{ name }}"
type: "{{ type }}"
UPDATE examples
- update_org_group
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_org_group
Delete an organization group by its ID.
DELETE FROM datadog.organization.org_groups
WHERE org_group_id = '{{ org_group_id }}' --required
;