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
Successful response
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. |
Successful response
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 | pageSize , pageToken , 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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
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__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
;
# Description fields are for documentation purposes
- name: session_templates
props:
- name: projectsId
value: string
description: Required parameter for the session_templates resource.
- name: locationsId
value: string
description: Required parameter for the session_templates resource.
- name: name
value: string
description: >
Required. Identifier. The resource name of the session template.
- name: description
value: string
description: >
Optional. Brief description of the template.
- name: jupyterSession
value: object
description: >
Optional. Jupyter session config.
- name: sparkConnectSession
value: object
description: >
Optional. Spark connect session config.
- name: labels
value: object
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: runtimeConfig
value: object
description: >
Optional. Runtime configuration for session execution.
- name: environmentConfig
value: object
description: >
Optional. Environment configuration for session execution.
UPDATE
examples
- projects_locations_session_templates_patch
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
- 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;