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. (restriction_policy) (default: restriction_policy, example: restriction_policy)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_restriction_policyselectresource_idRetrieves the restriction policy associated with a specified resource.
update_restriction_policyreplaceresource_id, dataallow_self_lockoutUpdates the restriction policy associated with a resource.<br /><br />#### Supported resources<br />Restriction policies can be applied to the following resources:<br />- Dashboards: dashboard<br />- Integration Services: integration-service<br />- Integration Webhooks: integration-webhook<br />- Notebooks: notebook<br />- Powerpacks: powerpack<br />- Reference Tables: reference-table<br />- Security Rules: security-rule<br />- Service Level Objectives: slo<br />- Synthetic Global Variables: synthetics-global-variable<br />- Synthetic Tests: synthetics-test<br />- Synthetic Private Locations: synthetics-private-location<br />- Monitors: monitor<br />- Workflows: workflow<br />- App Builder Apps: app-builder-app<br />- Connections: connection<br />- Connection Groups: connection-group<br />- RUM Applications: rum-application<br />- Cross Org Connections: cross-org-connection<br />- Spreadsheets: spreadsheet<br />- On-Call Schedules: on-call-schedule<br />- On-Call Escalation Policies: on-call-escalation-policy<br />- On-Call Team Routing Rules: on-call-team-routing-rules<br />- Logs Pipelines: logs-pipeline<br />- Case Management Projects: case-management-project<br />- Monitor Notification Rules: monitor-notification-rule<br />- Status Pages: status-page<br />- Feature Flags: feature-flag<br /><br />#### Supported relations for resources<br />Resource Type | Supported Relations<br />----------------------------|--------------------------<br />Dashboards | viewer, editor<br />Integration Services | viewer, editor<br />Integration Webhooks | viewer, editor<br />Notebooks | viewer, editor<br />Powerpacks | viewer, editor<br />Security Rules | viewer, editor<br />Service Level Objectives | viewer, editor<br />Synthetic Global Variables | viewer, editor<br />Synthetic Tests | viewer, editor<br />Synthetic Private Locations | viewer, editor<br />Monitors | viewer, editor<br />Reference Tables | viewer, editor<br />Workflows | viewer, runner, editor<br />App Builder Apps | viewer, editor<br />Connections | viewer, resolver, editor<br />Connection Groups | viewer, editor<br />RUM Application | viewer, editor<br />Cross Org Connections | viewer, editor<br />Spreadsheets | viewer, editor<br />On-Call Schedules | viewer, overrider, editor<br />On-Call Escalation Policies | viewer, editor<br />On-Call Team Routing Rules | viewer, editor<br />Logs Pipelines | viewer, processors_editor, editor<br />Case Management Projects | viewer, contributor, manager<br />Monitor Notification Rules | viewer, editor<br />Status Pages | viewer, responder, manager<br />Feature Flags | viewer, contributor, editor
delete_restriction_policydeleteresource_idDeletes 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
resource_idstringIdentifier, formatted as type:id. Supported types: dashboard, integration-service, integration-webhook, notebook, powerpack, reference-table, security-rule, slo, synthetics-global-variable, synthetics-test, synthetics-private-location, monitor, 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, logs-pipeline, case-management-project, monitor-notification-rule, status-page, feature-flag. (example: dashboard:abc-def-ghi)
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.
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
;

REPLACE examples

Updates the restriction policy associated with a resource.<br /><br />#### Supported resources<br />Restriction policies can be applied to the following resources:<br />- Dashboards: dashboard<br />- Integration Services: integration-service<br />- Integration Webhooks: integration-webhook<br />- Notebooks: notebook<br />- Powerpacks: powerpack<br />- Reference Tables: reference-table<br />- Security Rules: security-rule<br />- Service Level Objectives: slo<br />- Synthetic Global Variables: synthetics-global-variable<br />- Synthetic Tests: synthetics-test<br />- Synthetic Private Locations: synthetics-private-location<br />- Monitors: monitor<br />- Workflows: workflow<br />- App Builder Apps: app-builder-app<br />- Connections: connection<br />- Connection Groups: connection-group<br />- RUM Applications: rum-application<br />- Cross Org Connections: cross-org-connection<br />- Spreadsheets: spreadsheet<br />- On-Call Schedules: on-call-schedule<br />- On-Call Escalation Policies: on-call-escalation-policy<br />- On-Call Team Routing Rules: on-call-team-routing-rules<br />- Logs Pipelines: logs-pipeline<br />- Case Management Projects: case-management-project<br />- Monitor Notification Rules: monitor-notification-rule<br />- Status Pages: status-page<br />- Feature Flags: feature-flag<br /><br />#### Supported relations for resources<br />Resource Type | Supported Relations<br />----------------------------|--------------------------<br />Dashboards | viewer, editor<br />Integration Services | viewer, editor<br />Integration Webhooks | viewer, editor<br />Notebooks | viewer, editor<br />Powerpacks | viewer, editor<br />Security Rules | viewer, editor<br />Service Level Objectives | viewer, editor<br />Synthetic Global Variables | viewer, editor<br />Synthetic Tests | viewer, editor<br />Synthetic Private Locations | viewer, editor<br />Monitors | viewer, editor<br />Reference Tables | viewer, editor<br />Workflows | viewer, runner, editor<br />App Builder Apps | viewer, editor<br />Connections | viewer, resolver, editor<br />Connection Groups | viewer, editor<br />RUM Application | viewer, editor<br />Cross Org Connections | viewer, editor<br />Spreadsheets | viewer, editor<br />On-Call Schedules | viewer, overrider, editor<br />On-Call Escalation Policies | viewer, editor<br />On-Call Team Routing Rules | viewer, editor<br />Logs Pipelines | viewer, processors_editor, editor<br />Case Management Projects | viewer, contributor, manager<br />Monitor Notification Rules | viewer, editor<br />Status Pages | viewer, responder, manager<br />Feature Flags | viewer, contributor, editor

REPLACE datadog.organization.restriction_policies
SET
data = '{{ data }}'
WHERE
resource_id = '{{ resource_id }}' --required
AND 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
;