Skip to main content

restriction_policies

Creates, updates, deletes, gets or lists a restriction_policies resource.

Overview

Namerestriction_policies
TypeResource
Iddatadog.organization.restriction_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier, always equivalent to the value specified in the resource_id path parameter. (example: dashboard:abc-def-ghi)
attributesobjectRestriction policy attributes.
typestringRestriction policy type. (default: restriction_policy, example: restriction_policy)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_restriction_policyselectresource_id, regionRetrieves the restriction policy associated with a specified resource.
update_restriction_policyreplaceresource_id, region, data__dataallow_self_lockoutUpdates the restriction policy associated with a resource.

#### Supported resources
Restriction policies can be applied to the following resources:
- Dashboards: dashboard
- Integration Services: integration-service
- Integration Webhooks: integration-webhook
- Notebooks: notebook
- Powerpacks: powerpack
- Reference Tables: reference-table
- Security Rules: security-rule
- Service Level Objectives: slo
- Synthetic Global Variables: synthetics-global-variable
- Synthetic Tests: synthetics-test
- Synthetic Private Locations: synthetics-private-location
- Monitors: monitor
- Workflows: workflow
- App Builder Apps: app-builder-app
- Connections: connection
- Connection Groups: connection-group
- RUM Applications: rum-application
- Cross Org Connections: cross-org-connection
- Spreadsheets: spreadsheet
- On-Call Schedules: on-call-schedule
- On-Call Escalation Policies: on-call-escalation-policy
- On-Call Team Routing Rules: on-call-team-routing-rules

#### Supported relations for resources
Resource Type | Supported Relations
----------------------------|--------------------------
Dashboards | viewer, editor
Integration Services | viewer, editor
Integration Webhooks | viewer, editor
Notebooks | viewer, editor
Powerpacks | viewer, editor
Security Rules | viewer, editor
Service Level Objectives | viewer, editor
Synthetic Global Variables | viewer, editor
Synthetic Tests | viewer, editor
Synthetic Private Locations | viewer, editor
Monitors | viewer, editor
Reference Tables | viewer, editor
Workflows | viewer, runner, editor
App Builder Apps | viewer, editor
Connections | viewer, resolver, editor
Connection Groups | viewer, editor
RUM Application | viewer, editor
Cross Org Connections | viewer, editor
Spreadsheets | viewer, editor
On-Call Schedules | viewer, overrider, editor
On-Call Escalation Policies | viewer, editor
On-Call Team Routing Rules | viewer, editor
delete_restriction_policydeleteresource_id, regionDeletes the restriction policy associated with a specified resource.

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
regionstring(default: datadoghq.com)
resource_idstringIdentifier, formatted as type:id. Supported types: dashboard, integration-service, integration-webhook, notebook, reference-table, security-rule, slo, workflow, app-builder-app, connection, connection-group, rum-application, cross-org-connection, spreadsheet, on-call-schedule, on-call-escalation-policy, `on-call-team-routing-rules. (example: dashboard:abc-def-ghi)
allow_self_lockoutbooleanAllows admins (users with the user_access_manage permission) to remove their own access from the resource if set to true. By default, this is set to false, preventing admins from locking themselves out.

SELECT examples

Retrieves the restriction policy associated with a specified resource.

SELECT
id,
attributes,
type
FROM datadog.organization.restriction_policies
WHERE resource_id = '{{ resource_id }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Updates the restriction policy associated with a resource.

#### Supported resources
Restriction policies can be applied to the following resources:
- Dashboards: dashboard
- Integration Services: integration-service
- Integration Webhooks: integration-webhook
- Notebooks: notebook
- Powerpacks: powerpack
- Reference Tables: reference-table
- Security Rules: security-rule
- Service Level Objectives: slo
- Synthetic Global Variables: synthetics-global-variable
- Synthetic Tests: synthetics-test
- Synthetic Private Locations: synthetics-private-location
- Monitors: monitor
- Workflows: workflow
- App Builder Apps: app-builder-app
- Connections: connection
- Connection Groups: connection-group
- RUM Applications: rum-application
- Cross Org Connections: cross-org-connection
- Spreadsheets: spreadsheet
- On-Call Schedules: on-call-schedule
- On-Call Escalation Policies: on-call-escalation-policy
- On-Call Team Routing Rules: on-call-team-routing-rules

#### Supported relations for resources
Resource Type | Supported Relations
----------------------------|--------------------------
Dashboards | viewer, editor
Integration Services | viewer, editor
Integration Webhooks | viewer, editor
Notebooks | viewer, editor
Powerpacks | viewer, editor
Security Rules | viewer, editor
Service Level Objectives | viewer, editor
Synthetic Global Variables | viewer, editor
Synthetic Tests | viewer, editor
Synthetic Private Locations | viewer, editor
Monitors | viewer, editor
Reference Tables | viewer, editor
Workflows | viewer, runner, editor
App Builder Apps | viewer, editor
Connections | viewer, resolver, editor
Connection Groups | viewer, editor
RUM Application | viewer, editor
Cross Org Connections | viewer, editor
Spreadsheets | viewer, editor
On-Call Schedules | viewer, overrider, editor
On-Call Escalation Policies | viewer, editor
On-Call Team Routing Rules | viewer, editor

REPLACE datadog.organization.restriction_policies
SET
data__data = '{{ data }}'
WHERE
resource_id = '{{ resource_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
AND allow_self_lockout = {{ allow_self_lockout}}
RETURNING
data;

DELETE examples

Deletes the restriction policy associated with a specified resource.

DELETE FROM datadog.organization.restriction_policies
WHERE resource_id = '{{ resource_id }}' --required
AND region = '{{ region }}' --required
;