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/backupvaults
Documentation
The backupvaults
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/backupvaults"
Client Initialization
client := backupvaults.NewBackupVaultsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: BackupVaultsClient.CreateOrUpdate
ctx := context.TODO()
id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue")
payload := backupvaults.BackupVault{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: BackupVaultsClient.Delete
ctx := context.TODO()
id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: BackupVaultsClient.Get
ctx := context.TODO()
id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue")
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: BackupVaultsClient.ListByNetAppAccount
ctx := context.TODO()
id := backupvaults.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue")
// alternatively `client.ListByNetAppAccount(ctx, id)` can be used to do batched pagination
items, err := client.ListByNetAppAccountComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: BackupVaultsClient.Update
ctx := context.TODO()
id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue")
payload := backupvaults.BackupVaultPatch{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
# Functions
NewBackupVaultID returns a new BackupVaultId struct.
No description provided by the author
NewNetAppAccountID returns a new NetAppAccountId struct.
ParseBackupVaultID parses 'input' into a BackupVaultId.
ParseBackupVaultIDInsensitively parses 'input' case-insensitively into a BackupVaultId note: this method should only be used for API response data and not user input.
ParseNetAppAccountID parses 'input' into a NetAppAccountId.
ParseNetAppAccountIDInsensitively parses 'input' case-insensitively into a NetAppAccountId note: this method should only be used for API response data and not user input.
ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID.
ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID.
# Structs
No description provided by the author
BackupVaultId is a struct representing the Resource ID for a Backup Vault.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NetAppAccountId is a struct representing the Resource ID for a Net App Account.
No description provided by the author