{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-synapse-analytics/json-schema/microsoft-azure-synapse-analytics-sql-pool-schema.json",
  "title": "SQL pool",
  "description": "A SQL Analytics pool",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-synapse-analytics-operations-api-openapi.yml#/components/schemas/SqlPool",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "properties": {
    "sku": {
      "$ref": "#/$defs/Sku",
      "description": "SQL pool SKU"
    },
    "properties": {
      "$ref": "#/$defs/SqlPoolResourceProperties",
      "description": "SQL pool properties",
      "x-ms-client-flatten": true
    }
  },
  "$defs": {
    "Sku": {
      "type": "object",
      "title": "Sku",
      "description": "SQL pool SKU",
      "properties": {
        "tier": {
          "type": "string",
          "description": "The service tier",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "name": {
          "type": "string",
          "description": "The SKU name"
        },
        "capacity": {
          "type": "integer",
          "format": "int32",
          "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.",
          "x-ms-mutability": [
            "create",
            "read",
            "update"
          ]
        }
      }
    },
    "SqlPoolResourceProperties": {
      "type": "object",
      "title": "SQL pool properties",
      "description": "Properties of a SQL Analytics pool",
      "properties": {
        "maxSizeBytes": {
          "type": "integer",
          "description": "Maximum size in bytes",
          "format": "int64"
        },
        "collation": {
          "type": "string",
          "description": "Collation mode",
          "default": "",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "sourceDatabaseId": {
          "type": "string",
          "description": "Source database to create from",
          "x-ms-mutability": [
            "create",
            "update"
          ]
        },
        "recoverableDatabaseId": {
          "type": "string",
          "description": "Backup database to restore from"
        },
        "provisioningState": {
          "type": "string",
          "description": "Resource state"
        },
        "status": {
          "type": "string",
          "description": "Resource status",
          "readOnly": true
        },
        "restorePointInTime": {
          "type": "string",
          "description": "Snapshot time to restore",
          "format": "date-time",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "createMode": {
          "type": "string",
          "description": "Specifies the mode of sql pool creation.\n\nDefault: regular sql pool creation.\n\nPointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be specified.\n\nRecovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId  must be specified as the recoverableDatabaseId to restore.\n\nRestore: Creates a sql pool by restoring a backup of a deleted sql  pool. SourceDatabaseId should be the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.",
          "enum": [
            "Default",
            "PointInTimeRestore",
            "Recovery",
            "Restore"
          ],
          "x-ms-enum": {
            "name": "createMode",
            "modelAsString": true
          },
          "x-ms-mutability": [
            "create",
            "update"
          ]
        },
        "creationDate": {
          "type": "string",
          "description": "Date the SQL pool was created",
          "format": "date-time",
          "readOnly": true
        },
        "storageAccountType": {
          "description": "The storage account type used to store backups for this sql pool.",
          "enum": [
            "GRS",
            "LRS"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "StorageAccountType",
            "modelAsString": true
          },
          "default": "GRS"
        },
        "sourceDatabaseDeletionDate": {
          "type": "string",
          "description": "Specifies the time that the sql pool was deleted",
          "format": "date-time",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        }
      }
    },
    "TrackedResource": {
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ],
          "description": "Resource tags."
        },
        "location": {
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ],
          "description": "The geo-location where the resource lives"
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}