Updates the session template synchronously.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: dataproc1 --scope <scope> projects locations-session-templates-patch ...

Required Scalar Argument

  • <name> (string)
    • Required. The resource name of the session template.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

SessionTemplate:
  create-time: string
  creator: string
  description: string
  environment-config:
    execution-config:
      idle-ttl: string
      kms-key: string
      network-tags: [string]
      network-uri: string
      service-account: string
      staging-bucket: string
      subnetwork-uri: string
      ttl: string
    peripherals-config:
      metastore-service: string
      spark-history-server-config:
        dataproc-cluster: string
  jupyter-session:
    display-name: string
    kernel: string
  labels: { string: string }
  name: string
  runtime-config:
    container-image: string
    properties: { string: string }
    repository-config:
      pypi-repository-config:
        pypi-repository: string
    version: string
  update-time: string
  uuid: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . create-time=et
    • Output only. The time when the template was created.
  • creator=sea
    • Output only. The email address of the user who created the template.
  • description=consetetur
    • Optional. Brief description of the template.
  • environment-config.execution-config idle-ttl=consetetur
    • 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.
  • kms-key=stet
    • Optional. The Cloud KMS key to use for encryption.
  • network-tags=est
    • Optional. Tags used for network traffic control.
    • Each invocation of this argument appends the given value to the array.
  • network-uri=aliquyam
    • Optional. Network URI to connect workload to.
  • service-account=elitr
    • Optional. Service account that used to execute workload.
  • staging-bucket=duo
    • 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.
  • subnetwork-uri=diam
    • Optional. Subnetwork URI to connect workload to.
  • ttl=est

    • 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.
  • ..peripherals-config metastore-service=sit

    • Optional. Resource name of an existing Dataproc Metastore service.Example: projects/[project_id]/locations/[region]/services/[service_id]
  • spark-history-server-config dataproc-cluster=sed

    • 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]
  • ....jupyter-session display-name=eos

    • Optional. Display name, shown in the Jupyter kernelspec card.
  • kernel=lorem

    • Optional. Kernel
  • .. labels=key=ea

    • 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.
    • the value will be associated with the given key
  • name=stet
    • Required. The resource name of the session template.
  • runtime-config container-image=dolores
    • Optional. Optional custom container image for the job runtime environment. If not specified, a default container image will be used.
  • properties=key=eos
    • Optional. A mapping of property names to values, which are used to configure workload execution.
    • the value will be associated with the given key
  • repository-config.pypi-repository-config pypi-repository=et

    • Optional. PyPi repository address
  • ... version=sea

    • Optional. Version of the batch runtime.
  • .. update-time=et

    • Output only. The time the template was last updated.
  • uuid=at
    • Output only. A session template UUID (Unique Universal Identifier). The service generates this value when it creates the session template.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").