---
title: "POST /v1b3/projects/{projectId}/templates:launch"
method: POST
path: "/v1b3/projects/{projectId}/templates:launch"
tags: ["projects"]
---

# POST /v1b3/projects/{projectId}/templates:launch

`POST /v1b3/projects/{projectId}/templates:launch`

Launches a template. To launch a template, we recommend using `projects.locations.templates.launch` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.launch` is not recommended, because jobs launched from the template will always start in `us-central1`.

## Path parameters

- `projectId` string, required

## Query parameters

- `dynamicTemplate.gcsPath` string
- `dynamicTemplate.stagingLocation` string
- `gcsPath` string
- `location` string
- `validateOnly` boolean

## Request body

- LaunchTemplateParameters — Parameters to provide to the template being launched. Note that the [metadata in the pipeline code] (https://cloud.google.com/dataflow/docs/guides/templates/creating-templates#metadata) determines which runtime parameters are valid.
  - `parameters` object — The runtime parameters to pass to the job.
  - `update` boolean — If set, replace the existing pipeline with the name specified by jobName with this pipeline, preserving state.
  - `transformNameMapping` object — Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.
  - `environment` RuntimeEnvironment — The environment values to set at runtime.
    - `maxWorkers` integer — Optional. The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000. The default value is 1.
    - `machineType` string — Optional. The machine type to use for the job. Defaults to the value from the template if not specified.
    - `kmsKeyName` string — Optional. Name for the Cloud KMS key for the job. Key format is: projects//locations//keyRings//cryptoKeys/
    - `workerRegion` string — Required. 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.
    - `tempLocation` string — Required. The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`.
    - `additionalUserLabels` object — Optional. 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" }.
    - `serviceAccountEmail` string — Optional. The email address of the service account to run the job as.
    - `workerZone` string — Optional. 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.
    - `network` string — Optional. Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
    - `subnetwork` string — Optional. 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.
    - `enableStreamingEngine` boolean — Optional. Whether to enable Streaming Engine for the job.
    - `ipConfiguration` 'WORKER_IP_UNSPECIFIED' | 'WORKER_IP_PUBLIC' | 'WORKER_IP_PRIVATE' — Optional. Configuration for VM IPs.
    - `zone` string — Optional. 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.
    - `streamingMode` 'STREAMING_MODE_UNSPECIFIED' | 'STREAMING_MODE_EXACTLY_ONCE' | 'STREAMING_MODE_AT_LEAST_ONCE' — Optional. Specifies the Streaming Engine message processing guarantees. Reduces cost and latency but might result in duplicate messages committed to storage. Designed to run simple mapping streaming ETL jobs at the lowest cost. For example, Change Data Capture (CDC) to BigQuery is a canonical use case. For more information, see [Set the pipeline streaming mode](https://cloud.google.com/dataflow/docs/guides/streaming-modes).
    - `additionalPipelineOptions` string[] — Optional. Additional pipeline option flags for the job.
    - `additionalExperiments` string[] — Optional. Additional experiment flags for the job, specified with the `--experiments` option.
    - `diskSizeGb` integer — Optional. The disk size, in gigabytes, to use on each remote Compute Engine worker instance.
    - `numWorkers` integer — Optional. The initial number of Google Compute Engine instances for the job. The default value is 11.
    - `bypassTempDirValidation` boolean — Optional. Whether to bypass the safety checks for the job's temporary directory. Use with caution.
  - `jobName` string — Required. The job name to use for the created job. The name must match the regular expression `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?`

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/dataflow.md) · [All operations](https://skmtc.net/google/apis/dataflow/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/dataflow/versions/f065de7a0dba/schema)
