{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-verified-permissions/json-schema/amazon-verified-permissions-batch-is-authorized-input-schema.json",
  "title": "BatchIsAuthorizedInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-verified-permissions-batchisauthorized-api-openapi.yml#/components/schemas/BatchIsAuthorizedInput",
  "type": "object",
  "properties": {
    "policyStoreId": {
      "type": "string",
      "description": "Specifies the ID of the policy store. Policies in this policy store will be used to make the authorization decisions for the input. To specify a policy store, use its ID or alias name. When using an alias name, prefix it with policy-store-alias/. For example: ID: PSEXAMPLEabcdefg111111 Alias name: policy-store-alias/example-policy-store To view aliases, use ListPolicyStoreAliases."
    },
    "entities": {
      "$ref": "#/$defs/EntitiesDefinition"
    },
    "requests": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchIsAuthorizedInputItem"
      },
      "description": "An array of up to 30 requests that you want Verified Permissions to evaluate."
    }
  },
  "required": [
    "policyStoreId",
    "requests"
  ],
  "$defs": {
    "ActionIdentifier": {
      "type": "object",
      "properties": {
        "actionType": {
          "type": "string",
          "description": "The type of an action."
        },
        "actionId": {
          "type": "string",
          "description": "The ID of an action."
        }
      },
      "required": [
        "actionType",
        "actionId"
      ]
    },
    "AttributeValue": {
      "type": "object",
      "properties": {
        "boolean": {
          "type": "boolean",
          "description": "An attribute value of Boolean type. Example: {\"boolean\": true}"
        },
        "entityIdentifier": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "long": {
          "type": "integer",
          "description": "An attribute value of Long type. Example: {\"long\": 0}"
        },
        "string": {
          "type": "string",
          "description": "An attribute value of String type. Example: {\"string\": \"abc\"}"
        },
        "set": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttributeValue"
          },
          "description": "An attribute value of Set type. Example: {\"set\": [ {} ] }"
        },
        "record": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AttributeValue"
          },
          "description": "An attribute value of Record type. Example: {\"record\": { \"keyName\": {} } }"
        },
        "ipaddr": {
          "type": "string",
          "description": "An attribute value of ipaddr type. Example: {\"ip\": \"192.168.1.100\"}"
        },
        "decimal": {
          "type": "string",
          "description": "An attribute value of decimal type. Example: {\"decimal\": \"1.1\"}"
        },
        "datetime": {
          "type": "string",
          "description": "An attribute value of datetime type. Example: {\"datetime\": \"2024-10-15T11:35:00Z\"}"
        },
        "duration": {
          "type": "string",
          "description": "An attribute value of duration type. Example: {\"duration\": \"1h30m\"}"
        }
      },
      "description": "Exactly one member is set."
    },
    "BatchIsAuthorizedInputItem": {
      "type": "object",
      "properties": {
        "principal": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "action": {
          "$ref": "#/$defs/ActionIdentifier"
        },
        "resource": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "context": {
          "$ref": "#/$defs/ContextDefinition"
        }
      }
    },
    "CedarTagValue": {
      "type": "object",
      "properties": {
        "boolean": {
          "type": "boolean",
          "description": "A Cedar tag value of Boolean type. Example: {\"boolean\": false}"
        },
        "entityIdentifier": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "long": {
          "type": "integer",
          "description": "A Cedar tag value of Long type. Example: {\"long\": 0}"
        },
        "string": {
          "type": "string",
          "description": "A Cedar tag value of String type. Example: {\"string\": \"abc\"}"
        },
        "set": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CedarTagValue"
          },
          "description": "A Cedar tag value of Set type. Example: {\"set\": [ { \"string\": \"abc\" } ] }"
        },
        "record": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/CedarTagValue"
          },
          "description": "A Cedar tag value of Record type. Example: {\"record\": { \"keyName\": {} } }"
        },
        "ipaddr": {
          "type": "string",
          "description": "A Cedar tag value of ipaddr type. Example: {\"ip\": \"10.50.0.0/24\"}"
        },
        "decimal": {
          "type": "string",
          "description": "A Cedar tag value of decimal type. Example: {\"decimal\": \"-2.0\"}"
        },
        "datetime": {
          "type": "string",
          "description": "A Cedar tag value of datetime type. Example: {\"datetime\": \"2025-11-04T11:35:00.000+0100\"}"
        },
        "duration": {
          "type": "string",
          "description": "A Cedar tag value of duration type. Example: {\"duration\": \"-1d12h\"}"
        }
      },
      "description": "Exactly one member is set."
    },
    "ContextDefinition": {
      "type": "object",
      "properties": {
        "contextMap": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AttributeValue"
          },
          "description": "An list of attributes that are needed to successfully evaluate an authorization request. Each attribute in this array must include a map of a data type and its value. Example: \"contextMap\":{\"&lt;KeyName1&gt;\":{\"boolean\":true},\"&lt;KeyName2&gt;\":{\"long\":1234}}"
        },
        "cedarJson": {
          "type": "string",
          "description": "A Cedar JSON string representation of the context needed to successfully evaluate an authorization request. Example: {\"cedarJson\":\"{\\\"&lt;KeyName1&gt;\\\": true, \\\"&lt;KeyName2&gt;\\\": 1234}\" }"
        }
      },
      "description": "Exactly one member is set."
    },
    "EntitiesDefinition": {
      "type": "object",
      "properties": {
        "entityList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntityItem"
          },
          "description": "An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities. If you include multiple entities with the same identifier, only the last one is processed in the request."
        },
        "cedarJson": {
          "type": "string",
          "description": "A Cedar JSON string representation of the entities needed to successfully evaluate an authorization request. Example: {\"cedarJson\": \"[{\\\"uid\\\":{\\\"type\\\":\\\"Photo\\\",\\\"id\\\":\\\"VacationPhoto94.jpg\\\"},\\\"attrs\\\":{\\\"accessLevel\\\":\\\"public\\\"},\\\"parents\\\":[]}]\"}"
        }
      },
      "description": "Exactly one member is set."
    },
    "EntityIdentifier": {
      "type": "object",
      "properties": {
        "entityType": {
          "type": "string",
          "description": "The type of an entity. Example: \"entityType\":\"typeName\""
        },
        "entityId": {
          "type": "string",
          "description": "The identifier of an entity. \"entityId\":\"identifier\""
        }
      },
      "required": [
        "entityType",
        "entityId"
      ]
    },
    "EntityItem": {
      "type": "object",
      "properties": {
        "identifier": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AttributeValue"
          },
          "description": "A list of attributes for the entity."
        },
        "parents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntityIdentifier"
          },
          "description": "The parent entities in the hierarchy that contains the entity. A principal or resource entity can be defined with at most 99 transitive parents per authorization request. A transitive parent is an entity in the hierarchy of entities including all direct parents, and parents of parents. For example, a user can be a member of 91 groups if one of those groups is a member of eight groups, for a total of 100: one entity, 91 entity parents, and eight parents of parents."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/CedarTagValue"
          },
          "description": "A list of cedar tags for the entity."
        }
      },
      "required": [
        "identifier"
      ]
    }
  }
}