Categorygithub.com/hashicorp/go-azure-sdk/resource-managerrecoveryservicessiterecovery2023-08-01replicationmigrationitems
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/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems
Documentation
The replicationmigrationitems
SDK allows for interaction with the Azure Resource Manager Service recoveryservicessiterecovery
(API Version 2023-08-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/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems"
Client Initialization
client := replicationmigrationitems.NewReplicationMigrationItemsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ReplicationMigrationItemsClient.Create
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.EnableMigrationInput{
// ...
}
if err := client.CreateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.Delete
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
if err := client.DeleteThenPoll(ctx, id, replicationmigrationitems.DefaultDeleteOperationOptions()); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.Get
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
read, err := client.Get(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ReplicationMigrationItemsClient.List
ctx := context.TODO()
id := replicationmigrationitems.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue")
// alternatively `client.List(ctx, id, replicationmigrationitems.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, replicationmigrationitems.DefaultListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ReplicationMigrationItemsClient.ListByReplicationProtectionContainers
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationProtectionContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue")
// alternatively `client.ListByReplicationProtectionContainers(ctx, id, replicationmigrationitems.DefaultListByReplicationProtectionContainersOperationOptions())` can be used to do batched pagination
items, err := client.ListByReplicationProtectionContainersComplete(ctx, id, replicationmigrationitems.DefaultListByReplicationProtectionContainersOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ReplicationMigrationItemsClient.Migrate
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.MigrateInput{
// ...
}
if err := client.MigrateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.PauseReplication
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.PauseReplicationInput{
// ...
}
if err := client.PauseReplicationThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.ResumeReplication
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.ResumeReplicationInput{
// ...
}
if err := client.ResumeReplicationThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.Resync
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.ResyncInput{
// ...
}
if err := client.ResyncThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.TestMigrate
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.TestMigrateInput{
// ...
}
if err := client.TestMigrateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.TestMigrateCleanup
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.TestMigrateCleanupInput{
// ...
}
if err := client.TestMigrateCleanupThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ReplicationMigrationItemsClient.Update
ctx := context.TODO()
id := replicationmigrationitems.NewReplicationMigrationItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue", "replicationFabricValue", "replicationProtectionContainerValue", "replicationMigrationItemValue")
payload := replicationmigrationitems.UpdateMigrationItemInput{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}