Skip to content
Start here

[DEPRECATED] Update Pipeline

Deprecated
pipelines.update(strpipeline_name, PipelineUpdateParams**kwargs) -> PipelineUpdateResponse
PUT/accounts/{account_id}/pipelines/{pipeline_name}

[DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Pipelines Write
ParametersExpand Collapse
account_id: str

Specifies the public ID of the account.

pipeline_name: str

Defines the name of the pipeline.

maxLength128
minLength1
destination: Destination
batch: DestinationBatch
max_bytes: Optional[int]

Specifies rough maximum size of files.

maximum100000000
minimum1000
max_duration_s: Optional[float]

Specifies duration to wait to aggregate batches files.

maximum300
minimum0.25
max_rows: Optional[int]

Specifies rough maximum number of rows per file.

maximum10000000
minimum100
compression: DestinationCompression
type: Optional[Literal["none", "gzip", "deflate"]]

Specifies the desired compression algorithm and format.

One of the following:
"none"
"gzip"
"deflate"
format: Literal["json"]

Specifies the format of data to deliver.

path: DestinationPath
bucket: str

Specifies the R2 Bucket to store files.

filename: Optional[str]

Specifies the name pattern to for individual data files.

filepath: Optional[str]

Specifies the name pattern for directory.

prefix: Optional[str]

Specifies the base directory within the bucket.

type: Literal["r2"]

Specifies the type of destination.

credentials: Optional[DestinationCredentials]
access_key_id: str

Specifies the R2 Bucket Access Key Id.

endpoint: str

Specifies the R2 Endpoint.

secret_access_key: str

Specifies the R2 Bucket Secret Access Key.

name: str

Defines the name of the pipeline.

maxLength128
minLength1
source: Iterable[Source]
One of the following:
class SourceCloudflarePipelinesWorkersPipelinesHTTPSource:

[DEPRECATED] HTTP source configuration. Use the new streams API instead.

format: Literal["json"]

Specifies the format of source data.

type: str
authentication: Optional[bool]

Specifies whether authentication is required to send to this pipeline via HTTP.

cors: Optional[SourceCloudflarePipelinesWorkersPipelinesHTTPSourceCORS]
origins: Optional[SequenceNotStr[str]]

Specifies allowed origins to allow Cross Origin HTTP Requests.

class SourceCloudflarePipelinesWorkersPipelinesBindingSource:

[DEPRECATED] Worker binding source configuration. Use the new streams API instead.

format: Literal["json"]

Specifies the format of source data.

type: str
ReturnsExpand Collapse
class PipelineUpdateResponse:

[DEPRECATED] Describes the configuration of a pipeline. Use the new streams/sinks/pipelines API instead.

id: str

Specifies the pipeline identifier.

destination: Destination
batch: DestinationBatch
max_bytes: int

Specifies rough maximum size of files.

maximum100000000
minimum1000
max_duration_s: float

Specifies duration to wait to aggregate batches files.

maximum300
minimum0.25
max_rows: int

Specifies rough maximum number of rows per file.

maximum10000000
minimum100
compression: DestinationCompression
type: Literal["none", "gzip", "deflate"]

Specifies the desired compression algorithm and format.

One of the following:
"none"
"gzip"
"deflate"
format: Literal["json"]

Specifies the format of data to deliver.

path: DestinationPath
bucket: str

Specifies the R2 Bucket to store files.

filename: Optional[str]

Specifies the name pattern to for individual data files.

filepath: Optional[str]

Specifies the name pattern for directory.

prefix: Optional[str]

Specifies the base directory within the bucket.

type: Literal["r2"]

Specifies the type of destination.

endpoint: str

Indicates the endpoint URL to send traffic.

name: str

Defines the name of the pipeline.

maxLength128
minLength1
source: List[Source]
One of the following:
class SourceCloudflarePipelinesWorkersPipelinesHTTPSource:

[DEPRECATED] HTTP source configuration. Use the new streams API instead.

format: Literal["json"]

Specifies the format of source data.

type: str
authentication: Optional[bool]

Specifies whether authentication is required to send to this pipeline via HTTP.

cors: Optional[SourceCloudflarePipelinesWorkersPipelinesHTTPSourceCORS]
origins: Optional[List[str]]

Specifies allowed origins to allow Cross Origin HTTP Requests.

class SourceCloudflarePipelinesWorkersPipelinesBindingSource:

[DEPRECATED] Worker binding source configuration. Use the new streams API instead.

format: Literal["json"]

Specifies the format of source data.

type: str
version: float

Indicates the version number of last saved configuration.

[DEPRECATED] Update Pipeline

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
pipeline = client.pipelines.update(
    pipeline_name="sample_pipeline",
    account_id="0123105f4ecef8ad9ca31a8372d0c353",
    destination={
        "batch": {},
        "compression": {},
        "format": "json",
        "path": {
            "bucket": "bucket"
        },
        "type": "r2",
    },
    name="sample_pipeline",
    source=[{
        "format": "json",
        "type": "type",
    }],
)
print(pipeline.id)
{
  "result": {
    "id": "123f8a8258064ed892a347f173372359",
    "destination": {
      "batch": {
        "max_bytes": 1000,
        "max_duration_s": 0.25,
        "max_rows": 100
      },
      "compression": {
        "type": "gzip"
      },
      "format": "json",
      "path": {
        "bucket": "bucket",
        "filename": "${slug}${extension}",
        "filepath": "${date}/${hour}",
        "prefix": "base"
      },
      "type": "r2"
    },
    "endpoint": "https://123f8a8258064ed892a347f173372359.pipelines.cloudflare.com",
    "name": "sample_pipeline",
    "source": [
      {
        "format": "json",
        "type": "type",
        "authentication": true,
        "cors": {
          "origins": [
            "*"
          ]
        }
      }
    ],
    "version": 2
  },
  "success": true
}
Returns Examples
{
  "result": {
    "id": "123f8a8258064ed892a347f173372359",
    "destination": {
      "batch": {
        "max_bytes": 1000,
        "max_duration_s": 0.25,
        "max_rows": 100
      },
      "compression": {
        "type": "gzip"
      },
      "format": "json",
      "path": {
        "bucket": "bucket",
        "filename": "${slug}${extension}",
        "filepath": "${date}/${hour}",
        "prefix": "base"
      },
      "type": "r2"
    },
    "endpoint": "https://123f8a8258064ed892a347f173372359.pipelines.cloudflare.com",
    "name": "sample_pipeline",
    "source": [
      {
        "format": "json",
        "type": "type",
        "authentication": true,
        "cors": {
          "origins": [
            "*"
          ]
        }
      }
    ],
    "version": 2
  },
  "success": true
}