For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ja/api/latest/logs-pipelines/update-a-pipeline.md. A documentation index is available at /llms.txt.
Language
Datadog site

パイプラインを更新する

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}

概要

特定のパイプライン構成を更新して、プロセッサやその順序を変更します。

注: このメソッドを使用すると、Datadog 組織に送信された新しい構成で現在の構成が置き換えられることで、 パイプライン構成が更新されます。

This endpoint requires the logs_write_pipelines permission.

引数

パスパラメーター

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

ID of the pipeline to delete.

リクエスト

Body Data (required)

パイプラインの新しい定義。

フィールド
タイプ
説明
description
string

パイプラインとプロセッサは、受信したログを処理し、 解析して構造化された属性に変換することで、クエリを容易にします。

注: これらのエンドポイントは管理者ユーザーのみが利用できます。 管理者が作成したアプリケーションキーを使用してください。

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.

応答

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.

フィールド
タイプ
説明
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.

コード例

パイプラインを更新する
# 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