For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/fr/api/latest/aws-integration/set-an-aws-tag-filter.md. A documentation index is available at /llms.txt.
Language
Datadog site

Définir un filtre de tags AWS

POSThttps://api.datadoghq.com/api/v1/integration/aws/filteringhttps://api.us3.datadoghq.com/api/v1/integration/aws/filteringhttps://api.us5.datadoghq.com/api/v1/integration/aws/filteringhttps://api.datadoghq.eu/api/v1/integration/aws/filteringhttps://api.ap1.datadoghq.com/api/v1/integration/aws/filteringhttps://api.ap2.datadoghq.com/api/v1/integration/aws/filteringhttps://api.uk1.datadoghq.com/api/v1/integration/aws/filteringhttps://api.ddog-gov.com/api/v1/integration/aws/filteringhttps://api.us2.ddog-gov.com/api/v1/integration/aws/filtering

Présentation

Définissez un filtre de tags AWS.

This endpoint requires the aws_configuration_edit permission.

Requête

Body Data (required)

Définissez un filtre de tags AWS à l'aide d'un aws_account_identifier, d'un namespace et d'une chaîne de filtrage. Les options d'espace de nommage sont application_elb, elb, lambda, network_elb, rds, sqs, et custom.

Champ
Type
Description
account_id
string

Les objets utilisés pour définir un filtre de tags AWS.

namespace
enum

The namespace associated with the tag filter entry.

Allowed enum values: elb, application_elb, sqs, rds, custom, network_elb, lambda, step_functions
tag_filter_str
string

The tag filter string.

Réponse

OK

No response body

Exemple de code

Définir un filtre de tags AWS
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF
# 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/v1/integration/aws/filtering" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "account_id": "123456789012",
  "namespace": "elb",
  "tag_filter_str": "prod*"
}
EOF