Skip to main content

org_group_policies

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

Overview

Nameorg_group_policies
TypeResource
Iddatadog.organization.org_group_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)The ID of the org group policy. (example: 1a2b3c4d-5e6f-7890-abcd-ef0123456789)
attributesobjectAttributes of an org group policy.
relationshipsobjectRelationships of an org group policy.
typestringOrg group policies resource type. (org_group_policies) (example: org_group_policies)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_org_group_policyselectorg_group_policy_idGet a specific organization group policy by its ID.
list_org_group_policiesselectfilter[org_group_id]filter[policy_name], page[number], page[size], sortList policies for an organization group. Requires a filter on org group ID.
create_org_group_policyinsertdataCreate a new policy for an organization group.
update_org_group_policyupdateorg_group_policy_id, dataUpdate an existing organization group policy.
delete_org_group_policydeleteorg_group_policy_idDelete 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.

NameDatatypeDescription
filter[org_group_id]string (uuid)Filter policies by org group ID.
org_group_policy_idstring (uuid)The ID of the org group policy.
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[policy_name]stringFilter 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.
sortstringField to sort policies by. Supported values: id, name, -id, -name. Defaults to id.

SELECT examples

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
;

INSERT examples

Create a new policy for an organization group.

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

UPDATE examples

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 an organization group policy by its ID.

DELETE FROM datadog.organization.org_group_policies
WHERE org_group_policy_id = '{{ org_group_policy_id }}' --required
;