{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-quicksight/json-schema/amazon-quicksight-create-knowledge-base-request-schema.json",
  "title": "CreateKnowledgeBaseRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-quicksight-knowledge-bases-api-openapi.yml#/components/schemas/CreateKnowledgeBaseRequest",
  "type": "object",
  "properties": {
    "AwsAccountId": {
      "type": "string",
      "description": "The ID of the Amazon Web Services account that contains the knowledge base."
    },
    "KnowledgeBaseId": {
      "type": "string",
      "description": "The unique identifier for the knowledge base."
    },
    "Name": {
      "type": "string",
      "description": "The name of the knowledge base."
    },
    "DataSourceArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the data source for the knowledge base."
    },
    "KnowledgeBaseConfiguration": {
      "$ref": "#/$defs/KnowledgeBaseConfiguration"
    },
    "Description": {
      "type": "string",
      "description": "A description for the knowledge base. If you don't specify a description, the knowledge base is created without one."
    },
    "Permissions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResourcePermission"
      },
      "description": "A list of resource permissions on the knowledge base. Each entry grants a specified Amazon QuickSight principal either owner or viewer access. If you don't specify permissions, only the primary owner (if provided) receives owner access."
    },
    "MediaExtractionConfiguration": {
      "$ref": "#/$defs/MediaExtractionConfiguration"
    },
    "AccessControlConfiguration": {
      "$ref": "#/$defs/AccessControlConfiguration"
    },
    "PrimaryOwnerArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the Amazon QuickSight user or group to set as the primary owner of the knowledge base. The specified principal is always granted owner access, regardless of what is specified in the Permissions field. This must be an Amazon QuickSight principal ARN, not an IAM user or role ARN. The API caller is never assigned as the owner automatically. If you don't specify a primary owner and don't grant owner access in Permissions, the knowledge base is created without an owner, even when you call the operation as an Amazon QuickSight user. When you call CreateKnowledgeBase"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The tags to assign to the knowledge base. If you don't specify tags, the knowledge base is created without tags."
    }
  },
  "required": [
    "AwsAccountId",
    "KnowledgeBaseId",
    "Name",
    "DataSourceArn",
    "KnowledgeBaseConfiguration"
  ],
  "$defs": {
    "AccessControlConfiguration": {
      "type": "object",
      "properties": {
        "isACLEnabled": {
          "type": "boolean",
          "description": "Specifies whether ACLs are enabled for the knowledge base. This setting works together with the data source connector's ACL crawling. To enforce document-level access control end to end, set isACLEnabled to true and enable ACL crawling on the connector. For example, for an Amazon S3 data source, set accessControlConfiguration.crawlAcl to true in the connector template. For more information, see KbTemplateConfiguration. Enabling only one of the two settings does not produce a fully ACL-enforced knowledge base."
        }
      }
    },
    "AudioExtractionConfiguration": {
      "type": "object",
      "properties": {
        "audioExtractionStatus": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The status of audio extraction. Valid values are ENABLED and DISABLED."
        }
      },
      "required": [
        "audioExtractionStatus"
      ]
    },
    "ImageExtractionConfiguration": {
      "type": "object",
      "properties": {
        "imageExtractionStatus": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The status of image extraction. Valid values are ENABLED and DISABLED."
        }
      },
      "required": [
        "imageExtractionStatus"
      ]
    },
    "KbTemplateConfiguration": {
      "type": "object",
      "properties": {
        "template": {
          "type": "object",
          "description": "The connector configuration for the knowledge base data source. The structure depends on the connector type of the data source referenced by DataSourceArn. The template must be a JSON object. All connector types share the following top-level keys. The value of type and the contents of connectionConfiguration vary by connector type. type – (Required) The connector type of the data source. This value identifies the connector. Valid values: S3V2, WEBCRAWLERV3, GOOGLEDRIVEV3, ONEDRIVEV3, SHAREPOINTV3. For the fields required by each connector, see the connector-specific list that follows. connecti"
        }
      }
    },
    "KnowledgeBaseConfiguration": {
      "type": "object",
      "properties": {
        "templateConfiguration": {
          "$ref": "#/$defs/KbTemplateConfiguration"
        }
      }
    },
    "MediaExtractionConfiguration": {
      "type": "object",
      "properties": {
        "imageExtractionConfiguration": {
          "$ref": "#/$defs/ImageExtractionConfiguration"
        },
        "audioExtractionConfiguration": {
          "$ref": "#/$defs/AudioExtractionConfiguration"
        },
        "videoExtractionConfiguration": {
          "$ref": "#/$defs/VideoExtractionConfiguration"
        }
      }
    },
    "ResourcePermission": {
      "type": "object",
      "properties": {
        "Principal": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the principal. This can be one of the following: The ARN of an Quick Sight user or group associated with a data source or dataset. (This is common.) The ARN of an Quick Sight user, group, or namespace associated with an analysis, dashboard, template, or theme. Namespace sharing is not supported for action connectors. (This is common.) The ARN of an Amazon Web Services account root: This is an IAM ARN rather than a Quick Sight ARN. Use this option only to share resources (templates) across Amazon Web Services accounts. Account root sharing is not supported for "
        },
        "Actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The IAM action to grant or revoke permissions on."
        }
      },
      "required": [
        "Principal",
        "Actions"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "Tag key."
        },
        "Value": {
          "type": "string",
          "description": "Tag value."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    },
    "VideoExtractionConfiguration": {
      "type": "object",
      "properties": {
        "videoExtractionStatus": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The status of video extraction. Valid values are ENABLED and DISABLED."
        },
        "videoExtractionType": {
          "type": "string",
          "enum": [
            "AUDIO_TRANSCRIPTION_ONLY",
            "VISUAL_CONTENT_AND_AUDIO_TRANSCRIPTION"
          ],
          "description": "The type of video extraction to perform."
        }
      },
      "required": [
        "videoExtractionStatus"
      ]
    }
  }
}