{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-emr/json-schema/amazon-emr-start-session-input-schema.json",
  "title": "StartSessionInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-emr-session-api-openapi.yml#/components/schemas/StartSessionInput",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "An optional name for the session."
    },
    "ClusterId": {
      "type": "string",
      "description": "The ID of the cluster on which to start the session."
    },
    "ExecutionRoleArn": {
      "type": "string",
      "description": "The execution role ARN for the session. Amazon EMR uses this role to access Amazon Web Services resources on your behalf during session execution."
    },
    "EngineConfigurations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Configuration"
      },
      "description": "The configuration overrides for the session. Only runtime configuration overrides are supported."
    },
    "MonitoringConfiguration": {
      "$ref": "#/$defs/SessionMonitoringConfiguration"
    },
    "SessionIdleTimeoutInMinutes": {
      "type": "integer",
      "description": "The idle timeout, in minutes. If the session is idle for this duration, Amazon EMR EC2 automatically terminates it."
    },
    "ClientRequestToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client request token, the service returns the original response without performing the operation again."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The tags to assign to the session."
    }
  },
  "required": [
    "ClusterId"
  ],
  "$defs": {
    "Configuration": {
      "type": "object",
      "properties": {
        "Classification": {
          "type": "string",
          "description": "The classification within a configuration."
        },
        "Configurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Configuration"
          },
          "description": "A list of additional configurations to apply within a configuration object."
        },
        "Properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A set of properties specified within a configuration classification."
        }
      }
    },
    "SessionCloudWatchLoggingConfiguration": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Whether CloudWatch Logs is enabled for the session."
        },
        "LogGroup": {
          "type": "string",
          "description": "The name of the log group where session logs are published."
        },
        "LogStreamNamePrefix": {
          "type": "string",
          "description": "The prefix applied to the log stream name where session logs are published."
        },
        "EncryptionKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the KMS key used to encrypt the logs published to CloudWatch Logs."
        },
        "LogTypes": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "A map of log component names (for example, SPARK_DRIVER, SPARK_EXECUTOR) to the list of log types to publish for that component (for example, stdout, stderr)."
        }
      }
    },
    "SessionManagedLoggingConfiguration": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Whether Amazon EMR-managed logging is enabled for the session."
        },
        "EncryptionKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the KMS key used to encrypt the managed logs."
        }
      }
    },
    "SessionMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "CloudWatchLoggingConfiguration": {
          "$ref": "#/$defs/SessionCloudWatchLoggingConfiguration"
        },
        "ManagedLoggingConfiguration": {
          "$ref": "#/$defs/SessionManagedLoggingConfiguration"
        },
        "S3LoggingConfiguration": {
          "$ref": "#/$defs/SessionS3LoggingConfiguration"
        }
      }
    },
    "SessionS3LoggingConfiguration": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Whether Amazon S3 logging is enabled for the session."
        },
        "LogUri": {
          "type": "string",
          "description": "The Amazon S3 destination URI where session logs are published."
        },
        "EncryptionKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the KMS key used to encrypt logs published to Amazon S3."
        },
        "LogTypes": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "A map of log component names (for example, SPARK_DRIVER, SPARK_EXECUTOR) to the list of log types to publish for that component (for example, stdout, stderr)."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag."
        },
        "Value": {
          "type": "string",
          "description": "A user-defined value, which is optional in a tag. For more information, see Tag Clusters."
        }
      }
    }
  }
}