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

# PATCH /v1/{+name}

`PATCH /v1/{+name}`

Updates the session template synchronously.

## Path parameters

- `name` string, required

## Request body

- SessionTemplate — A representation of a session template.
  - `name` string — Required. Identifier. The resource name of the session template.
  - `description` string — Optional. Brief description of the template.
  - `sparkConnectSession` SparkConnectConfig — Spark connect configuration for an interactive session.
  - `creator` string — Output only. The email address of the user who created the template.
  - `labels` object — Optional. Labels to associate with sessions created using this template. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty, but, if present, must contain 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a session.
  - `runtimeConfig` RuntimeConfig — Runtime configuration for a workload.
    - `properties` object — Optional. A mapping of property names to values, which are used to configure workload execution.
    - `cohort` string — Optional. Cohort identifier. Identifies families of the workloads that have the same shape, for example, daily ETL jobs.
    - `autotuningConfig` AutotuningConfig — Autotuning configuration of the workload.
      - `scenarios` string[] — Optional. Scenarios for which tunings are applied.
    - `version` string — Optional. Version of the batch runtime.
    - `containerImage` string — Optional. Optional custom container image for the job runtime environment. If not specified, a default container image will be used.
    - `repositoryConfig` RepositoryConfig — Configuration for dependency repositories
      - `pypiRepositoryConfig` PyPiRepositoryConfig — Configuration for PyPi repository
        - `pypiRepository` string — Optional. The PyPi repository address. Note: This field is not available for batch workloads.
  - `createTime` string, google-datetime — Output only. The time when the template was created.
  - `jupyterSession` JupyterConfig — Jupyter configuration for an interactive session.
    - `kernel` 'KERNEL_UNSPECIFIED' | 'PYTHON' | 'SCALA' — Optional. Kernel
    - `displayName` string — Optional. Display name, shown in the Jupyter kernelspec card.
  - `environmentConfig` EnvironmentConfig — Environment configuration for a workload.
    - `executionConfig` ExecutionConfig — Execution configuration for a workload.
      - `authenticationConfig` AuthenticationConfig — Authentication configuration for a workload is used to set the default identity for the workload execution. The config specifies the type of identity (service account or user) that will be used by workloads to access resources on the project(s).
        - `userWorkloadAuthenticationType` 'AUTHENTICATION_TYPE_UNSPECIFIED' | 'SERVICE_ACCOUNT' | 'END_USER_CREDENTIALS' — Optional. Authentication type for the user workload running in containers.
      - `resourceManagerTags` object — Optional. Associates Resource Manager tags with the workload nodes. There is a max limit of 30 tags. Keys and values can be either in numeric format, such as tagKeys/{tag_key_id} and tagValues/{tag_value_id}, or in namespaced format, such as {org_id|project_id}/{tag_key_short_name} and {tag_value_short_name}.
      - `subnetworkUri` string — Optional. Subnetwork URI to connect workload to.
      - `stagingBucket` string — Optional. A Cloud Storage bucket used to stage workload dependencies, config files, and store workload output and other ephemeral data, such as Spark history files. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location according to the region where your workload is running, and then create and manage project-level, per-location staging and temporary buckets. This field requires a Cloud Storage bucket name, not a gs://... URI to a Cloud Storage bucket.
      - `networkTags` string[] — Optional. Tags used for network traffic control.
      - `networkUri` string — Optional. Network URI to connect workload to.
      - `kmsKey` string — Optional. The Cloud KMS key to use for encryption.
      - `serviceAccount` string — Optional. Service account that used to execute workload.
      - `ttl` string, google-duration — Optional. The duration after which the workload will be terminated, specified as the JSON representation for Duration (https://protobuf.dev/programming-guides/proto3/#json). When the workload exceeds this duration, it will be unconditionally terminated without waiting for ongoing work to finish. If ttl is not specified for a batch workload, the workload will be allowed to run until it exits naturally (or run forever without exiting). If ttl is not specified for an interactive session, it defaults to 24 hours. If ttl is not specified for a batch that uses 2.1+ runtime version, it defaults to 4 hours. Minimum value is 10 minutes; maximum value is 14 days. If both ttl and idle_ttl are specified (for an interactive session), the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first.
      - `idleTtl` string, google-duration — Optional. Applies to sessions only. The duration to keep the session alive while it's idling. Exceeding this threshold causes the session to terminate. This field cannot be set on a batch workload. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 1 hour if not set. If both ttl and idle_ttl are specified for an interactive session, the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first.
    - `peripheralsConfig` PeripheralsConfig — Auxiliary services configuration for a workload.
      - `metastoreService` string — Optional. Resource name of an existing Dataproc Metastore service.Example: projects/[project_id]/locations/[region]/services/[service_id]
      - `sparkHistoryServerConfig` SparkHistoryServerConfig — Spark History Server configuration for the workload.
        - `dataprocCluster` string — Optional. Resource name of an existing Dataproc Cluster to act as a Spark History Server for the workload.Example: projects/[project_id]/regions/[region]/clusters/[cluster_name]
  - `updateTime` string, google-datetime — Output only. The time the template was last updated.
  - `uuid` string — Output only. A session template UUID (Unique Universal Identifier). The service generates this value when it creates the session template.

## Response `200`

Successful response

---

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