backuppolicy

package
v0.20220805.1100614 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

README

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

The backuppolicy 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/backuppolicy"

Client Initialization

client := backuppolicy.NewBackupPolicyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BackupPolicyClient.BackupPoliciesCreate

ctx := context.TODO()
id := backuppolicy.NewBackupPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "backupPolicyValue")

payload := backuppolicy.BackupPolicy{
	// ...
}


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

Example Usage: BackupPolicyClient.BackupPoliciesDelete

ctx := context.TODO()
id := backuppolicy.NewBackupPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "backupPolicyValue")

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

Example Usage: BackupPolicyClient.BackupPoliciesGet

ctx := context.TODO()
id := backuppolicy.NewBackupPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "backupPolicyValue")

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

Example Usage: BackupPolicyClient.BackupPoliciesList

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

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

Example Usage: BackupPolicyClient.BackupPoliciesUpdate

ctx := context.TODO()
id := backuppolicy.NewBackupPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "backupPolicyValue")

payload := backuppolicy.BackupPolicyPatch{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBackupPoliciesID

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

ValidateBackupPoliciesID checks that 'input' can be parsed as a Backup Policies 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

Types

type BackupPoliciesCreateOperationResponse

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

type BackupPoliciesDeleteOperationResponse

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

type BackupPoliciesGetOperationResponse

type BackupPoliciesGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *BackupPolicy
}

type BackupPoliciesId

type BackupPoliciesId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
	BackupPolicyName  string
}

BackupPoliciesId is a struct representing the Resource ID for a Backup Policies

func NewBackupPoliciesID

func NewBackupPoliciesID(subscriptionId string, resourceGroupName string, accountName string, backupPolicyName string) BackupPoliciesId

NewBackupPoliciesID returns a new BackupPoliciesId struct

func ParseBackupPoliciesID

func ParseBackupPoliciesID(input string) (*BackupPoliciesId, error)

ParseBackupPoliciesID parses 'input' into a BackupPoliciesId

func ParseBackupPoliciesIDInsensitively

func ParseBackupPoliciesIDInsensitively(input string) (*BackupPoliciesId, error)

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

func (BackupPoliciesId) ID

func (id BackupPoliciesId) ID() string

ID returns the formatted Backup Policies ID

func (BackupPoliciesId) Segments

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

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

func (BackupPoliciesId) String

func (id BackupPoliciesId) String() string

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

type BackupPoliciesList

type BackupPoliciesList struct {
	Value *[]BackupPolicy `json:"value,omitempty"`
}

type BackupPoliciesListOperationResponse

type BackupPoliciesListOperationResponse struct {
	HttpResponse *http.Response
	Model        *BackupPoliciesList
}

type BackupPoliciesUpdateOperationResponse

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

type BackupPolicy

type BackupPolicy struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties BackupPolicyProperties `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type BackupPolicyClient

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

func NewBackupPolicyClientWithBaseURI

func NewBackupPolicyClientWithBaseURI(endpoint string) BackupPolicyClient

func (BackupPolicyClient) BackupPoliciesCreate

func (c BackupPolicyClient) BackupPoliciesCreate(ctx context.Context, id BackupPoliciesId, input BackupPolicy) (result BackupPoliciesCreateOperationResponse, err error)

BackupPoliciesCreate ...

func (BackupPolicyClient) BackupPoliciesCreateThenPoll

func (c BackupPolicyClient) BackupPoliciesCreateThenPoll(ctx context.Context, id BackupPoliciesId, input BackupPolicy) error

BackupPoliciesCreateThenPoll performs BackupPoliciesCreate then polls until it's completed

func (BackupPolicyClient) BackupPoliciesDelete

func (c BackupPolicyClient) BackupPoliciesDelete(ctx context.Context, id BackupPoliciesId) (result BackupPoliciesDeleteOperationResponse, err error)

BackupPoliciesDelete ...

func (BackupPolicyClient) BackupPoliciesDeleteThenPoll

func (c BackupPolicyClient) BackupPoliciesDeleteThenPoll(ctx context.Context, id BackupPoliciesId) error

BackupPoliciesDeleteThenPoll performs BackupPoliciesDelete then polls until it's completed

func (BackupPolicyClient) BackupPoliciesGet

BackupPoliciesGet ...

func (BackupPolicyClient) BackupPoliciesList

func (c BackupPolicyClient) BackupPoliciesList(ctx context.Context, id NetAppAccountId) (result BackupPoliciesListOperationResponse, err error)

BackupPoliciesList ...

func (BackupPolicyClient) BackupPoliciesUpdate

BackupPoliciesUpdate ...

func (BackupPolicyClient) BackupPoliciesUpdateThenPoll

func (c BackupPolicyClient) BackupPoliciesUpdateThenPoll(ctx context.Context, id BackupPoliciesId, input BackupPolicyPatch) error

BackupPoliciesUpdateThenPoll performs BackupPoliciesUpdate then polls until it's completed

type BackupPolicyPatch

type BackupPolicyPatch struct {
	Id         *string                 `json:"id,omitempty"`
	Location   *string                 `json:"location,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties *BackupPolicyProperties `json:"properties,omitempty"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type BackupPolicyProperties

type BackupPolicyProperties struct {
	BackupPolicyId       *string          `json:"backupPolicyId,omitempty"`
	DailyBackupsToKeep   *int64           `json:"dailyBackupsToKeep,omitempty"`
	Enabled              *bool            `json:"enabled,omitempty"`
	MonthlyBackupsToKeep *int64           `json:"monthlyBackupsToKeep,omitempty"`
	ProvisioningState    *string          `json:"provisioningState,omitempty"`
	VolumeBackups        *[]VolumeBackups `json:"volumeBackups,omitempty"`
	VolumesAssigned      *int64           `json:"volumesAssigned,omitempty"`
	WeeklyBackupsToKeep  *int64           `json:"weeklyBackupsToKeep,omitempty"`
}

type NetAppAccountId

type NetAppAccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

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

func NewNetAppAccountID

func NewNetAppAccountID(subscriptionId string, resourceGroupName string, accountName 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 VolumeBackups

type VolumeBackups struct {
	BackupsCount  *int64  `json:"backupsCount,omitempty"`
	PolicyEnabled *bool   `json:"policyEnabled,omitempty"`
	VolumeName    *string `json:"volumeName,omitempty"`
}

Jump to

Keyboard shortcuts

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