For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/metrics/create-a-tag-indexing-rule-exemption.md. A documentation index is available at /llms.txt.
Language
Datadog site

태그 인덱싱 규칙 예외 만들기

경고Note: The Tag Indexing Rules feature is currently in Preview. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.us3.datadoghq.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.us5.datadoghq.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.datadoghq.eu/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.ap1.datadoghq.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.ap2.datadoghq.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.uk1.datadoghq.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.ddog-gov.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptionshttps://api.us2.ddog-gov.com/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions

개요

모든 태그 인덱싱 규칙에서 메트릭을 제외합니다. 응답에는 생성된 예외 리소스가 포함됩니다. Manage Tags for Metrics 권한이 필요합니다.

This endpoint requires the metric_tags_write permission.

OAuth apps require the metric_tags_write authorization scope to access this endpoint.

인수

경로 파라미터

이름
유형
설명
metric_name [required]
string

The name of the metric.

요청

Body Data (required)

항목
유형
설명
data [required]
object

태그 인덱싱 규칙 예외를 생성하기 위한 요청 본문입니다.

응답

Created

Response containing a tag indexing rule exemption.

항목
유형
설명
data
object

A tag indexing rule exemption resource object.

코드 예시

태그 인덱싱 규칙 예외 만들기
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF
# Path parameters
export metric_name="dist.http.endpoint.request"

# 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/metrics/${metric_name}/tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "reason": "This metric has a pre-existing tag configuration."
    },
    "type": "tag_indexing_rule_exemptions"
  }
}
EOF