Wykonywanie transferu replikacji
Wykonuje transfer replikacji adhoc na woluminie z migracją volumeType
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer?api-version=2024-09-01
Parametry identyfikatora URI
Nazwa |
W |
Wymagane |
Typ |
Opis |
accountName
|
path |
True
|
string
|
Nazwa konta usługi NetApp
Wzorzec wyrażenia regularnego: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$
|
poolName
|
path |
True
|
string
|
Nazwa puli pojemności
Wzorzec wyrażenia regularnego: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$
|
resourceGroupName
|
path |
True
|
string
|
Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.
|
subscriptionId
|
path |
True
|
string
uuid
|
Identyfikator subskrypcji docelowej. Wartość musi być identyfikatorem UUID.
|
volumeName
|
path |
True
|
string
|
Nazwa woluminu
Wzorzec wyrażenia regularnego: ^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$
|
api-version
|
query |
True
|
string
|
Wersja interfejsu API do użycia dla tej operacji.
|
Odpowiedzi
Nazwa |
Typ |
Opis |
202 Accepted
|
|
Akceptowane
Nagłówki
Location: string
|
Other Status Codes
|
ErrorResponse
|
Odpowiedź na błąd opisująca, dlaczego operacja nie powiodła się.
|
Zabezpieczenia
azure_auth
Przepływ protokołu OAuth2 usługi Azure Active Directory
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
Nazwa |
Opis |
user_impersonation
|
personifikacja konta użytkownika
|
Przykłady
Przykładowe żądanie
POST https://management.azure.com/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/performReplicationTransfer?api-version=2024-09-01
/**
* Samples for Volumes PerformReplicationTransfer.
*/
public final class Main {
/*
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-09-01/examples/
* Volumes_PerformReplicationTransfer.json
*/
/**
* Sample code: Volumes_PerformReplicationTransfer.
*
* @param manager Entry point to NetAppFilesManager.
*/
public static void volumesPerformReplicationTransfer(com.azure.resourcemanager.netapp.NetAppFilesManager manager) {
manager.volumes().performReplicationTransfer("myRG", "account1", "pool1", "volume1",
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
package armnetapp_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e6892bbc13d89929cdbe3b39385628543263f80b/specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-09-01/examples/Volumes_PerformReplicationTransfer.json
func ExampleVolumesClient_BeginPerformReplicationTransfer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetapp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewVolumesClient().BeginPerformReplicationTransfer(ctx, "myRG", "account1", "pool1", "volume1", 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)
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Net;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.NetApp.Models;
using Azure.ResourceManager.NetApp;
// Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-09-01/examples/Volumes_PerformReplicationTransfer.json
// this example is just showing the usage of "Volumes_PerformReplicationTransfer" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this NetAppVolumeResource created on azure
// for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource
string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
string resourceGroupName = "myRG";
string accountName = "account1";
string poolName = "pool1";
string volumeName = "volume1";
ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName);
NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId);
// invoke the operation
await netAppVolume.PerformReplicationTransferAsync(WaitUntil.Completed);
Console.WriteLine("Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
Location: https://management.azure.com/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/operationResults/616ee961-4042-4935-b4a0-ed6f4dae0172?api-version=2024-09-01&operationResultResponseType=Location
Definicje
ErrorAdditionalInfo
Object
Dodatkowe informacje o błędzie zarządzania zasobami.
Nazwa |
Typ |
Opis |
info
|
object
|
Dodatkowe informacje.
|
type
|
string
|
Dodatkowy typ informacji.
|
ErrorDetail
Object
Szczegóły błędu.
Nazwa |
Typ |
Opis |
additionalInfo
|
ErrorAdditionalInfo[]
|
Dodatkowe informacje o błędzie.
|
code
|
string
|
Kod błędu.
|
details
|
ErrorDetail[]
|
Szczegóły błędu.
|
message
|
string
|
Komunikat o błędzie.
|
target
|
string
|
Element docelowy błędu.
|
ErrorResponse
Object
Odpowiedź na błąd