{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-create-assistant-association-request-schema.json",
  "title": "CreateAssistantAssociationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-associations-api-openapi.yml#/components/schemas/CreateAssistantAssociationRequest",
  "type": "object",
  "properties": {
    "assistantId": {
      "type": "string",
      "description": "The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN."
    },
    "associationType": {
      "type": "string",
      "description": "The type of association."
    },
    "association": {
      "$ref": "#/$defs/AssistantAssociationInputData"
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    }
  },
  "required": [
    "assistantId",
    "associationType",
    "association"
  ],
  "$defs": {
    "AssistantAssociationInputData": {
      "type": "object",
      "properties": {
        "knowledgeBaseId": {
          "type": "string",
          "description": "The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base."
        },
        "externalBedrockKnowledgeBaseConfig": {
          "$ref": "#/$defs/ExternalBedrockKnowledgeBaseConfig"
        }
      },
      "description": "Exactly one member is set."
    },
    "ExternalBedrockKnowledgeBaseConfig": {
      "type": "object",
      "properties": {
        "bedrockKnowledgeBaseArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the external Bedrock knowledge base."
        },
        "accessRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role used to access the external Bedrock knowledge base."
        }
      },
      "required": [
        "bedrockKnowledgeBaseArn",
        "accessRoleArn"
      ]
    }
  }
}