---
title: "PATCH /v1/{+name}"
method: PATCH
path: "/v1/{+name}"
tags: ["projects"]
---

# PATCH /v1/{+name}

`PATCH /v1/{+name}`

Updates a pipeline. If successful, the updated Pipeline is returned. Returns `NOT_FOUND` if the pipeline doesn't exist. If UpdatePipeline does not return successfully, you can retry the UpdatePipeline request until you receive a successful response.

## Path parameters

- `name` string, required

## Query parameters

- `updateMask` string

## Request body

- GoogleCloudDatapipelinesV1Pipeline — The main pipeline entity and all the necessary metadata for launching and managing linked jobs.
  - `type` 'PIPELINE_TYPE_UNSPECIFIED' | 'PIPELINE_TYPE_BATCH' | 'PIPELINE_TYPE_STREAMING' — Required. The type of the pipeline. This field affects the scheduling of the pipeline and the type of metrics to show for the pipeline.
  - `scheduleInfo` GoogleCloudDatapipelinesV1ScheduleSpec — Details of the schedule the pipeline runs on.
    - `schedule` string — Unix-cron format of the schedule. This information is retrieved from the linked Cloud Scheduler.
    - `timeZone` string — Timezone ID. This matches the timezone IDs used by the Cloud Scheduler API. If empty, UTC time is assumed.
    - `nextJobTime` string, google-datetime — Output only. When the next Scheduler job is going to run.
  - `createTime` string, google-datetime — Output only. Immutable. The timestamp when the pipeline was initially created. Set by the Data Pipelines service.
  - `name` string — The pipeline name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID`. * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), and periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects). * `LOCATION_ID` is the canonical ID for the pipeline's location. The list of available locations can be obtained by calling `google.cloud.location.Locations.ListLocations`. Note that the Data Pipelines service is not available in all regions. It depends on Cloud Scheduler, an App Engine application, so it's only available in [App Engine regions](https://cloud.google.com/about/locations#region). * `PIPELINE_ID` is the ID of the pipeline. Must be unique for the selected project and location.
  - `displayName` string — Required. The display name of the pipeline. It can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), and underscores (_).
  - `pipelineSources` object — Immutable. The sources of the pipeline (for example, Knowledge Catalog). The keys and values are set by the corresponding sources during pipeline creation.
  - `workload` GoogleCloudDatapipelinesV1Workload — Workload details for creating the pipeline jobs.
    - `dataflowLaunchTemplateRequest` GoogleCloudDatapipelinesV1LaunchTemplateRequest — A request to launch a template.
      - `validateOnly` boolean — If true, the request is validated but not actually executed. Defaults to false.
      - `launchParameters` GoogleCloudDatapipelinesV1LaunchTemplateParameters — Parameters to provide to the template being launched.
        - `update` boolean — If set, replace the existing pipeline with the name specified by jobName with this pipeline, preserving state.
        - `parameters` object — The runtime parameters to pass to the job.
        - `jobName` string — Required. The job name to use for the created job.
        - `environment` GoogleCloudDatapipelinesV1RuntimeEnvironment — The environment values to set at runtime.
          - `workerRegion` string — The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with worker_zone. If neither worker_region nor worker_zone is specified, default to the control plane's region.
          - `serviceAccountEmail` string — The email address of the service account to run the job as.
          - `network` string — Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
          - `machineType` string — The machine type to use for the job. Defaults to the value from the template if not specified.
          - `ipConfiguration` 'WORKER_IP_UNSPECIFIED' | 'WORKER_IP_PUBLIC' | 'WORKER_IP_PRIVATE' — Configuration for VM IPs.
          - `maxWorkers` integer — The maximum number of Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.
          - `enableStreamingEngine` boolean — Whether to enable Streaming Engine for the job.
          - `zone` string — The Compute Engine [availability zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) for launching worker instances to run your pipeline. In the future, worker_zone will take precedence.
          - `additionalExperiments` string[] — Additional experiment flags for the job.
          - `tempLocation` string — The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`.
          - `bypassTempDirValidation` boolean — Whether to bypass the safety checks for the job's temporary directory. Use with caution.
          - `additionalUserLabels` object — Additional user labels to be specified for the job. Keys and values should follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) page. An object containing a list of key/value pairs. Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
          - `subnetwork` string — Subnetwork to which VMs will be assigned, if desired. You can specify a subnetwork using either a complete URL or an abbreviated path. Expected to be of the form "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in a Shared VPC network, you must use the complete URL.
          - `kmsKeyName` string — Name for the Cloud KMS key for the job. The key format is: projects//locations//keyRings//cryptoKeys/
          - `workerZone` string — The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with worker_region. If neither worker_region nor worker_zone is specified, a zone in the control plane's region is chosen based on available capacity. If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
          - `numWorkers` integer — The initial number of Compute Engine instances for the job.
        - `transformNameMapping` object — Map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. Only applicable when updating a pipeline.
      - `projectId` string — Required. The ID of the Cloud Platform project that the job belongs to.
      - `gcsPath` string — A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with 'gs://'.
      - `location` string — The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.
    - `dataflowFlexTemplateRequest` GoogleCloudDatapipelinesV1LaunchFlexTemplateRequest — A request to launch a Dataflow job from a Flex Template.
      - `location` string — Required. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request. For example, `us-central1`, `us-west1`.
      - `validateOnly` boolean — If true, the request is validated but not actually executed. Defaults to false.
      - `projectId` string — Required. The ID of the Cloud Platform project that the job belongs to.
      - `launchParameter` GoogleCloudDatapipelinesV1LaunchFlexTemplateParameter — Launch Flex Template parameter.
        - `containerSpecGcsPath` string — Cloud Storage path to a file with a JSON-serialized ContainerSpec as content.
        - `parameters` object — The parameters for the Flex Template. Example: `{"num_workers":"5"}`
        - `update` boolean — Set this to true if you are sending a request to update a running streaming job. When set, the job name should be the same as the running job.
        - `launchOptions` object — Launch options for this Flex Template job. This is a common set of options across languages and templates. This should not be used to pass job parameters.
        - `jobName` string — Required. The job name to use for the created job. For an update job request, the job name should be the same as the existing running job.
        - `environment` GoogleCloudDatapipelinesV1FlexTemplateRuntimeEnvironment — The environment values to be set at runtime for a Flex Template.
          - `network` string — Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
          - `serviceAccountEmail` string — The email address of the service account to run the job as.
          - `workerRegion` string — The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with worker_zone. If neither worker_region nor worker_zone is specified, defaults to the control plane region.
          - `zone` string — The Compute Engine [availability zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) for launching worker instances to run your pipeline. In the future, worker_zone will take precedence.
          - `additionalExperiments` string[] — Additional experiment flags for the job.
          - `machineType` string — The machine type to use for the job. Defaults to the value from the template if not specified.
          - `maxWorkers` integer — The maximum number of Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.
          - `enableStreamingEngine` boolean — Whether to enable Streaming Engine for the job.
          - `ipConfiguration` 'WORKER_IP_UNSPECIFIED' | 'WORKER_IP_PUBLIC' | 'WORKER_IP_PRIVATE' — Configuration for VM IPs.
          - `flexrsGoal` 'FLEXRS_UNSPECIFIED' | 'FLEXRS_SPEED_OPTIMIZED' | 'FLEXRS_COST_OPTIMIZED' — Set FlexRS goal for the job. https://cloud.google.com/dataflow/docs/guides/flexrs
          - `additionalUserLabels` object — Additional user labels to be specified for the job. Keys and values must follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions). An object containing a list of key/value pairs. Example: `{ "name": "wrench", "mass": "1kg", "count": "3" }`.
          - `tempLocation` string — The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`.
          - `numWorkers` integer — The initial number of Compute Engine instances for the job.
          - `kmsKeyName` string — Name for the Cloud KMS key for the job. Key format is: projects//locations//keyRings//cryptoKeys/
          - `workerZone` string — The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with worker_region. If neither worker_region nor worker_zone is specified, a zone in the control plane region is chosen based on available capacity. If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
          - `subnetwork` string — Subnetwork to which VMs will be assigned, if desired. You can specify a subnetwork using either a complete URL or an abbreviated path. Expected to be of the form "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in a Shared VPC network, you must use the complete URL.
        - `transformNameMappings` object — Use this to pass transform name mappings for streaming update jobs. Example: `{"oldTransformName":"newTransformName",...}`
  - `schedulerServiceAccountEmail` string — Optional. A service account email to be used with the Cloud Scheduler job. If not specified, the default compute engine service account will be used.
  - `state` 'STATE_UNSPECIFIED' | 'STATE_RESUMING' | 'STATE_ACTIVE' | 'STATE_STOPPING' | 'STATE_ARCHIVED' | 'STATE_PAUSED' — Required. The state of the pipeline. When the pipeline is created, the state is set to 'PIPELINE_STATE_ACTIVE' by default. State changes can be requested by setting the state to stopping, paused, or resuming. State cannot be changed through UpdatePipeline requests.
  - `jobCount` integer — Output only. Number of jobs.
  - `lastUpdateTime` string, google-datetime — Output only. Immutable. The timestamp when the pipeline was last modified. Set by the Data Pipelines service.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/datapipelines.md) · [All operations](https://skmtc.dev/google/apis/datapipelines/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/datapipelines/revisions/72f107e63427/schema)
