{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AccessPolicy",
  "description": "AccessPolicy schema from Palo Alto Networks SASE IAM Service API",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/refs/heads/main/json-schema/sase-iam-api-access-policy-schema.json",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier of the access policy."
    },
    "principal_id": {
      "type": "string",
      "description": "ID of the service account or user this policy applies to."
    },
    "principal_type": {
      "type": "string",
      "enum": [
        "service_account",
        "user"
      ],
      "description": "Type of principal."
    },
    "role_id": {
      "type": "string",
      "description": "ID of the role assigned by this policy."
    },
    "role_name": {
      "type": "string",
      "description": "Name of the role assigned."
    },
    "tsg_id": {
      "type": "string",
      "description": "TSG scope this policy applies to."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
