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/dataprotection/2023-05-01/backupinstances Documentation

The backupinstances SDK allows for interaction with the Azure Resource Manager Service dataprotection (API Version 2023-05-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/dataprotection/2023-05-01/backupinstances"

Client Initialization

client := backupinstances.NewBackupInstancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BackupInstancesClient.AdhocBackup

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

payload := backupinstances.TriggerBackupRequest{
	// ...
}


if err := client.AdhocBackupThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.CreateOrUpdate

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

payload := backupinstances.BackupInstanceResource{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.Delete

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.Get

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

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: BackupInstancesClient.List

ctx := context.TODO()
id := backupinstances.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: BackupInstancesClient.ResumeBackups

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

if err := client.ResumeBackupsThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.ResumeProtection

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

if err := client.ResumeProtectionThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.StopProtection

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

if err := client.StopProtectionThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.SuspendBackups

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

if err := client.SuspendBackupsThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.SyncBackupInstance

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

payload := backupinstances.SyncBackupInstanceRequest{
	// ...
}


if err := client.SyncBackupInstanceThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.TriggerRehydrate

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

payload := backupinstances.AzureBackupRehydrationRequest{
	// ...
}


if err := client.TriggerRehydrateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.TriggerRestore

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

payload := backupinstances.AzureBackupRestoreRequest{
	// ...
}


if err := client.TriggerRestoreThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.ValidateForBackup

ctx := context.TODO()
id := backupinstances.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue")

payload := backupinstances.ValidateForBackupRequest{
	// ...
}


if err := client.ValidateForBackupThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: BackupInstancesClient.ValidateForRestore

ctx := context.TODO()
id := backupinstances.NewBackupInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "backupVaultValue", "backupInstanceValue")

payload := backupinstances.ValidateRestoreRequestObject{
	// ...
}


if err := client.ValidateForRestoreThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

# Functions

NewBackupInstanceID returns a new BackupInstanceId struct.
No description provided by the author
NewBackupVaultID returns a new BackupVaultId struct.
ParseBackupInstanceID parses 'input' into a BackupInstanceId.
ParseBackupInstanceIDInsensitively parses 'input' case-insensitively into a BackupInstanceId note: this method should only be used for API response data and not user input.
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.
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
No description provided by the author
No description provided by the author
No description provided by the author
ValidateBackupInstanceID checks that 'input' can be parsed as a Backup Instance ID.
ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID.

# Constants

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
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
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
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
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

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
BackupInstanceId is a struct representing the Resource ID for a Backup Instance.
No description provided by the author
No description provided by the author
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
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
RawOperationExtendedInfoImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
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
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

# Interfaces

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

# Type aliases

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
No description provided by the author
No description provided by the author
No description provided by the author