{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-storage-accounts/json-schema/azure-storage-accounts-storage-account-migration-schema.json",
  "title": "StorageAccountMigration",
  "description": "The parameters or status associated with an ongoing or enqueued storage account migration in order to update its current SKU or region.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-storage-accounts-storageaccountmigrations-api-openapi.yml#/components/schemas/StorageAccountMigration",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/StorageAccountMigrationProperties",
      "description": "The properties of a storage account’s ongoing or enqueued migration.",
      "x-ms-client-flatten": true,
      "x-ms-client-name": "StorageAccountMigrationDetails"
    }
  },
  "required": [
    "properties"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "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
    },
    "SkuName": {
      "type": "string",
      "description": "The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.",
      "enum": [
        "Standard_LRS",
        "Standard_GRS",
        "Standard_RAGRS",
        "Standard_ZRS",
        "Premium_LRS",
        "Premium_ZRS",
        "Standard_GZRS",
        "Standard_RAGZRS",
        "StandardV2_LRS",
        "StandardV2_GRS",
        "StandardV2_ZRS",
        "StandardV2_GZRS",
        "PremiumV2_LRS",
        "PremiumV2_ZRS"
      ],
      "x-ms-enum": {
        "name": "SkuName",
        "modelAsString": true,
        "values": [
          {
            "name": "Standard_LRS",
            "value": "Standard_LRS"
          },
          {
            "name": "Standard_GRS",
            "value": "Standard_GRS"
          },
          {
            "name": "Standard_RAGRS",
            "value": "Standard_RAGRS"
          },
          {
            "name": "Standard_ZRS",
            "value": "Standard_ZRS"
          },
          {
            "name": "Premium_LRS",
            "value": "Premium_LRS"
          },
          {
            "name": "Premium_ZRS",
            "value": "Premium_ZRS"
          },
          {
            "name": "Standard_GZRS",
            "value": "Standard_GZRS"
          },
          {
            "name": "Standard_RAGZRS",
            "value": "Standard_RAGZRS"
          },
          {
            "name": "StandardV2_LRS",
            "value": "StandardV2_LRS"
          },
          {
            "name": "StandardV2_GRS",
            "value": "StandardV2_GRS"
          },
          {
            "name": "StandardV2_ZRS",
            "value": "StandardV2_ZRS"
          },
          {
            "name": "StandardV2_GZRS",
            "value": "StandardV2_GZRS"
          },
          {
            "name": "PremiumV2_LRS",
            "value": "PremiumV2_LRS"
          },
          {
            "name": "PremiumV2_ZRS",
            "value": "PremiumV2_ZRS"
          }
        ]
      }
    },
    "StorageAccountMigrationProperties": {
      "type": "object",
      "description": "The properties of a storage account's ongoing or enqueued migration.",
      "properties": {
        "targetSkuName": {
          "$ref": "#/$defs/SkuName",
          "description": "Target sku name for the account"
        },
        "migrationStatus": {
          "$ref": "#/$defs/migrationStatus",
          "description": "Current status of migration",
          "readOnly": true
        },
        "migrationFailedReason": {
          "type": "string",
          "description": "Error code for migration failure",
          "readOnly": true
        },
        "migrationFailedDetailedReason": {
          "type": "string",
          "description": "Reason for migration failure",
          "readOnly": true
        }
      },
      "required": [
        "targetSkuName"
      ]
    },
    "migrationStatus": {
      "type": "string",
      "description": "Current status of migration",
      "enum": [
        "Invalid",
        "SubmittedForConversion",
        "InProgress",
        "Complete",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "migrationStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Invalid",
            "value": "Invalid"
          },
          {
            "name": "SubmittedForConversion",
            "value": "SubmittedForConversion"
          },
          {
            "name": "InProgress",
            "value": "InProgress"
          },
          {
            "name": "Complete",
            "value": "Complete"
          },
          {
            "name": "Failed",
            "value": "Failed"
          }
        ]
      }
    }
  }
}