{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-storage-accounts/json-schema/azure-storage-accounts-context-cache-schema.json",
  "title": "ContextCache",
  "description": "A Context Cache resource",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-storage-accounts-contextcaches-api-openapi.yml#/components/schemas/ContextCache",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ContextCacheProperties",
      "description": "The resource-specific properties for this resource."
    },
    "identity": {
      "$ref": "#/$defs/ManagedServiceIdentity",
      "description": "The managed service identities assigned to this resource."
    }
  },
  "required": [
    "properties"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "Azure.Core.uuid": {
      "type": "string",
      "format": "uuid",
      "description": "Universally Unique Identifier"
    },
    "Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption": {
      "type": "object",
      "description": "Customer-managed key encryption properties for the resource.",
      "properties": {
        "keyEncryptionKeyIdentity": {
          "$ref": "#/$defs/Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentity",
          "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault."
        },
        "keyEncryptionKeyUrl": {
          "type": "string",
          "description": "key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
        }
      }
    },
    "Azure.ResourceManager.CommonTypes.Encryption": {
      "type": "object",
      "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.",
      "properties": {
        "infrastructureEncryption": {
          "$ref": "#/$defs/Azure.ResourceManager.CommonTypes.InfrastructureEncryption",
          "description": "Values are enabled and disabled."
        },
        "customerManagedKeyEncryption": {
          "$ref": "#/$defs/Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption",
          "description": "All Customer-managed key encryption properties for the resource."
        }
      }
    },
    "Azure.ResourceManager.CommonTypes.InfrastructureEncryption": {
      "type": "string",
      "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.",
      "enum": [
        "enabled",
        "disabled"
      ],
      "x-ms-enum": {
        "name": "InfrastructureEncryption",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "enabled",
            "description": "Encryption is enabled"
          },
          {
            "name": "Disabled",
            "value": "disabled",
            "description": "Encryption is disabled"
          }
        ]
      }
    },
    "Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentity": {
      "type": "object",
      "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.",
      "properties": {
        "identityType": {
          "$ref": "#/$defs/Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentityType",
          "description": "The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity."
        },
        "userAssignedIdentityResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity."
        },
        "federatedClientId": {
          "$ref": "#/$defs/Azure.Core.uuid",
          "description": "application client identity to use for accessing key encryption key Url in a different tenant. Ex: f83c6b1b-4d34-47e4-bb34-9d83df58b540"
        },
        "delegatedIdentityClientId": {
          "$ref": "#/$defs/Azure.Core.uuid",
          "description": "delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only."
        }
      }
    },
    "Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentityType": {
      "type": "string",
      "description": "The type of identity to use.",
      "enum": [
        "systemAssignedIdentity",
        "userAssignedIdentity",
        "delegatedResourceIdentity"
      ],
      "x-ms-enum": {
        "name": "KeyEncryptionKeyIdentityType",
        "modelAsString": true,
        "values": [
          {
            "name": "SystemAssignedIdentity",
            "value": "systemAssignedIdentity",
            "description": "System assigned identity"
          },
          {
            "name": "UserAssignedIdentity",
            "value": "userAssignedIdentity",
            "description": "User assigned identity"
          },
          {
            "name": "DelegatedResourceIdentity",
            "value": "delegatedResourceIdentity",
            "description": "Delegated identity"
          }
        ]
      }
    },
    "ContextCacheAccountKind": {
      "type": "string",
      "description": "The kind of context cache account, determining storage topology.",
      "enum": [
        "Regional",
        "DataZone",
        "Global"
      ],
      "x-ms-enum": {
        "name": "ContextCacheAccountKind",
        "modelAsString": true,
        "values": [
          {
            "name": "Regional",
            "value": "Regional",
            "description": "Single-region storage account"
          },
          {
            "name": "DataZone",
            "value": "DataZone",
            "description": "Multi-region within a data zone"
          },
          {
            "name": "Global",
            "value": "Global",
            "description": "All regions with global distribution"
          }
        ]
      }
    },
    "ContextCacheProperties": {
      "type": "object",
      "description": "Details of the Context Cache.",
      "properties": {
        "accountKind": {
          "$ref": "#/$defs/ContextCacheAccountKind",
          "description": "The kind of account determining storage topology.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "description": {
          "type": "string",
          "description": "Account description.",
          "maxLength": 250
        },
        "provisioningState": {
          "$ref": "#/$defs/ContextCacheProvisioningState",
          "description": "The status of the last operation.",
          "readOnly": true
        },
        "encryption": {
          "$ref": "#/$defs/Azure.ResourceManager.CommonTypes.Encryption",
          "description": "Encryption settings for the account."
        }
      },
      "required": [
        "accountKind"
      ]
    },
    "ContextCacheProvisioningState": {
      "type": "string",
      "description": "The status of the current operation.",
      "enum": [
        "Succeeded",
        "Failed",
        "Canceled",
        "Creating",
        "Updating",
        "Deleting",
        "Accepted"
      ],
      "x-ms-enum": {
        "name": "ContextCacheProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Resource has been created."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Resource creation failed."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Resource creation was canceled."
          },
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Initial provisioning in progress"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Update in progress"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deletion in progress"
          },
          {
            "name": "Accepted",
            "value": "Accepted",
            "description": "Change accepted for processing"
          }
        ]
      },
      "readOnly": true
    },
    "ManagedServiceIdentity": {
      "type": "object",
      "description": "Managed service identity (system assigned and/or user assigned identities)",
      "properties": {
        "principalId": {
          "type": "string",
          "format": "uuid",
          "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "format": "uuid",
          "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ManagedServiceIdentityType"
        },
        "userAssignedIdentities": {
          "$ref": "#/$defs/UserAssignedIdentities"
        }
      },
      "required": [
        "type"
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "TrackedResource": {
      "type": "object",
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ]
        },
        "location": {
          "type": "string",
          "description": "The geo-location where the resource lives",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}