Прерывание динамической миграции учетной записи хранения для включения Hns
POST https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration?api-version=2021-09-01
Параметры URI
Name
In
Required
Type
Description
accountName
path
True
string
Имя учетной записи хранения в указанной группе ресурсов. Имя учетной записи хранения должно содержать от 3 до 24 символов и состоять только из цифр и букв нижнего регистра.
resourceGroupName
path
True
string
Имя группы ресурсов в подписке пользователя. Регистр букв в имени не учитывается.
Regex pattern: ^[-\w\._\(\)]+$
subscriptionId
path
True
string
Идентификатор целевой подписки.
api-version
query
True
string
Версия API, используемая для этой операции.
Ответы
Name
Type
Description
200 OK
ОК — возвращается, когда миграция учетной записи хранения в иерархическое пространство имен прервана.
202 Accepted
Принято — отклонен запрос на миграцию иерархического пространства имен; операция завершится асинхронно.
POST https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto2434/aborthnsonmigration?api-version=2021-09-01
import com.azure.core.util.Context;
/** Samples for StorageAccounts AbortHierarchicalNamespaceMigration. */
public final class Main {
/*
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json
*/
/**
* Sample code: StorageAccountAbortHierarchicalNamespaceMigration.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void storageAccountAbortHierarchicalNamespaceMigration(
com.azure.resourcemanager.AzureResourceManager azure) {
azure
.storageAccounts()
.manager()
.serviceClient()
.getStorageAccounts()
.abortHierarchicalNamespaceMigration("res4228", "sto2434", Context.NONE);
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
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/tree/main/specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json
func ExampleAccountsClient_BeginAbortHierarchicalNamespaceMigration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstorage.NewAccountsClient("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginAbortHierarchicalNamespaceMigration(ctx,
"res4228",
"sto2434",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Abort live Migration of storage account to enable Hns
*
* @summary Abort live Migration of storage account to enable Hns
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json
*/
async function storageAccountAbortHierarchicalNamespaceMigration() {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4228";
const accountName = "sto2434";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.beginAbortHierarchicalNamespaceMigrationAndWait(
resourceGroupName,
accountName
);
console.log(result);
}
storageAccountAbortHierarchicalNamespaceMigration().catch(console.error);
Read this SDK documentation on how to add the SDK to your project and authenticate.