{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-athena/json-schema/amazon-athena-start-session-request-schema.json",
  "title": "StartSessionRequest",
  "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/StartSessionRequest",
  "type": "object",
  "properties": {
    "Description": {
      "type": "string",
      "description": "The session description."
    },
    "WorkGroup": {
      "type": "string",
      "description": "The workgroup to which the session belongs."
    },
    "EngineConfiguration": {
      "$ref": "#/$defs/EngineConfiguration"
    },
    "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."
    },
    "MonitoringConfiguration": {
      "$ref": "#/$defs/MonitoringConfiguration"
    },
    "NotebookVersion": {
      "type": "string",
      "description": "The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is Athena notebook version 1. If you specify a value for NotebookVersion, you must also specify a value for NotebookId. See EngineConfiguration$AdditionalConfigs."
    },
    "SessionIdleTimeoutInMinutes": {
      "type": "integer",
      "description": "The idle timeout in minutes for the session."
    },
    "ClientRequestToken": {
      "type": "string",
      "description": "A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another StartSessionRequest is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned. This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of comma separated tags to add to the session that is created."
    },
    "CopyWorkGroupTags": {
      "type": "boolean",
      "description": "Copies the tags from the Workgroup to the Session when."
    }
  },
  "required": [
    "WorkGroup",
    "EngineConfiguration"
  ],
  "$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"
      ]
    },
    "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"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource."
        },
        "Value": {
          "type": "string",
          "description": "A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive."
        }
      }
    }
  }
}