{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instaclustr/json-schema/instaclustr-kafka-acl-lists-v2-schema.json",
  "title": "KafkaAclListsV2",
  "description": "List of access control lists for a Kafka cluster.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instaclustr-apache-kafka-acl-v2-api-openapi.yml#/components/schemas/KafkaAclListsV2",
  "type": "object",
  "properties": {
    "clusterId": {
      "type": "string",
      "description": "UUID of the Kafka cluster",
      "x-terraform-id": true
    },
    "aclLists": {
      "type": "array",
      "description": "List of all ACLs in the Kafka cluster.",
      "items": {
        "$ref": "#/$defs/KafkaAclListV2"
      }
    }
  },
  "$defs": {
    "KafkaAclListV2": {
      "required": [
        "acls",
        "clusterId",
        "userQuery"
      ],
      "type": "object",
      "properties": {
        "acls": {
          "type": "array",
          "description": "List of ACLs for the given principal.",
          "items": {
            "$ref": "#/$defs/KafkaAclV2"
          },
          "x-terraform-field-name": "acl",
          "x-terraform-ignore-order": true
        },
        "userQuery": {
          "type": "string",
          "description": "This is the principal without the `User:` prefix.",
          "x-terraform-force-new": true
        },
        "clusterId": {
          "type": "string",
          "description": "UUID of the Kafka cluster.",
          "format": "uuid",
          "x-terraform-force-new": true
        },
        "id": {
          "type": "string",
          "description": "Instaclustr identifier for the ACL list for a principal. The value of this property has the form: [clusterId]_[principalUserQuery]\nThe user query is the principal value without the leading `User:`.",
          "readOnly": true,
          "x-terraform-force-new": true,
          "x-terraform-id": true
        }
      },
      "description": "List of access control lists for a Kafka cluster."
    },
    "KafkaAclV2": {
      "title": "Root Type for KafkaAclV2",
      "required": [
        "host",
        "operation",
        "patternType",
        "permissionType",
        "principal",
        "resourceName",
        "resourceType"
      ],
      "type": "object",
      "properties": {
        "principal": {
          "pattern": "^User:[a-zA-Z0-9][a-zA-Z0-9_-]*$",
          "type": "string",
          "description": "Specifies the users(s) for which this ACL applies and can include the wildcard `*`. Valid values must start with \"User:\" including the wildcard."
        },
        "permissionType": {
          "type": "string",
          "description": "Specifies whether to allow or deny the operation.",
          "enum": [
            "ALLOW",
            "DENY"
          ]
        },
        "host": {
          "type": "string",
          "description": "The IP address to which this ACL applies. It takes any string including the wildcard `*` for all IP addresses."
        },
        "patternType": {
          "type": "string",
          "description": "Indicates the resource-pattern-type",
          "enum": [
            "LITERAL",
            "PREFIXED"
          ]
        },
        "resourceName": {
          "type": "string",
          "description": "Any string that fits the resource name, e.g. topic name if the resource type is TOPIC"
        },
        "operation": {
          "type": "string",
          "description": "The operation that will be allowed or denied.",
          "enum": [
            "ALL",
            "READ",
            "WRITE",
            "CREATE",
            "DELETE",
            "ALTER",
            "DESCRIBE",
            "CLUSTER_ACTION",
            "DESCRIBE_CONFIGS",
            "ALTER_CONFIGS",
            "IDEMPOTENT_WRITE"
          ]
        },
        "resourceType": {
          "type": "string",
          "description": "Specifies the type of resource.",
          "enum": [
            "CLUSTER",
            "TOPIC",
            "GROUP",
            "DELEGATION_TOKEN",
            "TRANSACTIONAL_ID"
          ]
        }
      },
      "description": "Definition of a Kafka access control list."
    }
  }
}