org_group_policies
Creates, updates, deletes, gets or lists an org_group_policies resource.
Overview
| Name | org_group_policies |
| Type | Resource |
| Id | datadog.organization.org_group_policies |
Fields
The following fields are returned by SELECT queries:
- get_org_group_policy
- list_org_group_policies
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the org group policy. (example: 1a2b3c4d-5e6f-7890-abcd-ef0123456789) |
attributes | object | Attributes of an org group policy. |
relationships | object | Relationships of an org group policy. |
type | string | Org group policies resource type. (org_group_policies) (example: org_group_policies) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the org group policy. (example: 1a2b3c4d-5e6f-7890-abcd-ef0123456789) |
attributes | object | Attributes of an org group policy. |
relationships | object | Relationships of an org group policy. |
type | string | Org group policies resource type. (org_group_policies) (example: org_group_policies) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_org_group_policy | select | org_group_policy_id | Get a specific organization group policy by its ID. | |
list_org_group_policies | select | filter[org_group_id] | filter[policy_name], page[number], page[size], sort | List policies for an organization group. Requires a filter on org group ID. |
create_org_group_policy | insert | data | Create a new policy for an organization group. | |
update_org_group_policy | update | org_group_policy_id, data | Update an existing organization group policy. | |
delete_org_group_policy | delete | org_group_policy_id | Delete an organization group policy 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 |
|---|---|---|
filter[org_group_id] | string (uuid) | Filter policies by org group ID. |
org_group_policy_id | string (uuid) | The ID of the org group policy. |
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[policy_name] | string | Filter policies by policy name. |
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 policies by. Supported values: id, name, -id, -name. Defaults to id. |
SELECT examples
- get_org_group_policy
- list_org_group_policies
Get a specific organization group policy by its ID.
SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.org_group_policies
WHERE org_group_policy_id = '{{ org_group_policy_id }}' -- required
;
List policies for an organization group. Requires a filter on org group ID.
SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.org_group_policies
WHERE filter[org_group_id] = '{{ filter[org_group_id] }}' -- required
AND filter[policy_name] = '{{ filter[policy_name] }}'
AND page[number] = '{{ page[number] }}'
AND page[size] = '{{ page[size] }}'
AND sort = '{{ sort }}'
;
INSERT examples
- create_org_group_policy
- Manifest
Create a new policy for an organization group.
INSERT INTO datadog.organization.org_group_policies (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: org_group_policies
props:
- name: data
description: |
Data for creating an org group policy.
value:
attributes:
content: "{{ content }}"
enforcement_tier: "{{ enforcement_tier }}"
policy_name: "{{ policy_name }}"
policy_type: "{{ policy_type }}"
relationships:
org_group:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
UPDATE examples
- update_org_group_policy
Update an existing organization group policy.
UPDATE datadog.organization.org_group_policies
SET
data = '{{ data }}'
WHERE
org_group_policy_id = '{{ org_group_policy_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_org_group_policy
Delete an organization group policy by its ID.
DELETE FROM datadog.organization.org_group_policies
WHERE org_group_policy_id = '{{ org_group_policy_id }}' --required
;