{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-log-analytics/json-schema/azure-log-analytics-cluster-patch-schema.json",
  "title": "ClusterPatch",
  "description": "The top level Log Analytics cluster resource container.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-log-analytics-clusters-api-openapi.yml#/components/schemas/ClusterPatch",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ClusterPatchProperties",
      "description": "Log Analytics cluster properties.",
      "x-ms-client-flatten": true
    },
    "identity": {
      "$ref": "#/$defs/ManagedServiceIdentity",
      "description": "Resource's identity."
    },
    "sku": {
      "$ref": "#/$defs/ClusterSku",
      "description": "The sku properties."
    },
    "tags": {
      "type": "object",
      "description": "Resource tags.",
      "additionalProperties": {
        "type": "string"
      },
      "x-ms-mutability": [
        "read",
        "update",
        "create"
      ]
    }
  },
  "$defs": {
    "BillingType": {
      "type": "string",
      "description": "Configures whether billing will be only on the cluster or each workspace will be billed by its proportional use. This does not change the overall billing, only how it will be distributed. Default value is 'Cluster'",
      "enum": [
        "Cluster",
        "Workspaces"
      ],
      "x-ms-enum": {
        "name": "BillingType",
        "modelAsString": true,
        "values": [
          {
            "name": "Cluster",
            "value": "Cluster",
            "description": "Cluster"
          },
          {
            "name": "Workspaces",
            "value": "Workspaces",
            "description": "Workspaces"
          }
        ]
      }
    },
    "ClusterPatchProperties": {
      "type": "object",
      "description": "Log Analytics cluster patch properties.",
      "properties": {
        "keyVaultProperties": {
          "$ref": "#/$defs/keyVaultProperties",
          "description": "The associated key properties."
        },
        "billingType": {
          "$ref": "#/$defs/BillingType",
          "description": "The cluster's billing type."
        }
      }
    },
    "ClusterSku": {
      "type": "object",
      "description": "The cluster sku definition.",
      "properties": {
        "capacity": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "The capacity reservation level in Gigabytes for this cluster."
        },
        "name": {
          "$ref": "#/$defs/ClusterSkuNameEnum",
          "description": "The SKU (tier) of a cluster."
        }
      }
    },
    "ClusterSkuNameEnum": {
      "type": "string",
      "description": "The SKU (tier) of a cluster.",
      "enum": [
        "CapacityReservation"
      ],
      "x-ms-enum": {
        "name": "ClusterSkuNameEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "CapacityReservation",
            "value": "CapacityReservation",
            "description": "CapacityReservation"
          }
        ]
      }
    },
    "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"
      ]
    },
    "keyVaultProperties": {
      "type": "object",
      "description": "The key vault properties.",
      "properties": {
        "keyVaultUri": {
          "type": "string",
          "description": "The Key Vault uri which holds they key associated with the Log Analytics cluster."
        },
        "keyName": {
          "type": "string",
          "description": "The name of the key associated with the Log Analytics cluster."
        },
        "keyVersion": {
          "type": "string",
          "description": "The version of the key associated with the Log Analytics cluster."
        },
        "keyRsaSize": {
          "type": "integer",
          "format": "int32",
          "description": "Selected key minimum required size."
        }
      }
    }
  }
}