backups

package
v0.20230127.1133443 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/backups Documentation

The backups SDK allows for interaction with the Azure Resource Manager Service netapp (API Version 2021-10-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/2021-10-01/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.AccountBackupsList

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

read, err := client.AccountBackupsList(ctx, id)
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", "capacityPoolValue", "volumeValue", "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", "capacityPoolValue", "volumeValue", "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", "capacityPoolValue", "volumeValue", "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.GetStatus

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

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

Example Usage: BackupsClient.List

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

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

Example Usage: BackupsClient.Update

ctx := context.TODO()
id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue", "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 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       polling.LongRunningPoller
	HttpResponse *http.Response
}

type AccountBackupsGetOperationResponse

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

type AccountBackupsListOperationResponse

type AccountBackupsListOperationResponse struct {
	HttpResponse *http.Response
	Model        *BackupsList
}

type Backup

type Backup struct {
	Id         *string          `json:"id,omitempty"`
	Location   string           `json:"location"`
	Name       *string          `json:"name,omitempty"`
	Properties BackupProperties `json:"properties"`
	Type       *string          `json:"type,omitempty"`
}

type BackupId

type BackupId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	CapacityPoolName  string
	VolumeName        string
	BackupName        string
}

BackupId is a struct representing the Resource ID for a Backup

func NewBackupID

func NewBackupID(subscriptionId string, resourceGroupName string, netAppAccountName string, capacityPoolName string, volumeName 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 BackupPatch

type BackupPatch struct {
	Properties *BackupProperties  `json:"properties,omitempty"`
	Tags       *map[string]string `json:"tags,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"`
	UseExistingSnapshot *bool       `json:"useExistingSnapshot,omitempty"`
	VolumeName          *string     `json:"volumeName,omitempty"`
}

func (*BackupProperties) GetCreationDateAsTime

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

func (*BackupProperties) SetCreationDateAsTime

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

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"`
	UnhealthyReason    *string             `json:"unhealthyReason,omitempty"`
}

type BackupType

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

type BackupsClient

type BackupsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewBackupsClientWithBaseURI

func NewBackupsClientWithBaseURI(endpoint string) BackupsClient

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

func (c BackupsClient) AccountBackupsList(ctx context.Context, id NetAppAccountId) (result AccountBackupsListOperationResponse, err error)

AccountBackupsList ...

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

func (c BackupsClient) GetStatus(ctx context.Context, id VolumeId) (result GetStatusOperationResponse, err error)

GetStatus ...

func (BackupsClient) List

func (c BackupsClient) List(ctx context.Context, id VolumeId) (result ListOperationResponse, err error)

List ...

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 {
	Value *[]Backup `json:"value,omitempty"`
}

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

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

type GetStatusOperationResponse

type GetStatusOperationResponse struct {
	HttpResponse *http.Response
	Model        *BackupStatus
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *BackupsList
}

type MirrorState

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

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

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