{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-glue/json-schema/aws-glue-create-session-request-schema.json",
  "title": "CreateSessionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-glue-aws-glue-x-amz-target-awsglue-createsession-api-api-openapi.yml#/components/schemas/CreateSessionRequest",
  "type": "object",
  "properties": {
    "Id": {
      "type": "string",
      "description": "The ID of the session request."
    },
    "Description": {
      "type": "string",
      "description": "The description of the session."
    },
    "Role": {
      "type": "string",
      "description": "The IAM Role ARN"
    },
    "Command": {
      "$ref": "#/$defs/SessionCommand"
    },
    "Timeout": {
      "type": "integer",
      "description": "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."
    },
    "IdleTimeout": {
      "type": "integer",
      "description": "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."
    },
    "DefaultArguments": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map array of key-value pairs. Max is 75 pairs."
    },
    "Connections": {
      "$ref": "#/$defs/ConnectionsList"
    },
    "MaxCapacity": {
      "type": "number",
      "description": "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."
    },
    "NumberOfWorkers": {
      "type": "integer",
      "description": "The number of workers of a defined WorkerType to use for the session."
    },
    "WorkerType": {
      "type": "string",
      "enum": [
        "Standard",
        "G.1X",
        "G.2X",
        "G.4X",
        "G.8X",
        "G.025X",
        "Z.2X",
        "G.12X",
        "G.16X",
        "R.1X",
        "R.2X",
        "R.4X",
        "R.8X"
      ],
      "description": "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 transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs. For the G.2X worker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 138GB disk, and provides 1 e"
    },
    "SecurityConfiguration": {
      "type": "string",
      "description": "The name of the SecurityConfiguration structure to be used with the session"
    },
    "GlueVersion": {
      "type": "string",
      "description": "The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The map of key value pairs (tags) belonging to the session."
    },
    "RequestOrigin": {
      "type": "string",
      "description": "The origin of the request."
    },
    "SessionType": {
      "type": "string",
      "enum": [
        "LIVY",
        "SPARK_CONNECT"
      ],
      "description": "The type of session to create."
    }
  },
  "required": [
    "Id",
    "Role",
    "Command"
  ],
  "$defs": {
    "ConnectionsList": {
      "type": "object",
      "properties": {
        "Connections": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of connections used by the job."
        }
      }
    },
    "SessionCommand": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "Specifies the name of the SessionCommand. Can be 'glueetl' or 'gluestreaming'."
        },
        "PythonVersion": {
          "type": "string",
          "description": "Specifies the Python version. The Python version indicates the version supported for jobs of type Spark."
        }
      }
    }
  }
}