Sdílet prostřednictvím


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=2023-05-01

URI Parameters

Name In Required Type Description
accountName
path True

string

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.

Regex pattern: ^[a-z0-9]+$

resourceGroupName
path True

string

The name of the resource group within the user's subscription. The name is case insensitive.

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
properties.targetSkuName True

SkuName

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

ErrorResponse

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

POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/startAccountMigration?api-version=2023-05-01

{
  "properties": {
    "targetSkuName": "Standard_ZRS"
  }
}

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
ErrorResponse

An error response from the storage resource provider.

ErrorResponseBody

Error response body contract.

migrationStatus

Current status of migration

SkuName

The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.

StorageAccountMigration

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

ErrorResponseBody

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

Name Type Description
Complete

string

Failed

string

InProgress

string

Invalid

string

SubmittedForConversion

string

SkuName

The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.

Name Type Description
Premium_LRS

string

Premium_ZRS

string

Standard_GRS

string

Standard_GZRS

string

Standard_LRS

string

Standard_RAGRS

string

Standard_RAGZRS

string

Standard_ZRS

string

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

migrationStatus

Current status of migration

properties.targetSkuName

SkuName

Target sku name for the account

type

string

SrpAccountMigrationType in ARM contract which is 'accountMigrations'