For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/governance-console/update-control-notification-settings.md. A documentation index is available at /llms.txt.
Language
Datadog site

제어 알림 설정 업데이트

경고Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
PUThttps://api.datadoghq.com/api/v2/governance/control/{detection_type}/notification_settingshttps://api.us3.datadoghq.com/api/v2/governance/control/{detection_type}/notification_settingshttps://api.us5.datadoghq.com/api/v2/governance/control/{detection_type}/notification_settingshttps://api.datadoghq.eu/api/v2/governance/control/{detection_type}/notification_settingshttps://api.ap1.datadoghq.com/api/v2/governance/control/{detection_type}/notification_settingshttps://api.ap2.datadoghq.com/api/v2/governance/control/{detection_type}/notification_settingshttps://api.uk1.datadoghq.com/api/v2/governance/control/{detection_type}/notification_settingshttps://api.ddog-gov.com/api/v2/governance/control/{detection_type}/notification_settingshttps://api.us2.ddog-gov.com/api/v2/governance/control/{detection_type}/notification_settings

개요

거버넌스 제어에 대한 알림 설정을 지정된 탐지 유형으로 교체하고, 지원되는 각 이벤트 유형별로 알림 활성화 여부 및 수신 대상을 설정합니다.

This endpoint requires all of the following permissions:

  • governance_console_read
  • governance_console_write

인수

경로 파라미터

이름
유형
설명
detection_type [required]
string

The detection type that identifies the control; for example, unused_api_keys.

요청

Body Data (required)

항목
유형
설명
data [required]
object

거버넌스 제어에 대한 알림 설정을 업데이트하도록 요청합니다.

응답

OK

The notification settings for a governance control.

항목
유형
설명
data [required]
object

A control notification settings resource.

코드 예시

제어 알림 설정 업데이트
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF
# Path parameters
export detection_type="unused_api_keys"

# 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 PUT "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/notification_settings" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "event_settings": [
        {
          "enabled": true,
          "event_type": "new_detection",
          "targets": [
            {
              "handle": "#governance-alerts",
              "type": "slack"
            }
          ]
        }
      ]
    },
    "type": "control_notification_settings"
  }
}
EOF