For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/ja/api/latest/restriction-policies/update-a-restriction-policy.md. A documentation index is available at /llms.txt.
Language
Datadog site

制限ポリシーの更新

POSThttps://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}https://api.datadoghq.eu/api/v2/restriction_policy/{resource_id}https://api.ap1.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.ap2.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.uk1.datadoghq.com/api/v2/restriction_policy/{resource_id}https://api.ddog-gov.com/api/v2/restriction_policy/{resource_id}https://api.us2.ddog-gov.com/api/v2/restriction_policy/{resource_id}

概要

リソースに関連付けられた制限ポリシーを更新します。

サポートされているリソース

制限ポリシーは、以下のリソースに適用できます。

  • ダッシュボード「dashboard」
  • インテグレーションサービス:「integration-service」
  • Webhook のインテグレーション:「integration-webhook」
  • ノートブック:「notebook」
  • パワーパック:「powerpack」
  • リファレンステーブル:「reference-table」
  • セキュリティルール:「security-rule」
  • Service Level Objectives:「slo」
  • Synthetic グローバル変数:「synthetics-global-variable」
  • Synthetic テスト:「synthetics-test」
  • Synthetic プライベートロケーション:「synthetics-private-location」
  • モニター:「monitor」
  • ワークフロー:「workflow」
  • App Builder アプリ:「app-builder-app」 コネクション:「connection」 コネクショングループ:「connection-group」
  • RUM アプリケーション:「rum-application」 組織間コネクション:「cross-org-connection」
  • スプレッドシート:「spreadsheet」
  • On-Call スケジュール:「on-call-schedule」
  • On-Call エスカレーションポリシー:「on-call-escalation-policy」
  • On-Call チームルーティングルール:「on-call-team-routing-rules」
  • ログパイプライン:「logs-pipeline」 Case Management プロジェクト:「case-management-project」
  • モニター通知ルール:「monitor-notification-rule」
  • ステータスページ:「status-page」
  • Feature Flags:「feature-flag」 Network Path 構成:「network-path-config」

リソースでサポートされている関係

リソースタイプ サポートされている関係
ダッシュボード 「viewer」、「editor」
インテグレーションサービス 「viewer」、「editor」
Webhook のインテグレーション 「viewer」、「editor」
ノートブック 「viewer」、「editor」
パワーパック 「viewer」、「editor」
セキュリティルール 「viewer」、「editor」
Service Level Objectives 「viewer」、「editor」
Synthetic グローバル変数 「viewer」、「editor」
Synthetic テスト 「viewer」、「editor」
Synthetic プライベートロケーション 「viewer」、「editor」
モニター 「viewer」、「editor」
リファレンステーブル 「viewer」、「editor」
ワークフロー 「viewer」、「runner」、「editor」
App Builder アプリ 「viewer」、「editor」
コネクション 「viewer」、「resolver」、「editor」
コネクショングループ 「viewer」、「editor」
RUM アプリケーション 「viewer」、「editor」
組織間コネクション 「viewer」、「editor」
スプレッドシート 「viewer」、「editor」
On-Call スケジュール 「viewer」、「overrider」、「editor」
On-Call エスカレーションポリシー 「viewer」、「editor」
On-Call チームルーティングルール 「viewer」、「editor」
ログパイプライン 「viewer」、「processors_editor」、「editor」
Case Management プロジェクト 「viewer」、「contributor」、「manager」
モニター通知ルール 「viewer」、「editor」
ステータスページ 「viewer」、「responder」、「manager」
Feature Flags 「viewer」、「contributor」、「editor」
Network Path 構成 「viewer」、「editor」

引数

パスパラメーター

名前
タイプ
説明
resource_id [required]
string

Identifier, formatted as type:id. Supported types: ai-gateway-provider, 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, network-path-config.

クエリ文字列

名前
タイプ
説明
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.

リクエスト

Body Data (required)

制限ポリシーペイロード

フィールド
タイプ
説明
data [required]
object

制限ポリシーの更新リクエスト。

応答

OK

Response containing information about a single restriction policy.

フィールド
タイプ
説明
data [required]
object

Restriction policy object.

コード例

Update a restriction policy returns "OK" response
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF
# Path parameters
export resource_id="dashboard:abc-def-ghi"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/restriction_policy/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "dashboard:test-update",
    "type": "restriction_policy",
    "attributes": {
      "bindings": [
        {
          "relation": "editor",
          "principals": [
            "org:00000000-0000-beef-0000-000000000000"
          ]
        }
      ]
    }
  }
}
EOF