session_templates
Creates, updates, deletes, gets or lists a session_templates resource.
Overview
| Name | session_templates |
| Type | Resource |
| Id | google.dataproc.session_templates |
Fields
The following fields are returned by SELECT queries:
- projects_locations_session_templates_get
- projects_locations_session_templates_list
| Name | Datatype | Description |
|---|---|---|
name | string | Required. Identifier. The resource name of the session template. |
createTime | string (google-datetime) | Output only. The time when the template was created. |
creator | string | Output only. The email address of the user who created the template. |
description | string | Optional. Brief description of the template. |
environmentConfig | object | Optional. Environment configuration for session execution. (id: EnvironmentConfig) |
jupyterSession | object | Optional. Jupyter session config. (id: JupyterConfig) |
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 | object | Optional. Runtime configuration for session execution. (id: RuntimeConfig) |
sparkConnectSession | object | Optional. Spark connect session config. (id: SparkConnectConfig) |
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. |
| Name | Datatype | Description |
|---|---|---|
name | string | Required. Identifier. The resource name of the session template. |
createTime | string (google-datetime) | Output only. The time when the template was created. |
creator | string | Output only. The email address of the user who created the template. |
description | string | Optional. Brief description of the template. |
environmentConfig | object | Optional. Environment configuration for session execution. (id: EnvironmentConfig) |
jupyterSession | object | Optional. Jupyter session config. (id: JupyterConfig) |
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 | object | Optional. Runtime configuration for session execution. (id: RuntimeConfig) |
sparkConnectSession | object | Optional. Spark connect session config. (id: SparkConnectConfig) |
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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_locations_session_templates_get | select | projectsId, locationsId, sessionTemplatesId | Gets the resource representation for a session template. | |
projects_locations_session_templates_list | select | projectsId, locationsId | pageToken, pageSize, filter | Lists session templates. |
projects_locations_session_templates_create | insert | projectsId, locationsId | Create a session template synchronously. | |
projects_locations_session_templates_patch | update | projectsId, locationsId, sessionTemplatesId | Updates the session template synchronously. | |
projects_locations_session_templates_delete | delete | projectsId, locationsId, sessionTemplatesId | Deletes a session template. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
locationsId | string | |
projectsId | string | |
sessionTemplatesId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- projects_locations_session_templates_get
- projects_locations_session_templates_list
Gets the resource representation for a session template.
SELECT
name,
createTime,
creator,
description,
environmentConfig,
jupyterSession,
labels,
runtimeConfig,
sparkConnectSession,
updateTime,
uuid
FROM google.dataproc.session_templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND sessionTemplatesId = '{{ sessionTemplatesId }}' -- required
;
Lists session templates.
SELECT
name,
createTime,
creator,
description,
environmentConfig,
jupyterSession,
labels,
runtimeConfig,
sparkConnectSession,
updateTime,
uuid
FROM google.dataproc.session_templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
;
INSERT examples
- projects_locations_session_templates_create
- Manifest
Create a session template synchronously.
INSERT INTO google.dataproc.session_templates (
data__name,
data__runtimeConfig,
data__environmentConfig,
data__sparkConnectSession,
data__jupyterSession,
data__labels,
data__description,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ runtimeConfig }}',
'{{ environmentConfig }}',
'{{ sparkConnectSession }}',
'{{ jupyterSession }}',
'{{ labels }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
creator,
description,
environmentConfig,
jupyterSession,
labels,
runtimeConfig,
sparkConnectSession,
updateTime,
uuid
;
# Description fields are for documentation purposes
- name: session_templates
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the session_templates resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the session_templates resource.
- name: name
value: "{{ name }}"
description: |
Required. Identifier. The resource name of the session template.
- name: runtimeConfig
description: |
Optional. Runtime configuration for session execution.
value:
properties: "{{ properties }}"
version: "{{ version }}"
repositoryConfig:
pypiRepositoryConfig:
pypiRepository: "{{ pypiRepository }}"
autotuningConfig:
scenarios:
- "{{ scenarios }}"
containerImage: "{{ containerImage }}"
cohort: "{{ cohort }}"
- name: environmentConfig
description: |
Optional. Environment configuration for session execution.
value:
peripheralsConfig:
metastoreService: "{{ metastoreService }}"
sparkHistoryServerConfig:
dataprocCluster: "{{ dataprocCluster }}"
executionConfig:
idleTtl: "{{ idleTtl }}"
authenticationConfig:
userWorkloadAuthenticationType: "{{ userWorkloadAuthenticationType }}"
subnetworkUri: "{{ subnetworkUri }}"
kmsKey: "{{ kmsKey }}"
networkTags:
- "{{ networkTags }}"
ttl: "{{ ttl }}"
serviceAccount: "{{ serviceAccount }}"
networkUri: "{{ networkUri }}"
resourceManagerTags: "{{ resourceManagerTags }}"
stagingBucket: "{{ stagingBucket }}"
- name: sparkConnectSession
value: "{{ sparkConnectSession }}"
description: |
Optional. Spark connect session config.
- name: jupyterSession
description: |
Optional. Jupyter session config.
value:
displayName: "{{ displayName }}"
kernel: "{{ kernel }}"
- name: labels
value: "{{ labels }}"
description: |
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.
- name: description
value: "{{ description }}"
description: |
Optional. Brief description of the template.
UPDATE examples
- projects_locations_session_templates_patch
Updates the session template synchronously.
UPDATE google.dataproc.session_templates
SET
data__name = '{{ name }}',
data__runtimeConfig = '{{ runtimeConfig }}',
data__environmentConfig = '{{ environmentConfig }}',
data__sparkConnectSession = '{{ sparkConnectSession }}',
data__jupyterSession = '{{ jupyterSession }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sessionTemplatesId = '{{ sessionTemplatesId }}' --required
RETURNING
name,
createTime,
creator,
description,
environmentConfig,
jupyterSession,
labels,
runtimeConfig,
sparkConnectSession,
updateTime,
uuid;
DELETE examples
- projects_locations_session_templates_delete
Deletes a session template.
DELETE FROM google.dataproc.session_templates
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sessionTemplatesId = '{{ sessionTemplatesId }}' --required
;