Skip to main content

session_templates

Creates, updates, deletes, gets or lists a session_templates resource.

Overview

Namesession_templates
TypeResource
Idgoogle.dataproc.session_templates

Fields

NameDatatypeDescription
namestringRequired. The resource name of the session template.
descriptionstringOptional. Brief description of the template.
createTimestringOutput only. The time when the template was created.
creatorstringOutput only. The email address of the user who created the template.
environmentConfigobjectEnvironment configuration for a workload.
jupyterSessionobjectJupyter configuration for an interactive session.
labelsobjectOptional. 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.
runtimeConfigobjectRuntime configuration for a workload.
sparkConnectSessionobjectSpark connect configuration for an interactive session.
updateTimestringOutput only. The time the template was last updated.
uuidstringOutput only. A session template UUID (Unique Universal Identifier). The service generates this value when it creates the session template.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_session_templates_getSELECTlocationsId, projectsId, sessionTemplatesIdGets the resource representation for a session template.
projects_locations_session_templates_listSELECTlocationsId, projectsIdLists session templates.
projects_locations_session_templates_createINSERTlocationsId, projectsIdCreate a session template synchronously.
projects_locations_session_templates_deleteDELETElocationsId, projectsId, sessionTemplatesIdDeletes a session template.
projects_locations_session_templates_patchUPDATElocationsId, projectsId, sessionTemplatesIdUpdates the session template synchronously.

SELECT examples

Lists session templates.

SELECT
name,
description,
createTime,
creator,
environmentConfig,
jupyterSession,
labels,
runtimeConfig,
sparkConnectSession,
updateTime,
uuid
FROM google.dataproc.session_templates
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new session_templates resource.

/*+ create */
INSERT INTO google.dataproc.session_templates (
locationsId,
projectsId,
name,
description,
jupyterSession,
sparkConnectSession,
labels,
runtimeConfig,
environmentConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ jupyterSession }}',
'{{ sparkConnectSession }}',
'{{ labels }}',
'{{ runtimeConfig }}',
'{{ environmentConfig }}'
;

UPDATE example

Updates a session_templates resource.

/*+ update */
UPDATE google.dataproc.session_templates
SET
name = '{{ name }}',
description = '{{ description }}',
jupyterSession = '{{ jupyterSession }}',
sparkConnectSession = '{{ sparkConnectSession }}',
labels = '{{ labels }}',
runtimeConfig = '{{ runtimeConfig }}',
environmentConfig = '{{ environmentConfig }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sessionTemplatesId = '{{ sessionTemplatesId }}';

DELETE example

Deletes the specified session_templates resource.

/*+ delete */
DELETE FROM google.dataproc.session_templates
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sessionTemplatesId = '{{ sessionTemplatesId }}';