{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-athena/json-schema/amazon-athena-get-session-response-schema.json",
  "title": "GetSessionResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-athena-session-api-openapi.yml#/components/schemas/GetSessionResponse",
  "type": "object",
  "properties": {
    "SessionId": {
      "type": "string",
      "description": "The session ID."
    },
    "Description": {
      "type": "string",
      "description": "The session description."
    },
    "WorkGroup": {
      "type": "string",
      "description": "The workgroup to which the session belongs."
    },
    "EngineVersion": {
      "type": "string",
      "description": "The engine version used by the session (for example, PySpark engine version 3). You can get a list of engine versions by calling ListEngineVersions."
    },
    "EngineConfiguration": {
      "$ref": "#/$defs/EngineConfiguration"
    },
    "NotebookVersion": {
      "type": "string",
      "description": "The notebook version."
    },
    "MonitoringConfiguration": {
      "$ref": "#/$defs/MonitoringConfiguration"
    },
    "SessionConfiguration": {
      "$ref": "#/$defs/SessionConfiguration"
    },
    "Status": {
      "$ref": "#/$defs/SessionStatus"
    },
    "Statistics": {
      "$ref": "#/$defs/SessionStatistics"
    }
  },
  "$defs": {
    "Classification": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the configuration classification."
        },
        "Properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A set of properties specified within a configuration classification."
        }
      }
    },
    "CloudWatchLoggingConfiguration": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Enables CloudWatch logging."
        },
        "LogGroup": {
          "type": "string",
          "description": "The name of the log group in Amazon CloudWatch Logs where you want to publish your logs."
        },
        "LogStreamNamePrefix": {
          "type": "string",
          "description": "Prefix for the CloudWatch log stream name."
        },
        "LogTypes": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "The types of logs that you want to publish to CloudWatch."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "EncryptionConfiguration": {
      "type": "object",
      "properties": {
        "EncryptionOption": {
          "type": "string",
          "enum": [
            "SSE_S3",
            "SSE_KMS",
            "CSE_KMS"
          ],
          "description": "Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE_S3), server-side encryption with KMS-managed keys (SSE_KMS), or client-side encryption with KMS-managed keys (CSE_KMS) is used. If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup."
        },
        "KmsKey": {
          "type": "string",
          "description": "For SSE_KMS and CSE_KMS, this is the KMS key ARN or ID."
        }
      },
      "required": [
        "EncryptionOption"
      ]
    },
    "EngineConfiguration": {
      "type": "object",
      "properties": {
        "CoordinatorDpuSize": {
          "type": "integer",
          "description": "The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing work and manages other executors in a notebook session. The default is 1."
        },
        "MaxConcurrentDpus": {
          "type": "integer",
          "description": "The maximum number of DPUs that can run concurrently."
        },
        "DefaultExecutorDpuSize": {
          "type": "integer",
          "description": "The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook session can request from Athena. The default is 1."
        },
        "AdditionalConfigs": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Contains additional notebook engine MAP parameter mappings in the form of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value for the StartSessionRequest$NotebookVersion field, and then add a key named NotebookId to AdditionalConfigs that has the value of the Athena notebook ID."
        },
        "SparkProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general Spark tuning."
        },
        "Classifications": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Classification"
          },
          "description": "The configuration classifications that can be specified for the engine."
        }
      }
    },
    "ManagedLoggingConfiguration": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Enables mamanged log persistence."
        },
        "KmsKey": {
          "type": "string",
          "description": "The KMS key ARN to encrypt the logs stored in managed log persistence."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "MonitoringConfiguration": {
      "type": "object",
      "properties": {
        "CloudWatchLoggingConfiguration": {
          "$ref": "#/$defs/CloudWatchLoggingConfiguration"
        },
        "ManagedLoggingConfiguration": {
          "$ref": "#/$defs/ManagedLoggingConfiguration"
        },
        "S3LoggingConfiguration": {
          "$ref": "#/$defs/S3LoggingConfiguration"
        }
      }
    },
    "S3LoggingConfiguration": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Enables S3 log delivery."
        },
        "KmsKey": {
          "type": "string",
          "description": "The KMS key ARN to encrypt the logs published to the given Amazon S3 destination."
        },
        "LogLocation": {
          "type": "string",
          "description": "The Amazon S3 destination URI for log publishing."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "SessionConfiguration": {
      "type": "object",
      "properties": {
        "ExecutionRole": {
          "type": "string",
          "description": "The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups."
        },
        "WorkingDirectory": {
          "type": "string",
          "description": "The Amazon S3 location that stores information for the notebook."
        },
        "IdleTimeoutSeconds": {
          "type": "integer",
          "description": "The idle timeout in seconds for the session."
        },
        "SessionIdleTimeoutInMinutes": {
          "type": "integer",
          "description": "The idle timeout in seconds for the session."
        },
        "EncryptionConfiguration": {
          "$ref": "#/$defs/EncryptionConfiguration"
        }
      }
    },
    "SessionStatistics": {
      "type": "object",
      "properties": {
        "DpuExecutionInMillis": {
          "type": "integer",
          "description": "The data processing unit execution time for a session in milliseconds."
        }
      }
    },
    "SessionStatus": {
      "type": "object",
      "properties": {
        "StartDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time that the session started."
        },
        "LastModifiedDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The most recent date and time that the session was modified."
        },
        "EndDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time that the session ended."
        },
        "IdleSinceDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time starting at which the session became idle. Can be empty if the session is not currently idle."
        },
        "State": {
          "type": "string",
          "enum": [
            "CREATING",
            "CREATED",
            "IDLE",
            "BUSY",
            "TERMINATING",
            "TERMINATED",
            "DEGRADED",
            "FAILED"
          ],
          "description": "The state of the session. A description of each state follows. CREATING - The session is being started, including acquiring resources. CREATED - The session has been started. IDLE - The session is able to accept a calculation. BUSY - The session is processing another task and is unable to accept a calculation. TERMINATING - The session is in the process of shutting down. TERMINATED - The session and its resources are no longer running. DEGRADED - The session has no healthy coordinators. FAILED - Due to a failure, the session and its resources are no longer running."
        },
        "StateChangeReason": {
          "type": "string",
          "description": "The reason for the session state change (for example, canceled because the session was terminated)."
        }
      }
    }
  }
}