{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-verified-permissions/json-schema/amazon-verified-permissions-list-policies-output-schema.json",
  "title": "ListPoliciesOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-verified-permissions-listpolicies-api-openapi.yml#/components/schemas/ListPoliciesOutput",
  "type": "object",
  "properties": {
    "nextToken": {
      "type": "string",
      "description": "If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results."
    },
    "policies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PolicyItem"
      },
      "description": "Lists all policies that are available in the specified policy store."
    }
  },
  "required": [
    "policies"
  ],
  "$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"
      ]
    },
    "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"
      ]
    },
    "PolicyDefinitionItem": {
      "type": "object",
      "properties": {
        "static": {
          "$ref": "#/$defs/StaticPolicyDefinitionItem"
        },
        "templateLinked": {
          "$ref": "#/$defs/TemplateLinkedPolicyDefinitionItem"
        }
      },
      "description": "Exactly one member is set."
    },
    "PolicyItem": {
      "type": "object",
      "properties": {
        "policyStoreId": {
          "type": "string",
          "description": "The identifier of the policy store where the policy you want information about is stored."
        },
        "policyId": {
          "type": "string",
          "description": "The identifier of the policy you want information about."
        },
        "policyType": {
          "type": "string",
          "enum": [
            "STATIC",
            "TEMPLATE_LINKED"
          ],
          "description": "The type of the policy. This is one of the following values: STATIC TEMPLATE_LINKED"
        },
        "principal": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "resource": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ActionIdentifier"
          },
          "description": "The action that a policy permits or forbids. For example, {\"actions\": [{\"actionId\": \"ViewPhoto\", \"actionType\": \"PhotoFlash::Action\"}, {\"entityID\": \"SharePhoto\", \"entityType\": \"PhotoFlash::Action\"}]}."
        },
        "definition": {
          "$ref": "#/$defs/PolicyDefinitionItem"
        },
        "createdDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the policy was created."
        },
        "lastUpdatedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the policy was most recently updated."
        },
        "effect": {
          "type": "string",
          "enum": [
            "Permit",
            "Forbid"
          ],
          "description": "The effect of the decision that a policy returns to an authorization request. For example, \"effect\": \"Permit\"."
        },
        "name": {
          "type": "string",
          "description": "The name of the policy, if one was assigned when the policy was created or last updated."
        }
      },
      "required": [
        "policyStoreId",
        "policyId",
        "policyType",
        "definition",
        "createdDate",
        "lastUpdatedDate"
      ]
    },
    "StaticPolicyDefinitionItem": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "A description of the static policy."
        }
      }
    },
    "TemplateLinkedPolicyDefinitionItem": {
      "type": "object",
      "properties": {
        "policyTemplateId": {
          "type": "string",
          "description": "The unique identifier of the policy template used to create this policy."
        },
        "principal": {
          "$ref": "#/$defs/EntityIdentifier"
        },
        "resource": {
          "$ref": "#/$defs/EntityIdentifier"
        }
      },
      "required": [
        "policyTemplateId"
      ]
    }
  }
}