backuppolicy

package
v0.20230731.1080956 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MPL-2.0 Imports: 11 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.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "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.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue")

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

Example Usage: BackupPolicyClient.BackupPoliciesGet

ctx := context.TODO()
id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "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", "netAppAccountValue")

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.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "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 ValidateBackupPolicyID added in v0.20220907.1111434

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

ValidateBackupPolicyID checks that 'input' can be parsed as a Backup Policy 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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type BackupPoliciesDeleteOperationResponse

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

type BackupPoliciesGetOperationResponse

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

type BackupPoliciesList

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

type BackupPoliciesListOperationResponse

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

type BackupPoliciesUpdateOperationResponse

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

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 *resourcemanager.Client
}

func NewBackupPolicyClientWithBaseURI

func NewBackupPolicyClientWithBaseURI(api environments.Api) (*BackupPolicyClient, error)

func (BackupPolicyClient) BackupPoliciesCreate

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

BackupPoliciesCreate ...

func (BackupPolicyClient) BackupPoliciesCreateThenPoll

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

BackupPoliciesCreateThenPoll performs BackupPoliciesCreate then polls until it's completed

func (BackupPolicyClient) BackupPoliciesDelete

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

BackupPoliciesDelete ...

func (BackupPolicyClient) BackupPoliciesDeleteThenPoll

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

BackupPoliciesDeleteThenPoll performs BackupPoliciesDelete then polls until it's completed

func (BackupPolicyClient) BackupPoliciesGet

func (c BackupPolicyClient) BackupPoliciesGet(ctx context.Context, id BackupPolicyId) (result BackupPoliciesGetOperationResponse, err error)

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 BackupPolicyId, input BackupPolicyPatch) error

BackupPoliciesUpdateThenPoll performs BackupPoliciesUpdate then polls until it's completed

type BackupPolicyId added in v0.20220907.1111434

type BackupPolicyId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	BackupPolicyName  string
}

BackupPolicyId is a struct representing the Resource ID for a Backup Policy

func NewBackupPolicyID added in v0.20220907.1111434

func NewBackupPolicyID(subscriptionId string, resourceGroupName string, netAppAccountName string, backupPolicyName string) BackupPolicyId

NewBackupPolicyID returns a new BackupPolicyId struct

func ParseBackupPolicyID added in v0.20220907.1111434

func ParseBackupPolicyID(input string) (*BackupPolicyId, error)

ParseBackupPolicyID parses 'input' into a BackupPolicyId

func ParseBackupPolicyIDInsensitively added in v0.20220907.1111434

func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error)

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

func (BackupPolicyId) ID added in v0.20220907.1111434

func (id BackupPolicyId) ID() string

ID returns the formatted Backup Policy ID

func (BackupPolicyId) Segments added in v0.20220907.1111434

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

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

func (BackupPolicyId) String added in v0.20220907.1111434

func (id BackupPolicyId) String() string

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

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