Skip to content

GlueClient.create_session

rboto-glue==0.4.0 · Service index · Types

Model summary (excerpt): Creates a new session.

Install and imports

python -m pip install "rboto[glue]==0.4.0"
from rboto import GlueClient
from rboto_glue.types import (
    ConnectionsList,
    CreateSessionOutput,
    SessionCommand,
    SessionType,
    WorkerType,
)

Signature

async def create_session(
    *,
    id: str,
    role: str,
    command: SessionCommand,
    description: str | None = None,
    timeout: int | None = None,
    idle_timeout: int | None = None,
    default_arguments: dict[str, str] | None = None,
    connections: ConnectionsList | None = None,
    max_capacity: float | None = None,
    number_of_workers: int | None = None,
    worker_type: WorkerType | None = None,
    security_configuration: str | None = None,
    glue_version: str | None = None,
    tags: dict[str, str] | None = None,
    request_origin: str | None = None,
    session_type: SessionType | None = None,
) -> CreateSessionOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
id Yes The ID of the session request.
role Yes The IAM Role ARN
command Yes The SessionCommand that runs the job.
description No The description of the session.
timeout No The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.
idle_timeout No The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.
default_arguments No A map array of key-value pairs. Max is 75 pairs.
connections No The number of connections to use for the session.
max_capacity No The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
number_of_workers No The number of workers of a defined WorkerType to use for the session.
worker_type No The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, G.8X, G.12X, G.16X, R.1X, R.2X, R.4X, or R.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks. For the G.1X worker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data...
security_configuration No The name of the SecurityConfiguration structure to be used with the session
glue_version No The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
tags No The map of key value pairs (tags) belonging to the session.
request_origin No The origin of the request.
session_type No The type of session to create.

Output

CreateSessionOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
session SessionOutput | None Always present SessionOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

ConnectionsList, CreateSessionOutput, SessionCommand, SessionType, WorkerType

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_glue.exceptions:

AccessDeniedError, AlreadyExistsError, IdempotentParameterMismatchError, InternalServiceError, InvalidInputError, OperationNotSupportedError, OperationTimeoutError, ResourceNumberLimitExceededError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model