Ruft den status der laufenden Migration für das angegebene Speicherkonto ab.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/accountMigrations/default?api-version=2023-01-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
accountName
|
path |
True
|
string
|
Der Name des Speicherkontos innerhalb der angegebenen Ressourcengruppe. Speicherkontonamen müssen zwischen 3 und 24 Zeichen lang sein und dürfen nur Zahlen und Kleinbuchstaben enthalten.
Regex pattern: ^[a-z0-9]+$
|
migrationName
|
path |
True
|
MigrationName
|
Der Name der Speicherkontomigration. Es sollte immer "Standard" sein.
Regex pattern: ^[a-z][a-z0-9]*$
|
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe im Abonnement des Benutzers. Für den Namen wird die Groß-/Kleinschreibung nicht beachtet.
Regex pattern: ^[-\w\._\(\)]+$
|
subscriptionId
|
path |
True
|
string
|
Hierbei handelt es sich um die ID des Zielabonnements.
|
api-version
|
query |
True
|
string
|
Hierbei handelt es sich um die für diesen Vorgang zu verwendende API-Version.
|
Antworten
Name |
Typ |
Beschreibung |
200 OK
|
StorageAccountMigration
|
OK: Rufen Sie die Details der laufenden oder abgeschlossenen Migration erfolgreich ab.
|
Other Status Codes
|
ErrorResponse
|
Fehlerantwort mit Beschreibung des Grunds für den Fehler.
|
Sicherheit
azure_auth
Azure Active Directory-OAuth2-Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel Ihres Benutzerkontos
|
Beispiele
StorageAccountGetMigrationFailed
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default?api-version=2023-01-01
import com.azure.resourcemanager.storage.models.MigrationName;
/** Samples for StorageAccounts GetCustomerInitiatedMigration. */
public final class Main {
/*
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/
* StorageAccountGetMigrationFailed.json
*/
/**
* Sample code: StorageAccountGetMigrationFailed.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void storageAccountGetMigrationFailed(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getStorageAccounts()
.getCustomerInitiatedMigrationWithResponse("resource-group-name", "accountname", MigrationName.DEFAULT,
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_get_migration_failed.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.storage_accounts.get_customer_initiated_migration(
resource_group_name="resource-group-name",
account_name="accountname",
migration_name="default",
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetMigrationFailed.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetMigrationFailed.json
func ExampleAccountsClient_GetCustomerInitiatedMigration_storageAccountGetMigrationFailed() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().GetCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.MigrationNameDefault, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccountMigration = armstorage.AccountMigration{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/accountMigrations"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default"),
// StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{
// MigrationFailedDetailedReason: to.Ptr("ZRS is not supported for accounts with archive data."),
// MigrationFailedReason: to.Ptr("ZrsNotSupportedForAccountWithArchiveData"),
// MigrationStatus: to.Ptr(armstorage.MigrationStatusFailed),
// TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account.
*
* @summary Gets the status of the ongoing migration for the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetMigrationFailed.json
*/
async function storageAccountGetMigrationFailed() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name";
const accountName = "accountname";
const migrationName = "default";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.getCustomerInitiatedMigration(
resourceGroupName,
accountName,
migrationName
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default",
"name": "default",
"type": "Microsoft.Storage/storageAccounts/accountMigrations",
"properties": {
"targetSkuName": "Standard_ZRS",
"migrationStatus": "Failed",
"migrationFailedReason": "ZrsNotSupportedForAccountWithArchiveData",
"migrationFailedDetailedReason": "ZRS is not supported for accounts with archive data."
}
}
StorageAccountGetMigrationInProgress
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default?api-version=2023-01-01
import com.azure.resourcemanager.storage.models.MigrationName;
/** Samples for StorageAccounts GetCustomerInitiatedMigration. */
public final class Main {
/*
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/
* StorageAccountGetMigrationInProgress.json
*/
/**
* Sample code: StorageAccountGetMigrationInProgress.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void storageAccountGetMigrationInProgress(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getStorageAccounts()
.getCustomerInitiatedMigrationWithResponse("resource-group-name", "accountname", MigrationName.DEFAULT,
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_get_migration_in_progress.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.storage_accounts.get_customer_initiated_migration(
resource_group_name="resource-group-name",
account_name="accountname",
migration_name="default",
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetMigrationInProgress.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetMigrationInProgress.json
func ExampleAccountsClient_GetCustomerInitiatedMigration_storageAccountGetMigrationInProgress() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().GetCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.MigrationNameDefault, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccountMigration = armstorage.AccountMigration{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/accountMigrations"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default"),
// StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{
// MigrationStatus: to.Ptr(armstorage.MigrationStatusInProgress),
// TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account.
*
* @summary Gets the status of the ongoing migration for the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetMigrationInProgress.json
*/
async function storageAccountGetMigrationInProgress() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name";
const accountName = "accountname";
const migrationName = "default";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.getCustomerInitiatedMigration(
resourceGroupName,
accountName,
migrationName
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default",
"name": "default",
"type": "Microsoft.Storage/storageAccounts/accountMigrations",
"properties": {
"targetSkuName": "Standard_ZRS",
"migrationStatus": "InProgress"
}
}
Definitionen
Name |
Beschreibung |
ErrorResponse
|
Eine Fehlerantwort des Speicherressourcenanbieters.
|
ErrorResponseBody
|
Fehlerantworttextvertrag.
|
MigrationName
|
Der Name der Speicherkontomigration. Es sollte immer "Standard" sein.
|
migrationStatus
|
Aktuelle status der Migration
|
SkuName
|
Der SKU-Name. Erforderlich für die Kontoerstellung; optional für das Update. Beachten Sie, dass in älteren Versionen der SKU-Name accountType genannt wurde.
|
StorageAccountMigration
|
Die Parameter oder status, die einer laufenden oder in die Warteschlange gestellten Speicherkontomigration zugeordnet sind, um die aktuelle SKU oder Region zu aktualisieren.
|
ErrorResponse
Eine Fehlerantwort des Speicherressourcenanbieters.
Name |
Typ |
Beschreibung |
error
|
ErrorResponseBody
|
Fehlerantworttext des Azure Storage-Ressourcenanbieters.
|
ErrorResponseBody
Fehlerantworttextvertrag.
Name |
Typ |
Beschreibung |
code
|
string
|
Ein Bezeichner für den Fehler. Codes sind unveränderlich und sollten programmgesteuert verwendet werden.
|
message
|
string
|
Eine Meldung, die den Fehler beschreibt, die für die Anzeige in einer Benutzeroberfläche geeignet sein soll.
|
MigrationName
Der Name der Speicherkontomigration. Es sollte immer "Standard" sein.
Name |
Typ |
Beschreibung |
default
|
string
|
|
migrationStatus
Aktuelle status der Migration
Name |
Typ |
Beschreibung |
Complete
|
string
|
|
Failed
|
string
|
|
InProgress
|
string
|
|
Invalid
|
string
|
|
SubmittedForConversion
|
string
|
|
SkuName
Der SKU-Name. Erforderlich für die Kontoerstellung; optional für das Update. Beachten Sie, dass in älteren Versionen der SKU-Name accountType genannt wurde.
Name |
Typ |
Beschreibung |
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
Die Parameter oder status, die einer laufenden oder in die Warteschlange gestellten Speicherkontomigration zugeordnet sind, um die aktuelle SKU oder Region zu aktualisieren.
Name |
Typ |
Beschreibung |
id
|
string
|
Migrationsressourcen-ID
|
name
|
string
|
Der aktuelle Wert ist "Default" für die vom Kunden initiierte Migration.
|
properties.migrationFailedDetailedReason
|
string
|
Grund für Migrationsfehler
|
properties.migrationFailedReason
|
string
|
Fehlercode für Migrationsfehler
|
properties.migrationStatus
|
migrationStatus
|
Aktuelle status der Migration
|
properties.targetSkuName
|
SkuName
|
Ziel-SKU-Name für das Konto
|
type
|
string
|
SrpAccountMigrationType im ARM-Vertrag, der "accountMigrations" lautet
|