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

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. Identifier. The resource name of the session template.
createTimestring (google-datetime)Output only. The time when the template was created.
creatorstringOutput only. The email address of the user who created the template.
descriptionstringOptional. Brief description of the template.
environmentConfigobjectOptional. Environment configuration for session execution. (id: EnvironmentConfig)
jupyterSessionobjectOptional. Jupyter session config. (id: JupyterConfig)
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.
runtimeConfigobjectOptional. Runtime configuration for session execution. (id: RuntimeConfig)
sparkConnectSessionobjectOptional. Spark connect session config. (id: SparkConnectConfig)
updateTimestring (google-datetime)Output 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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_session_templates_getselectprojectsId, locationsId, sessionTemplatesIdGets the resource representation for a session template.
projects_locations_session_templates_listselectprojectsId, locationsIdpageSize, pageToken, filterLists session templates.
projects_locations_session_templates_createinsertprojectsId, locationsIdCreate a session template synchronously.
projects_locations_session_templates_patchupdateprojectsId, locationsId, sessionTemplatesIdUpdates the session template synchronously.
projects_locations_session_templates_deletedeleteprojectsId, locationsId, sessionTemplatesIdDeletes 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
sessionTemplatesIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

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;

INSERT examples

Create a session template synchronously.

INSERT INTO google.dataproc.session_templates (
data__name,
data__description,
data__jupyterSession,
data__sparkConnectSession,
data__labels,
data__runtimeConfig,
data__environmentConfig,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ jupyterSession }}',
'{{ sparkConnectSession }}',
'{{ labels }}',
'{{ runtimeConfig }}',
'{{ environmentConfig }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
creator,
description,
environmentConfig,
jupyterSession,
labels,
runtimeConfig,
sparkConnectSession,
updateTime,
uuid
;

UPDATE examples

Updates the session template synchronously.

UPDATE google.dataproc.session_templates
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__jupyterSession = '{{ jupyterSession }}',
data__sparkConnectSession = '{{ sparkConnectSession }}',
data__labels = '{{ labels }}',
data__runtimeConfig = '{{ runtimeConfig }}',
data__environmentConfig = '{{ environmentConfig }}'
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

Deletes a session template.

DELETE FROM google.dataproc.session_templates
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sessionTemplatesId = '{{ sessionTemplatesId }}' --required;