- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
A restriction policy defines the access control rules for a resource, mapping a set of relations (such as editor and viewer) to a set of allowed principals (such as roles, teams, or users). The restriction policy determines who is authorized to perform what actions on the resource.
POST https://api.ap1.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.datadoghq.eu/api/v2/restriction_policy/{resource_id}https://api.ddog-gov.com/api/v2/restriction_policy/{resource_id}https://api.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.us3.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.us5.datadoghq.com/api/v2/restriction_policy/{resource_id}
Updates the restriction policy associated with a resource.
Restriction policies can be applied to the following resources:
dashboard
notebook
powerpack
reference-table
security-rule
slo
synthetics-global-variable
synthetics-test
synthetics-private-location
monitor
workflow
app-builder-app
connection
connection-group
Resource Type | Supported Relations |
---|---|
Dashboards | 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 |
이름
유형
설명
resource_id [required]
string
Identifier, formatted as type:id
. Supported types: connection
, dashboard
, notebook
, reference-table
, security-rule
, slo
, workflow
, app-builder-app
, connection
, connection-group
.
이름
유형
설명
allow_self_lockout
boolean
Allows 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.
Restriction policy payload
항목
유형
설명
data [required]
object
Restriction policy object.
attributes [required]
object
Restriction policy attributes.
bindings [required]
[object]
An array of bindings.
principals [required]
[string]
An array of principals. A principal is a subject or group of subjects.
Each principal is formatted as type:id
. Supported types: role
, team
, user
, and org
.
The org ID can be obtained through the api/v2/current_user API.
The user principal type accepts service account IDs.
relation [required]
string
The role/level of access.
id [required]
string
The identifier, always equivalent to the value specified in the resource_id
path parameter.
type [required]
enum
Restriction policy type.
Allowed enum values: restriction_policy
default: restriction_policy
{
"data": {
"id": "dashboard:test-update",
"type": "restriction_policy",
"attributes": {
"bindings": [
{
"relation": "editor",
"principals": [
"org:00000000-0000-beef-0000-000000000000"
]
}
]
}
}
}
OK
Response containing information about a single restriction policy.
항목
유형
설명
data [required]
object
Restriction policy object.
attributes [required]
object
Restriction policy attributes.
bindings [required]
[object]
An array of bindings.
principals [required]
[string]
An array of principals. A principal is a subject or group of subjects.
Each principal is formatted as type:id
. Supported types: role
, team
, user
, and org
.
The org ID can be obtained through the api/v2/current_user API.
The user principal type accepts service account IDs.
relation [required]
string
The role/level of access.
id [required]
string
The identifier, always equivalent to the value specified in the resource_id
path parameter.
type [required]
enum
Restriction policy type.
Allowed enum values: restriction_policy
default: restriction_policy
{
"data": {
"attributes": {
"bindings": [
{
"principals": [
"role:00000000-0000-1111-0000-000000000000"
],
"relation": "editor"
}
]
},
"id": "dashboard:abc-def-ghi",
"type": "restriction_policy"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Update a restriction policy returns "OK" response
require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RestrictionPoliciesAPI.new
# there is a valid "user" in the system
USER_DATA_RELATIONSHIPS_ORG_DATA_ID = ENV["USER_DATA_RELATIONSHIPS_ORG_DATA_ID"]
body = DatadogAPIClient::V2::RestrictionPolicyUpdateRequest.new({
data: DatadogAPIClient::V2::RestrictionPolicy.new({
id: "dashboard:test-update",
type: DatadogAPIClient::V2::RestrictionPolicyType::RESTRICTION_POLICY,
attributes: DatadogAPIClient::V2::RestrictionPolicyAttributes.new({
bindings: [
DatadogAPIClient::V2::RestrictionPolicyBinding.new({
relation: "editor",
principals: [
"org:00000000-0000-beef-0000-000000000000",
],
}),
],
}),
}),
})
p api_instance.update_restriction_policy("dashboard:test-update", body)
First install the library and its dependencies and then save the example to example.rb
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
GET https://api.ap1.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.datadoghq.eu/api/v2/restriction_policy/{resource_id}https://api.ddog-gov.com/api/v2/restriction_policy/{resource_id}https://api.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.us3.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.us5.datadoghq.com/api/v2/restriction_policy/{resource_id}
Retrieves the restriction policy associated with a specified resource.
이름
유형
설명
resource_id [required]
string
Identifier, formatted as type:id
. Supported types: connection
, dashboard
, notebook
, reference-table
, security-rule
, slo
, workflow
, app-builder-app
, connection
, connection-group
.
OK
Response containing information about a single restriction policy.
항목
유형
설명
data [required]
object
Restriction policy object.
attributes [required]
object
Restriction policy attributes.
bindings [required]
[object]
An array of bindings.
principals [required]
[string]
An array of principals. A principal is a subject or group of subjects.
Each principal is formatted as type:id
. Supported types: role
, team
, user
, and org
.
The org ID can be obtained through the api/v2/current_user API.
The user principal type accepts service account IDs.
relation [required]
string
The role/level of access.
id [required]
string
The identifier, always equivalent to the value specified in the resource_id
path parameter.
type [required]
enum
Restriction policy type.
Allowed enum values: restriction_policy
default: restriction_policy
{
"data": {
"attributes": {
"bindings": [
{
"principals": [
"role:00000000-0000-1111-0000-000000000000"
],
"relation": "editor"
}
]
},
"id": "dashboard:abc-def-ghi",
"type": "restriction_policy"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Get a restriction policy returns "OK" response
require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RestrictionPoliciesAPI.new
p api_instance.get_restriction_policy("dashboard:test-get")
First install the library and its dependencies and then save the example to example.rb
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
DELETE https://api.ap1.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.datadoghq.eu/api/v2/restriction_policy/{resource_id}https://api.ddog-gov.com/api/v2/restriction_policy/{resource_id}https://api.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.us3.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.us5.datadoghq.com/api/v2/restriction_policy/{resource_id}
Deletes the restriction policy associated with a specified resource.
이름
유형
설명
resource_id [required]
string
Identifier, formatted as type:id
. Supported types: connection
, dashboard
, notebook
, reference-table
, security-rule
, slo
, workflow
, app-builder-app
, connection
, connection-group
.
No Content
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Delete a restriction policy returns "No Content" response
require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RestrictionPoliciesAPI.new
api_instance.delete_restriction_policy("dashboard:test-delete")
First install the library and its dependencies and then save the example to example.rb
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"