Storage Accounts - Customer Initiated Migration
Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration?api-version=2024-01-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string minLength: 3maxLength: 24 pattern: ^[a-z0-9]+$ |
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
The name of the resource group within the user's subscription. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.targetSkuName | True |
Target sku name for the account |
|
name |
string |
current value is 'default' for customer initiated migration |
|
type |
string |
SrpAccountMigrationType in ARM contract which is 'accountMigrations' |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK -- Returned when the request is just for validating the migration request, it does not actually initiate migration; applicable in cross region migration currently. |
|
202 Accepted |
Accepted -- Migration request accepted; operation will complete asynchronously. Headers Location: string |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
StorageAccountPostMigration
Sample request
Sample response
location: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2022-09-01
Definitions
Name | Description |
---|---|
Error |
An error response from the storage resource provider. |
Error |
Error response body contract. |
migration |
Current status of migration |
Sku |
The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. |
Storage |
The parameters or status associated with an ongoing or enqueued storage account migration in order to update its current SKU or region. |
ErrorResponse
An error response from the storage resource provider.
Name | Type | Description |
---|---|---|
error |
Azure Storage Resource Provider error response body. |
ErrorResponseBody
Error response body contract.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
migrationStatus
Current status of migration
Value | Description |
---|---|
Complete | |
Failed | |
InProgress | |
Invalid | |
SubmittedForConversion |
SkuName
The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.
Value | Description |
---|---|
PremiumV2_LRS | |
PremiumV2_ZRS | |
Premium_LRS | |
Premium_ZRS | |
StandardV2_GRS | |
StandardV2_GZRS | |
StandardV2_LRS | |
StandardV2_ZRS | |
Standard_GRS | |
Standard_GZRS | |
Standard_LRS | |
Standard_RAGRS | |
Standard_RAGZRS | |
Standard_ZRS |
StorageAccountMigration
The parameters or status associated with an ongoing or enqueued storage account migration in order to update its current SKU or region.
Name | Type | Description |
---|---|---|
id |
string |
Migration Resource Id |
name |
string |
current value is 'default' for customer initiated migration |
properties.migrationFailedDetailedReason |
string |
Reason for migration failure |
properties.migrationFailedReason |
string |
Error code for migration failure |
properties.migrationStatus |
Current status of migration |
|
properties.targetSkuName |
Target sku name for the account |
|
type |
string |
SrpAccountMigrationType in ARM contract which is 'accountMigrations' |