{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-log-analytics/json-schema/azure-log-analytics-cluster-schema.json",
  "title": "Cluster",
  "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/Cluster",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ClusterProperties",
      "description": "Log Analytics cluster properties.",
      "x-ms-client-flatten": true
    },
    "identity": {
      "$ref": "#/$defs/ManagedServiceIdentity",
      "description": "The managed service identities assigned to this resource."
    },
    "sku": {
      "$ref": "#/$defs/ClusterSku",
      "description": "The sku properties."
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "AssociatedWorkspace": {
      "type": "object",
      "description": "The list of Log Analytics workspaces associated with the cluster.",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "description": "Associated workspace immutable id.",
          "readOnly": true
        },
        "workspaceName": {
          "type": "string",
          "description": "Associated workspace resource name.",
          "readOnly": true
        },
        "resourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "Associated workspace arm resource id, in the form of: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}.",
          "readOnly": true,
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.OperationalInsights/workspaces"
              }
            ]
          }
        },
        "associateDate": {
          "type": "string",
          "format": "date-time",
          "description": "The time of workspace association.",
          "readOnly": true
        }
      }
    },
    "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"
          }
        ]
      }
    },
    "CapacityReservationProperties": {
      "type": "object",
      "description": "The Capacity Reservation properties.",
      "properties": {
        "lastSkuUpdate": {
          "type": "string",
          "format": "date-time",
          "description": "The last time Sku was updated.",
          "readOnly": true
        },
        "minCapacity": {
          "type": "integer",
          "format": "int64",
          "description": "Minimum CapacityReservation value in Gigabytes.",
          "readOnly": true
        }
      }
    },
    "ClusterEntityStatus": {
      "type": "string",
      "description": "The provisioning state of the cluster.",
      "enum": [
        "Creating",
        "Succeeded",
        "Failed",
        "Canceled",
        "Deleting",
        "ProvisioningAccount",
        "Updating"
      ],
      "x-ms-enum": {
        "name": "ClusterEntityStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          },
          {
            "name": "ProvisioningAccount",
            "value": "ProvisioningAccount",
            "description": "ProvisioningAccount"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          }
        ]
      }
    },
    "ClusterProperties": {
      "type": "object",
      "description": "Cluster properties.",
      "properties": {
        "clusterId": {
          "type": "string",
          "description": "The ID associated with the cluster.",
          "readOnly": true
        },
        "provisioningState": {
          "$ref": "#/$defs/ClusterEntityStatus",
          "description": "The provisioning state of the cluster.",
          "readOnly": true
        },
        "isDoubleEncryptionEnabled": {
          "type": "boolean",
          "description": "Configures whether cluster will use double encryption. This Property can not be modified after cluster creation. Default value is 'true'",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "isAvailabilityZonesEnabled": {
          "type": "boolean",
          "description": "Sets whether the cluster will support availability zones. This can be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be modified after cluster creation. Default value is 'true' if region supports Availability Zones."
        },
        "billingType": {
          "$ref": "#/$defs/BillingType",
          "description": "The cluster's billing type."
        },
        "keyVaultProperties": {
          "$ref": "#/$defs/keyVaultProperties",
          "description": "The associated key properties."
        },
        "lastModifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The last time the cluster was updated.",
          "readOnly": true
        },
        "createdDate": {
          "type": "string",
          "format": "date-time",
          "description": "The cluster creation time",
          "readOnly": true
        },
        "associatedWorkspaces": {
          "type": "array",
          "description": "The list of Log Analytics workspaces associated with the cluster",
          "items": {
            "$ref": "#/$defs/AssociatedWorkspace"
          },
          "x-ms-identifiers": [
            "workspaceId"
          ]
        },
        "capacityReservationProperties": {
          "$ref": "#/$defs/CapacityReservationProperties",
          "description": "Additional properties for capacity reservation"
        },
        "replication": {
          "$ref": "#/$defs/ClusterReplicationProperties",
          "description": "Cluster's replication properties."
        }
      }
    },
    "ClusterReplicationProperties": {
      "type": "object",
      "description": "Cluster replication properties.",
      "properties": {
        "location": {
          "type": "string",
          "description": "The secondary location of the replication. If replication is being enabled, enabled must be provided.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "enabled": {
          "type": "boolean",
          "description": "Specifies whether the replication is enabled or not. When true the cluster is replicate to the specified location."
        },
        "isAvailabilityZonesEnabled": {
          "type": "boolean",
          "description": "Should enable AvailabilityZones for the given replicated cluster"
        },
        "provisioningState": {
          "$ref": "#/$defs/ClusterReplicationState",
          "description": "The provisioning state of the cluster replication.",
          "readOnly": true
        },
        "createdDate": {
          "type": "string",
          "format": "date-time",
          "description": "The cluster's replication creation time",
          "readOnly": true
        },
        "lastModifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The last time the cluster's replication was updated.",
          "readOnly": true
        }
      }
    },
    "ClusterReplicationState": {
      "type": "string",
      "description": "The provisioning state of the cluster replication.",
      "enum": [
        "Succeeded",
        "EnableRequested",
        "Enabling",
        "DisableRequested",
        "Disabling",
        "RollbackRequested",
        "RollingBack",
        "Failed",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "ClusterReplicationState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "EnableRequested",
            "value": "EnableRequested",
            "description": "EnableRequested"
          },
          {
            "name": "Enabling",
            "value": "Enabling",
            "description": "Enabling"
          },
          {
            "name": "DisableRequested",
            "value": "DisableRequested",
            "description": "DisableRequested"
          },
          {
            "name": "Disabling",
            "value": "Disabling",
            "description": "Disabling"
          },
          {
            "name": "RollbackRequested",
            "value": "RollbackRequested",
            "description": "RollbackRequested"
          },
          {
            "name": "RollingBack",
            "value": "RollingBack",
            "description": "RollingBack"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          }
        ]
      }
    },
    "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"
      ]
    },
    "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"
        }
      ]
    },
    "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."
        }
      }
    }
  }
}