{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-sql-database/json-schema/microsoft-azure-sql-database-database-update-schema.json",
  "title": "DatabaseUpdate",
  "description": "A database update resource.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-sql-database-databases-api-openapi.yml#/components/schemas/DatabaseUpdate",
  "type": "object",
  "properties": {
    "sku": {
      "$ref": "#/$defs/sku"
    },
    "identity": {
      "$ref": "#/$defs/DatabaseIdentity"
    },
    "properties": {
      "$ref": "#/$defs/DatabaseUpdateProperties"
    },
    "tags": {
      "type": "object",
      "description": "Resource tags.",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "DatabaseIdentity": {
      "type": "object",
      "description": "Azure Active Directory identity configuration for a resource.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The identity type",
          "enum": [
            "None",
            "UserAssigned"
          ],
          "x-ms-enum": {
            "name": "DatabaseIdentityType",
            "modelAsString": true,
            "values": [
              {
                "name": "None",
                "value": "None",
                "description": "None"
              },
              {
                "name": "UserAssigned",
                "value": "UserAssigned",
                "description": "UserAssigned"
              }
            ]
          }
        },
        "tenantId": {
          "type": "string",
          "format": "uuid",
          "description": "Universally Unique Identifier"
        },
        "userAssignedIdentities": {
          "type": "object",
          "description": "The resource ids of the user assigned identities to use",
          "additionalProperties": {
            "$ref": "#/$defs/DatabaseUserIdentity"
          }
        }
      }
    },
    "DatabaseUpdateProperties": {
      "type": "object",
      "description": "A database update properties.",
      "properties": {
        "createMode": {
          "$ref": "#/$defs/createMode"
        },
        "collation": {
          "type": "string",
          "description": "The collation of the database.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "maxSizeBytes": {
          "type": "integer",
          "format": "int64",
          "description": "The max size of the database expressed in bytes."
        },
        "sampleName": {
          "$ref": "#/$defs/sampleName"
        },
        "elasticPoolId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource identifier of the elastic pool containing this database.",
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.Sql/servers/elasticPools"
              }
            ]
          }
        },
        "sourceDatabaseId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource identifier of the source database associated with create operation of this database.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "databaseId": {
          "$ref": "#/$defs/tenantId"
        },
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "The creation date of the database (ISO8601 format).",
          "readOnly": true
        },
        "currentServiceObjectiveName": {
          "type": "string",
          "description": "The current service level objective name of the database.",
          "readOnly": true
        },
        "requestedServiceObjectiveName": {
          "type": "string",
          "description": "The requested service level objective name of the database.",
          "readOnly": true
        },
        "defaultSecondaryLocation": {
          "type": "string",
          "description": "The default secondary region for this database.",
          "readOnly": true
        },
        "failoverGroupId": {
          "type": "string",
          "description": "Failover Group resource identifier that this database belongs to.",
          "readOnly": true
        },
        "restorePointInTime": {
          "type": "string",
          "format": "date-time",
          "description": "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "sourceDatabaseDeletionDate": {
          "type": "string",
          "format": "date-time",
          "description": "Specifies the time that the database was deleted.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "recoveryServicesRecoveryPointId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource identifier of the recovery point associated with create operation of this database.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "longTermRetentionBackupResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource identifier of the long term retention backup associated with create operation of this database.",
          "x-ms-mutability": [
            "create"
          ],
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.Sql/locations/longTermRetentionBackups"
              }
            ]
          }
        },
        "recoverableDatabaseId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource identifier of the recoverable database associated with create operation of this database.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "restorableDroppedDatabaseId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource identifier of the restorable dropped database associated with create operation of this database.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "catalogCollation": {
          "$ref": "#/$defs/catalogCollation"
        },
        "zoneRedundant": {
          "type": "boolean",
          "description": "Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones."
        },
        "licenseType": {
          "$ref": "#/$defs/licenseType"
        },
        "maxLogSizeBytes": {
          "type": "integer",
          "format": "int64",
          "description": "The max log size for this database.",
          "readOnly": true
        },
        "earliestRestoreDate": {
          "type": "string",
          "format": "date-time",
          "description": "This records the earliest start date and time that restore is available for this database (ISO8601 format).",
          "readOnly": true
        },
        "readScale": {
          "$ref": "#/$defs/readScale"
        },
        "highAvailabilityReplicaCount": {
          "type": "integer",
          "format": "int32",
          "description": "The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool."
        },
        "secondaryType": {
          "$ref": "#/$defs/secondaryType"
        },
        "currentSku": {
          "$ref": "#/$defs/sku"
        },
        "autoPauseDelay": {
          "type": "integer",
          "format": "int32",
          "description": "Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled"
        },
        "currentBackupStorageRedundancy": {
          "$ref": "#/$defs/currentBackupStorageRedundancy"
        },
        "requestedBackupStorageRedundancy": {
          "$ref": "#/$defs/currentBackupStorageRedundancy"
        },
        "minCapacity": {
          "type": "number",
          "format": "double",
          "description": "Minimal capacity that database will always have allocated, if not paused"
        },
        "pausedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.",
          "readOnly": true
        },
        "resumedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.",
          "readOnly": true
        },
        "maintenanceConfigurationId": {
          "type": "string",
          "description": "Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur."
        },
        "isLedgerOn": {
          "type": "boolean",
          "description": "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created."
        },
        "isInfraEncryptionEnabled": {
          "type": "boolean",
          "description": "Infra encryption is enabled for this database.",
          "readOnly": true
        },
        "federatedClientId": {
          "$ref": "#/$defs/tenantId"
        },
        "keys": {
          "type": "object",
          "description": "The resource ids of the user assigned identities to use",
          "additionalProperties": {
            "$ref": "#/$defs/additionalProperties"
          }
        },
        "encryptionProtector": {
          "type": "string",
          "description": "The azure key vault URI of the database if it's configured with per Database Customer Managed Keys."
        },
        "preferredEnclaveType": {
          "$ref": "#/$defs/preferredEnclaveType"
        },
        "useFreeLimit": {
          "type": "boolean",
          "description": "Whether or not the database uses free monthly limits. Allowed on one database in a subscription."
        },
        "freeLimitExhaustionBehavior": {
          "$ref": "#/$defs/freeLimitExhaustionBehavior"
        },
        "manualCutover": {
          "type": "boolean",
          "description": "Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.\n\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.\n\nWhen manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.\n\nTo trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state."
        },
        "performCutover": {
          "type": "boolean",
          "description": "To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.\n\nThis property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.\n\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.\n\nWhen performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database."
        },
        "encryptionProtectorAutoRotation": {
          "type": "boolean",
          "description": "The flag to enable or disable auto rotation of database encryption protector AKV key."
        }
      }
    },
    "DatabaseUserIdentity": {
      "type": "object",
      "description": "Azure Active Directory identity configuration for a resource.",
      "properties": {
        "principalId": {
          "$ref": "#/$defs/tenantId"
        },
        "clientId": {
          "$ref": "#/$defs/tenantId"
        }
      }
    }
  }
}