{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-kendra/json-schema/amazon-kendra-create-access-control-configuration-request-schema.json",
  "title": "CreateAccessControlConfigurationRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-kendra-access-control-configuration-api-openapi.yml#/components/schemas/CreateAccessControlConfigurationRequest",
  "type": "object",
  "properties": {
    "IndexId": {
      "type": "string",
      "description": "The identifier of the index to create an access control configuration for your documents."
    },
    "Name": {
      "type": "string",
      "description": "A name for the access control configuration."
    },
    "Description": {
      "type": "string",
      "description": "A description for the access control configuration."
    },
    "AccessControlList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Principal"
      },
      "description": "Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents."
    },
    "HierarchicalAccessControlList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HierarchicalPrincipal"
      },
      "description": "The list of principal lists that define the hierarchy for which documents users should have access to."
    },
    "ClientToken": {
      "type": "string",
      "description": "A token that you provide to identify the request to create an access control configuration. Multiple calls to the CreateAccessControlConfiguration API with the same client token will create only one access control configuration."
    }
  },
  "required": [
    "IndexId",
    "Name"
  ],
  "$defs": {
    "HierarchicalPrincipal": {
      "type": "object",
      "properties": {
        "PrincipalList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Principal"
          },
          "description": "A list of principal lists that define the hierarchy for which documents users should have access to. Each hierarchical list specifies which user or group has allow or deny access for each document."
        }
      },
      "required": [
        "PrincipalList"
      ]
    },
    "Principal": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the user or group."
        },
        "Type": {
          "type": "string",
          "enum": [
            "USER",
            "GROUP"
          ],
          "description": "The type of principal."
        },
        "Access": {
          "type": "string",
          "enum": [
            "ALLOW",
            "DENY"
          ],
          "description": "Whether to allow or deny document access to the principal."
        },
        "DataSourceId": {
          "type": "string",
          "description": "The identifier of the data source the principal should access documents from."
        }
      },
      "required": [
        "Name",
        "Type",
        "Access"
      ]
    }
  }
}