backups

package
v0.20231002.1065327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-11-01-preview/backups Documentation

The backups SDK allows for interaction with the Azure Resource Manager Service netapp (API Version 2022-11-01-preview).

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/2022-11-01-preview/backups"

Client Initialization

client := backups.NewBackupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BackupsClient.AccountBackupsDelete

ctx := context.TODO()
id := backups.NewAccountBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "accountBackupValue")

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

Example Usage: BackupsClient.AccountBackupsGet

ctx := context.TODO()
id := backups.NewAccountBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "accountBackupValue")

read, err := client.AccountBackupsGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: BackupsClient.AccountBackupsListByNetAppAccount

ctx := context.TODO()
id := backups.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue")

read, err := client.AccountBackupsListByNetAppAccount(ctx, id, backups.DefaultAccountBackupsListByNetAppAccountOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: BackupsClient.Create

ctx := context.TODO()
id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue")

payload := backups.Backup{
	// ...
}


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

Example Usage: BackupsClient.Delete

ctx := context.TODO()
id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue")

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

Example Usage: BackupsClient.Get

ctx := context.TODO()
id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue")

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: BackupsClient.GetLatestStatus

ctx := context.TODO()
id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")

read, err := client.GetLatestStatus(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: BackupsClient.ListByVault

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

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

Example Usage: BackupsClient.UnderAccountMigrateBackups

ctx := context.TODO()
id := backups.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue")

payload := backups.BackupsMigrationRequest{
	// ...
}


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

Example Usage: BackupsClient.UnderBackupVaultRestoreFiles

ctx := context.TODO()
id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue")

payload := backups.BackupRestoreFiles{
	// ...
}


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

Example Usage: BackupsClient.UnderVolumeMigrateBackups

ctx := context.TODO()
id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")

payload := backups.BackupsMigrationRequest{
	// ...
}


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

Example Usage: BackupsClient.Update

ctx := context.TODO()
id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue")

payload := backups.BackupPatch{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBackupType

func PossibleValuesForBackupType() []string

func PossibleValuesForMirrorState

func PossibleValuesForMirrorState() []string

func PossibleValuesForRelationshipStatus

func PossibleValuesForRelationshipStatus() []string

func ValidateAccountBackupID

func ValidateAccountBackupID(input interface{}, key string) (warnings []string, errors []error)

ValidateAccountBackupID checks that 'input' can be parsed as a Account Backup ID

func ValidateBackupID

func ValidateBackupID(input interface{}, key string) (warnings []string, errors []error)

ValidateBackupID checks that 'input' can be parsed as a Backup ID

func ValidateBackupVaultID

func ValidateBackupVaultID(input interface{}, key string) (warnings []string, errors []error)

ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID

func ValidateNetAppAccountID

func ValidateNetAppAccountID(input interface{}, key string) (warnings []string, errors []error)

ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID

func ValidateVolumeID

func ValidateVolumeID(input interface{}, key string) (warnings []string, errors []error)

ValidateVolumeID checks that 'input' can be parsed as a Volume ID

Types

type AccountBackupId

type AccountBackupId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	AccountBackupName string
}

AccountBackupId is a struct representing the Resource ID for a Account Backup

func NewAccountBackupID

func NewAccountBackupID(subscriptionId string, resourceGroupName string, netAppAccountName string, accountBackupName string) AccountBackupId

NewAccountBackupID returns a new AccountBackupId struct

func ParseAccountBackupID

func ParseAccountBackupID(input string) (*AccountBackupId, error)

ParseAccountBackupID parses 'input' into a AccountBackupId

func ParseAccountBackupIDInsensitively

func ParseAccountBackupIDInsensitively(input string) (*AccountBackupId, error)

ParseAccountBackupIDInsensitively parses 'input' case-insensitively into a AccountBackupId note: this method should only be used for API response data and not user input

func (AccountBackupId) ID

func (id AccountBackupId) ID() string

ID returns the formatted Account Backup ID

func (AccountBackupId) Segments

func (id AccountBackupId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Account Backup ID

func (AccountBackupId) String

func (id AccountBackupId) String() string

String returns a human-readable description of this Account Backup ID

type AccountBackupsDeleteOperationResponse

type AccountBackupsDeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type AccountBackupsGetOperationResponse

type AccountBackupsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Backup
}

type AccountBackupsListByNetAppAccountOperationOptions

type AccountBackupsListByNetAppAccountOperationOptions struct {
	IncludeOnlyBackupsFromDeletedVolumes *string
}

func DefaultAccountBackupsListByNetAppAccountOperationOptions

func DefaultAccountBackupsListByNetAppAccountOperationOptions() AccountBackupsListByNetAppAccountOperationOptions

func (AccountBackupsListByNetAppAccountOperationOptions) ToHeaders

func (AccountBackupsListByNetAppAccountOperationOptions) ToOData

func (AccountBackupsListByNetAppAccountOperationOptions) ToQuery

type AccountBackupsListByNetAppAccountOperationResponse

type AccountBackupsListByNetAppAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BackupsList
}

type Backup

type Backup struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties BackupProperties       `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type BackupId

type BackupId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	BackupVaultName   string
	BackupName        string
}

BackupId is a struct representing the Resource ID for a Backup

func NewBackupID

func NewBackupID(subscriptionId string, resourceGroupName string, netAppAccountName string, backupVaultName string, backupName string) BackupId

NewBackupID returns a new BackupId struct

func ParseBackupID

func ParseBackupID(input string) (*BackupId, error)

ParseBackupID parses 'input' into a BackupId

func ParseBackupIDInsensitively

func ParseBackupIDInsensitively(input string) (*BackupId, error)

ParseBackupIDInsensitively parses 'input' case-insensitively into a BackupId note: this method should only be used for API response data and not user input

func (BackupId) ID

func (id BackupId) ID() string

ID returns the formatted Backup ID

func (BackupId) Segments

func (id BackupId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Backup ID

func (BackupId) String

func (id BackupId) String() string

String returns a human-readable description of this Backup ID

type BackupOperationPredicate

type BackupOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (BackupOperationPredicate) Matches

func (p BackupOperationPredicate) Matches(input Backup) bool

type BackupPatch

type BackupPatch struct {
	Properties *BackupPatchProperties `json:"properties,omitempty"`
}

type BackupPatchProperties

type BackupPatchProperties struct {
	Label *string `json:"label,omitempty"`
}

type BackupProperties

type BackupProperties struct {
	BackupId            *string     `json:"backupId,omitempty"`
	BackupType          *BackupType `json:"backupType,omitempty"`
	CreationDate        *string     `json:"creationDate,omitempty"`
	FailureReason       *string     `json:"failureReason,omitempty"`
	Label               *string     `json:"label,omitempty"`
	ProvisioningState   *string     `json:"provisioningState,omitempty"`
	Size                *int64      `json:"size,omitempty"`
	SnapshotName        *string     `json:"snapshotName,omitempty"`
	UseExistingSnapshot *bool       `json:"useExistingSnapshot,omitempty"`
	VolumeResourceId    string      `json:"volumeResourceId"`
}

func (*BackupProperties) GetCreationDateAsTime

func (o *BackupProperties) GetCreationDateAsTime() (*time.Time, error)

func (*BackupProperties) SetCreationDateAsTime

func (o *BackupProperties) SetCreationDateAsTime(input time.Time)

type BackupRestoreFiles

type BackupRestoreFiles struct {
	DestinationVolumeId string   `json:"destinationVolumeId"`
	FileList            []string `json:"fileList"`
	RestoreFilePath     *string  `json:"restoreFilePath,omitempty"`
}

type BackupStatus

type BackupStatus struct {
	ErrorMessage          *string             `json:"errorMessage,omitempty"`
	Healthy               *bool               `json:"healthy,omitempty"`
	LastTransferSize      *int64              `json:"lastTransferSize,omitempty"`
	LastTransferType      *string             `json:"lastTransferType,omitempty"`
	MirrorState           *MirrorState        `json:"mirrorState,omitempty"`
	RelationshipStatus    *RelationshipStatus `json:"relationshipStatus,omitempty"`
	TotalTransferBytes    *int64              `json:"totalTransferBytes,omitempty"`
	TransferProgressBytes *int64              `json:"transferProgressBytes,omitempty"`
	UnhealthyReason       *string             `json:"unhealthyReason,omitempty"`
}

type BackupType

type BackupType string
const (
	BackupTypeManual    BackupType = "Manual"
	BackupTypeScheduled BackupType = "Scheduled"
)

func (*BackupType) UnmarshalJSON

func (s *BackupType) UnmarshalJSON(bytes []byte) error

type BackupVaultId

type BackupVaultId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	BackupVaultName   string
}

BackupVaultId is a struct representing the Resource ID for a Backup Vault

func NewBackupVaultID

func NewBackupVaultID(subscriptionId string, resourceGroupName string, netAppAccountName string, backupVaultName string) BackupVaultId

NewBackupVaultID returns a new BackupVaultId struct

func ParseBackupVaultID

func ParseBackupVaultID(input string) (*BackupVaultId, error)

ParseBackupVaultID parses 'input' into a BackupVaultId

func ParseBackupVaultIDInsensitively

func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error)

ParseBackupVaultIDInsensitively parses 'input' case-insensitively into a BackupVaultId note: this method should only be used for API response data and not user input

func (BackupVaultId) ID

func (id BackupVaultId) ID() string

ID returns the formatted Backup Vault ID

func (BackupVaultId) Segments

func (id BackupVaultId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Backup Vault ID

func (BackupVaultId) String

func (id BackupVaultId) String() string

String returns a human-readable description of this Backup Vault ID

type BackupsClient

type BackupsClient struct {
	Client *resourcemanager.Client
}

func NewBackupsClientWithBaseURI

func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error)

func (BackupsClient) AccountBackupsDelete

func (c BackupsClient) AccountBackupsDelete(ctx context.Context, id AccountBackupId) (result AccountBackupsDeleteOperationResponse, err error)

AccountBackupsDelete ...

func (BackupsClient) AccountBackupsDeleteThenPoll

func (c BackupsClient) AccountBackupsDeleteThenPoll(ctx context.Context, id AccountBackupId) error

AccountBackupsDeleteThenPoll performs AccountBackupsDelete then polls until it's completed

func (BackupsClient) AccountBackupsGet

func (c BackupsClient) AccountBackupsGet(ctx context.Context, id AccountBackupId) (result AccountBackupsGetOperationResponse, err error)

AccountBackupsGet ...

func (BackupsClient) AccountBackupsListByNetAppAccount

AccountBackupsListByNetAppAccount ...

func (BackupsClient) Create

func (c BackupsClient) Create(ctx context.Context, id BackupId, input Backup) (result CreateOperationResponse, err error)

Create ...

func (BackupsClient) CreateThenPoll

func (c BackupsClient) CreateThenPoll(ctx context.Context, id BackupId, input Backup) error

CreateThenPoll performs Create then polls until it's completed

func (BackupsClient) Delete

func (c BackupsClient) Delete(ctx context.Context, id BackupId) (result DeleteOperationResponse, err error)

Delete ...

func (BackupsClient) DeleteThenPoll

func (c BackupsClient) DeleteThenPoll(ctx context.Context, id BackupId) error

DeleteThenPoll performs Delete then polls until it's completed

func (BackupsClient) Get

func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperationResponse, err error)

Get ...

func (BackupsClient) GetLatestStatus

func (c BackupsClient) GetLatestStatus(ctx context.Context, id VolumeId) (result GetLatestStatusOperationResponse, err error)

GetLatestStatus ...

func (BackupsClient) ListByVault

ListByVault ...

func (BackupsClient) ListByVaultComplete

ListByVaultComplete retrieves all the results into a single object

func (BackupsClient) ListByVaultCompleteMatchingPredicate

func (c BackupsClient) ListByVaultCompleteMatchingPredicate(ctx context.Context, id BackupVaultId, options ListByVaultOperationOptions, predicate BackupOperationPredicate) (result ListByVaultCompleteResult, err error)

ListByVaultCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BackupsClient) UnderAccountMigrateBackups

UnderAccountMigrateBackups ...

func (BackupsClient) UnderAccountMigrateBackupsThenPoll

func (c BackupsClient) UnderAccountMigrateBackupsThenPoll(ctx context.Context, id NetAppAccountId, input BackupsMigrationRequest) error

UnderAccountMigrateBackupsThenPoll performs UnderAccountMigrateBackups then polls until it's completed

func (BackupsClient) UnderBackupVaultRestoreFiles

func (c BackupsClient) UnderBackupVaultRestoreFiles(ctx context.Context, id BackupId, input BackupRestoreFiles) (result UnderBackupVaultRestoreFilesOperationResponse, err error)

UnderBackupVaultRestoreFiles ...

func (BackupsClient) UnderBackupVaultRestoreFilesThenPoll

func (c BackupsClient) UnderBackupVaultRestoreFilesThenPoll(ctx context.Context, id BackupId, input BackupRestoreFiles) error

UnderBackupVaultRestoreFilesThenPoll performs UnderBackupVaultRestoreFiles then polls until it's completed

func (BackupsClient) UnderVolumeMigrateBackups

func (c BackupsClient) UnderVolumeMigrateBackups(ctx context.Context, id VolumeId, input BackupsMigrationRequest) (result UnderVolumeMigrateBackupsOperationResponse, err error)

UnderVolumeMigrateBackups ...

func (BackupsClient) UnderVolumeMigrateBackupsThenPoll

func (c BackupsClient) UnderVolumeMigrateBackupsThenPoll(ctx context.Context, id VolumeId, input BackupsMigrationRequest) error

UnderVolumeMigrateBackupsThenPoll performs UnderVolumeMigrateBackups then polls until it's completed

func (BackupsClient) Update

func (c BackupsClient) Update(ctx context.Context, id BackupId, input BackupPatch) (result UpdateOperationResponse, err error)

Update ...

func (BackupsClient) UpdateThenPoll

func (c BackupsClient) UpdateThenPoll(ctx context.Context, id BackupId, input BackupPatch) error

UpdateThenPoll performs Update then polls until it's completed

type BackupsList

type BackupsList struct {
	NextLink *string   `json:"nextLink,omitempty"`
	Value    *[]Backup `json:"value,omitempty"`
}

type BackupsMigrationRequest

type BackupsMigrationRequest struct {
	BackupVaultId string `json:"backupVaultId"`
}

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetLatestStatusOperationResponse

type GetLatestStatusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BackupStatus
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Backup
}

type ListByVaultCompleteResult

type ListByVaultCompleteResult struct {
	Items []Backup
}

type ListByVaultOperationOptions

type ListByVaultOperationOptions struct {
	Filter *string
}

func DefaultListByVaultOperationOptions

func DefaultListByVaultOperationOptions() ListByVaultOperationOptions

func (ListByVaultOperationOptions) ToHeaders

func (ListByVaultOperationOptions) ToOData

func (ListByVaultOperationOptions) ToQuery

type ListByVaultOperationResponse

type ListByVaultOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Backup
}

type MirrorState

type MirrorState string
const (
	MirrorStateBroken        MirrorState = "Broken"
	MirrorStateMirrored      MirrorState = "Mirrored"
	MirrorStateUninitialized MirrorState = "Uninitialized"
)

func (*MirrorState) UnmarshalJSON

func (s *MirrorState) UnmarshalJSON(bytes []byte) error

type NetAppAccountId

type NetAppAccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
}

NetAppAccountId is a struct representing the Resource ID for a Net App Account

func NewNetAppAccountID

func NewNetAppAccountID(subscriptionId string, resourceGroupName string, netAppAccountName string) NetAppAccountId

NewNetAppAccountID returns a new NetAppAccountId struct

func ParseNetAppAccountID

func ParseNetAppAccountID(input string) (*NetAppAccountId, error)

ParseNetAppAccountID parses 'input' into a NetAppAccountId

func ParseNetAppAccountIDInsensitively

func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error)

ParseNetAppAccountIDInsensitively parses 'input' case-insensitively into a NetAppAccountId note: this method should only be used for API response data and not user input

func (NetAppAccountId) ID

func (id NetAppAccountId) ID() string

ID returns the formatted Net App Account ID

func (NetAppAccountId) Segments

func (id NetAppAccountId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Net App Account ID

func (NetAppAccountId) String

func (id NetAppAccountId) String() string

String returns a human-readable description of this Net App Account ID

type RelationshipStatus

type RelationshipStatus string
const (
	RelationshipStatusIdle         RelationshipStatus = "Idle"
	RelationshipStatusTransferring RelationshipStatus = "Transferring"
)

func (*RelationshipStatus) UnmarshalJSON

func (s *RelationshipStatus) UnmarshalJSON(bytes []byte) error

type UnderAccountMigrateBackupsOperationResponse

type UnderAccountMigrateBackupsOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type UnderBackupVaultRestoreFilesOperationResponse

type UnderBackupVaultRestoreFilesOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type UnderVolumeMigrateBackupsOperationResponse

type UnderVolumeMigrateBackupsOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type VolumeId

type VolumeId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	CapacityPoolName  string
	VolumeName        string
}

VolumeId is a struct representing the Resource ID for a Volume

func NewVolumeID

func NewVolumeID(subscriptionId string, resourceGroupName string, netAppAccountName string, capacityPoolName string, volumeName string) VolumeId

NewVolumeID returns a new VolumeId struct

func ParseVolumeID

func ParseVolumeID(input string) (*VolumeId, error)

ParseVolumeID parses 'input' into a VolumeId

func ParseVolumeIDInsensitively

func ParseVolumeIDInsensitively(input string) (*VolumeId, error)

ParseVolumeIDInsensitively parses 'input' case-insensitively into a VolumeId note: this method should only be used for API response data and not user input

func (VolumeId) ID

func (id VolumeId) ID() string

ID returns the formatted Volume ID

func (VolumeId) Segments

func (id VolumeId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Volume ID

func (VolumeId) String

func (id VolumeId) String() string

String returns a human-readable description of this Volume ID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL