{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-create-session-response-schema.json",
  "title": "CreateSessionResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-sessions-api-openapi.yml#/components/schemas/CreateSessionResponse",
  "type": "object",
  "properties": {
    "session": {
      "$ref": "#/$defs/SessionData"
    }
  },
  "$defs": {
    "AIAgentConfigurationData": {
      "type": "object",
      "properties": {
        "aiAgentId": {
          "type": "string",
          "description": "The ID of the AI Agent to be configured."
        },
        "enabled": {
          "type": "boolean",
          "description": "Indicates whether the AI Agent configured for this AI Agent type is enabled. When this value is omitted or set to true, the configured AI Agent runs; when set to false, the AI Agent ID is retained but no AI Agent runs for the AI Agent type. Setting this value to false is currently supported only for the ANSWER_RECOMMENDATION AI Agent type; other requests to set it to false are rejected with a validation error."
        }
      },
      "required": [
        "aiAgentId"
      ]
    },
    "OrCondition": {
      "type": "object",
      "properties": {
        "andConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagCondition"
          },
          "description": "A list of conditions which would be applied together with an AND condition."
        },
        "tagCondition": {
          "$ref": "#/$defs/TagCondition"
        }
      },
      "description": "Exactly one member is set."
    },
    "OrchestratorConfigurationEntry": {
      "type": "object",
      "properties": {
        "aiAgentId": {
          "type": "string",
          "description": "The identifier of the AI Agent in the orchestrator configuration."
        },
        "orchestratorUseCase": {
          "type": "string",
          "description": "The use case for the orchestrator configuration. (for example Connect.SelfService, Connect.AgentAssistance)"
        }
      },
      "required": [
        "orchestratorUseCase"
      ]
    },
    "SessionData": {
      "type": "object",
      "properties": {
        "sessionArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the session."
        },
        "sessionId": {
          "type": "string",
          "description": "The identifier of the session."
        },
        "name": {
          "type": "string",
          "description": "The name of the session."
        },
        "description": {
          "type": "string",
          "description": "The description of the session."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags used to organize, track, or control access for this resource."
        },
        "integrationConfiguration": {
          "$ref": "#/$defs/SessionIntegrationConfiguration"
        },
        "tagFilter": {
          "$ref": "#/$defs/TagFilter"
        },
        "aiAgentConfiguration": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AIAgentConfigurationData"
          },
          "description": "The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session."
        },
        "origin": {
          "type": "string",
          "description": "The origin of the Session to be listed. SYSTEM for a default Session created by Amazon Q in Connect or CUSTOMER for a Session created by calling CreateSession API."
        },
        "orchestratorConfigurationList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrchestratorConfigurationEntry"
          },
          "description": "The list of orchestrator configurations for the session."
        }
      },
      "required": [
        "sessionArn",
        "sessionId",
        "name"
      ]
    },
    "SessionIntegrationConfiguration": {
      "type": "object",
      "properties": {
        "topicIntegrationArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages."
        }
      }
    },
    "TagCondition": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The tag key in the tag condition."
        },
        "value": {
          "type": "string",
          "description": "The tag value in the tag condition."
        }
      },
      "required": [
        "key"
      ]
    },
    "TagFilter": {
      "type": "object",
      "properties": {
        "tagCondition": {
          "$ref": "#/$defs/TagCondition"
        },
        "andConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagCondition"
          },
          "description": "A list of conditions which would be applied together with an AND condition."
        },
        "orConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrCondition"
          },
          "description": "A list of conditions which would be applied together with an OR condition."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}