package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication
Documentation
The volumesreplication
SDK allows for interaction with the Azure Resource Manager Service netapp
(API Version 2023-11-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication"
Client Initialization
client := volumesreplication.NewVolumesReplicationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: VolumesReplicationClient.VolumesAuthorizeReplication
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
payload := volumesreplication.AuthorizeRequest{
// ...
}
if err := client.VolumesAuthorizeReplicationThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VolumesReplicationClient.VolumesBreakReplication
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
payload := volumesreplication.BreakReplicationRequest{
// ...
}
if err := client.VolumesBreakReplicationThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VolumesReplicationClient.VolumesDeleteReplication
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
if err := client.VolumesDeleteReplicationThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VolumesReplicationClient.VolumesListReplications
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
read, err := client.VolumesListReplications(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VolumesReplicationClient.VolumesReInitializeReplication
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
if err := client.VolumesReInitializeReplicationThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VolumesReplicationClient.VolumesReestablishReplication
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
payload := volumesreplication.ReestablishReplicationRequest{
// ...
}
if err := client.VolumesReestablishReplicationThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VolumesReplicationClient.VolumesReplicationStatus
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
read, err := client.VolumesReplicationStatus(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VolumesReplicationClient.VolumesResyncReplication
ctx := context.TODO()
id := volumesreplication.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")
if err := client.VolumesResyncReplicationThenPoll(ctx, id); err != nil {
// handle the error
}