{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cache-for-redis/json-schema/microsoft-azure-cache-for-redis-redis-cache-access-policy-assignment-schema.json",
  "title": "RedisCacheAccessPolicyAssignment",
  "description": "Response to an operation on access policy assignment",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-cache-for-redis-rediscacheaccesspolicyassignments-api-openapi.yml#/components/schemas/RedisCacheAccessPolicyAssignment",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/RedisCacheAccessPolicyAssignmentProperties",
      "description": "Properties of an access policy assignment",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "AccessPolicyAssignmentProvisioningState": {
      "type": "string",
      "description": "Provisioning state of an access policy assignment set",
      "enum": [
        "Updating",
        "Succeeded",
        "Deleting",
        "Deleted",
        "Canceled",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "AccessPolicyAssignmentProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Updating",
            "value": "Updating",
            "description": "The access policy assignments are being updated"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "The access policy assignments were successfully updated"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "The access policy assignments are being deleted"
          },
          {
            "name": "Deleted",
            "value": "Deleted",
            "description": "The access policy assignments are considered deleted, meaning no custom access policies are applied."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "The operation was canceled. Access policy assignments may be in a partially updated state. Update them again to have a well-defined state."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "The operation failed. Access policy assignments may be in a partially updated state. Update them again to have a well-defined state."
          }
        ]
      }
    },
    "RedisCacheAccessPolicyAssignmentProperties": {
      "type": "object",
      "description": "Properties for an access policy assignment",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/AccessPolicyAssignmentProvisioningState",
          "description": "Provisioning state of an access policy assignment set",
          "readOnly": true
        },
        "objectId": {
          "type": "string",
          "description": "Object Id to assign access policy to"
        },
        "objectIdAlias": {
          "type": "string",
          "description": "User friendly name for object id. Also represents username for token based authentication"
        },
        "accessPolicyName": {
          "type": "string",
          "description": "The name of the access policy that is being assigned",
          "pattern": "^([a-zA-Z0-9][a-zA-Z0-9- ]*[a-zA-Z0-9]|[a-zA-Z0-9])$"
        }
      },
      "required": [
        "objectId",
        "objectIdAlias",
        "accessPolicyName"
      ]
    }
  }
}