{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cache-for-redis/json-schema/microsoft-azure-cache-for-redis-migration-schema.json",
  "title": "Migration",
  "description": "Describes the current migration operation on a Redis Enterprise cluster.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-cache-for-redis-migrations-api-openapi.yml#/components/schemas/Migration",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/MigrationProperties",
      "description": "Properties of the migration operation."
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "MigrationProperties": {
      "type": "object",
      "description": "Properties for Redis Enterprise migration operation.",
      "properties": {
        "sourceType": {
          "$ref": "#/$defs/SourceType",
          "description": "Describes the source of the migration operation."
        },
        "targetResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The Azure resource ID of the Azure Managed Redis destination cache to migrate.",
          "readOnly": true,
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.Cache/redisEnterprise"
              }
            ]
          }
        },
        "provisioningState": {
          "$ref": "#/$defs/MigrationProvisioningState",
          "description": "Current provisioning status of the migration",
          "readOnly": true
        },
        "statusDetails": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional details about the migration operation's status in free text format.",
          "readOnly": true
        },
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the migration operation was created.",
          "readOnly": true
        },
        "lastModifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the migration operation was last updated.",
          "readOnly": true
        },
        "rollbackEligibleUntil": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp until which a successful migration remains eligible to be undone (rolled back) to the source cache. This property is only returned while the migration is in the Succeeded state, and is calculated from the time the migration succeeded plus the rollback window. After this time the source cache is released and the migration can no longer be undone.",
          "readOnly": true
        }
      },
      "required": [
        "sourceType"
      ]
    },
    "MigrationProvisioningState": {
      "type": "string",
      "description": "Current provisioning status",
      "enum": [
        "Accepted",
        "InProgress",
        "ReadyForDnsSwitch",
        "Succeeded",
        "Failed",
        "Cancelling",
        "Cancelled",
        "CancellationFailed",
        "Unlinking",
        "Unlinked",
        "UnlinkFailed"
      ],
      "x-ms-enum": {
        "name": "MigrationProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Accepted",
            "value": "Accepted",
            "description": "The request has been accepted and the migration operation is being initialized."
          },
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "The migration operation is in progress."
          },
          {
            "name": "ReadyForDnsSwitch",
            "value": "ReadyForDnsSwitch",
            "description": "The migration operation has completed transferring data and is ready for DNS switch."
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "The migration operation has completed successfully."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "The migration operation has failed."
          },
          {
            "name": "Cancelling",
            "value": "Cancelling",
            "description": "The migration operation is being cancelled."
          },
          {
            "name": "Cancelled",
            "value": "Cancelled",
            "description": "The migration operation has been cancelled."
          },
          {
            "name": "CancellationFailed",
            "value": "CancellationFailed",
            "description": "The migration operation cancellation has failed."
          },
          {
            "name": "Unlinking",
            "value": "Unlinking",
            "description": "The migrated endpoint is being unlinked from the cluster."
          },
          {
            "name": "Unlinked",
            "value": "Unlinked",
            "description": "The migrated endpoint has been unlinked from the cluster."
          },
          {
            "name": "UnlinkFailed",
            "value": "UnlinkFailed",
            "description": "Unlinking the migrated endpoint from the cluster has failed."
          }
        ]
      }
    },
    "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
    },
    "SourceType": {
      "type": "string",
      "description": "Describes the source of the migration operation.",
      "enum": [
        "AzureCacheForRedis"
      ],
      "x-ms-enum": {
        "name": "SourceType",
        "modelAsString": true,
        "values": [
          {
            "name": "AzureCacheForRedis",
            "value": "AzureCacheForRedis",
            "description": "Migration from Azure Cache for Redis to Redis Enterprise."
          }
        ]
      }
    }
  }
}