backups

package
v0.20241111.1164443 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

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

The backups SDK allows for interaction with Azure Resource Manager 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/backups"

Client Initialization

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

Example Usage: BackupsClient.Create

ctx := context.TODO()
id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName", "backupName")

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", "netAppAccountName", "backupVaultName", "backupName")

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", "netAppAccountName", "backupVaultName", "backupName")

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", "netAppAccountName", "capacityPoolName", "volumeName")

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", "netAppAccountName", "backupVaultName")

// 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", "netAppAccountName")

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", "netAppAccountName", "backupVaultName", "backupName")

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", "netAppAccountName", "capacityPoolName", "volumeName")

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", "netAppAccountName", "backupVaultName", "backupName")

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 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 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) FromParseResult

func (id *BackupId) FromParseResult(input resourceids.ParseResult) error

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"`
	BackupPolicyResourceId *string     `json:"backupPolicyResourceId,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) FromParseResult

func (id *BackupVaultId) FromParseResult(input resourceids.ParseResult) error

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) 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 BackupsMigrationRequest

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

type CreateOperationResponse

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

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 {
	LatestHttpResponse *http.Response
	Items              []Backup
}

type ListByVaultCustomPager added in v0.20240628.1153531

type ListByVaultCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByVaultCustomPager) NextPageLink() *odata.Link

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) FromParseResult

func (id *NetAppAccountId) FromParseResult(input resourceids.ParseResult) error

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 (
	RelationshipStatusFailed       RelationshipStatus = "Failed"
	RelationshipStatusIdle         RelationshipStatus = "Idle"
	RelationshipStatusTransferring RelationshipStatus = "Transferring"
	RelationshipStatusUnknown      RelationshipStatus = "Unknown"
)

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
	Model        *Backup
}

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) FromParseResult

func (id *VolumeId) FromParseResult(input resourceids.ParseResult) error

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