For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/fr/api/latest/logs-pipelines/update-a-pipeline.md. A documentation index is available at /llms.txt.
Language
Datadog site

Mettre à jour un pipeline

PUThttps://api.datadoghq.com/api/v1/logs/config/pipelines/{pipeline_id}https://api.us3.datadoghq.com/api/v1/logs/config/pipelines/{pipeline_id}https://api.us5.datadoghq.com/api/v1/logs/config/pipelines/{pipeline_id}https://api.datadoghq.eu/api/v1/logs/config/pipelines/{pipeline_id}https://api.ap1.datadoghq.com/api/v1/logs/config/pipelines/{pipeline_id}https://api.ap2.datadoghq.com/api/v1/logs/config/pipelines/{pipeline_id}https://api.uk1.datadoghq.com/api/v1/logs/config/pipelines/{pipeline_id}https://api.ddog-gov.com/api/v1/logs/config/pipelines/{pipeline_id}https://api.us2.ddog-gov.com/api/v1/logs/config/pipelines/{pipeline_id}

Présentation

Mettez à jour une configuration de pipeline donnée pour modifier ses processeurs ou sa séquence.

Remarque : cette méthode permet de mettre à jour la configuration de votre pipeline en remplaçant votre configuration actuelle par la nouvelle, envoyée à votre organisation Datadog.

This endpoint requires the logs_write_pipelines permission.

Arguments

Paramètres du chemin

Name
Type
Description
pipeline_id [required]
string

ID of the pipeline to delete.

Requête

Body Data (required)

Nouvelle définition du pipeline.

Champ
Type
Description
description
string

Les pipelines et les processeurs fonctionnent sur les logs entrants : ils effectuent le parsing de ces logs et les transforment en attributs structurés pour faciliter les requêtes.

Remarque : ces endpoints sont uniquement disponibles pour les utilisateurs admin. Veillez à utiliser une clé d'application créée par un admin.

filter
object

Filter for logs.

is_enabled
boolean

Whether or not the pipeline is enabled.

name [required]
string

Name of the pipeline.

processors
[<oneOf>]

Ordered list of processors in this pipeline.

tags
[string]

A list of tags associated with the pipeline.

Réponse

OK

Pipelines and processors operate on incoming logs, parsing and transforming them into structured attributes for easier querying.

Note: These endpoints are only available for admin users. Make sure to use an application key created by an admin.

Champ
Type
Description
description
string

A description of the pipeline.

filter
object

Filter for logs.

id
string

ID of the pipeline.

is_enabled
boolean

Whether or not the pipeline is enabled.

is_read_only
boolean

Whether or not the pipeline can be edited.

name [required]
string

Name of the pipeline.

processors
[<oneOf>]

Ordered list of processors in this pipeline.

tags
[string]

A list of tags associated with the pipeline.

type
string

Type of pipeline.

Exemple de code

Mettre à jour un pipeline
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF
# Path parameters
export pipeline_id="CHANGE_ME"

# 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/v1/logs/config/pipelines/${pipeline_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "filter": {
    "query": "source:python"
  },
  "is_enabled": true,
  "name": "My Pipeline",
  "processors": []
}
EOF