backupvaults

package
v0.20241023.1122425 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

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

Client Initialization

client := backupvaults.NewBackupVaultsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BackupVaultsClient.CreateOrUpdate

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

payload := backupvaults.BackupVault{
	// ...
}


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

Example Usage: BackupVaultsClient.Delete

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

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

Example Usage: BackupVaultsClient.Get

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

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: BackupVaultsClient.ListByNetAppAccount

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

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

Example Usage: BackupVaultsClient.Update

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

payload := backupvaults.BackupVaultPatch{
	// ...
}


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

Types

type BackupVault

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

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 BackupVaultOperationPredicate

type BackupVaultOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (BackupVaultOperationPredicate) Matches

type BackupVaultPatch

type BackupVaultPatch struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type BackupVaultProperties

type BackupVaultProperties struct {
	ProvisioningState *string `json:"provisioningState,omitempty"`
}

type BackupVaultsClient

type BackupVaultsClient struct {
	Client *resourcemanager.Client
}

func NewBackupVaultsClientWithBaseURI

func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error)

func (BackupVaultsClient) CreateOrUpdate

func (c BackupVaultsClient) CreateOrUpdate(ctx context.Context, id BackupVaultId, input BackupVault) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (BackupVaultsClient) CreateOrUpdateThenPoll

func (c BackupVaultsClient) CreateOrUpdateThenPoll(ctx context.Context, id BackupVaultId, input BackupVault) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (BackupVaultsClient) Delete

Delete ...

func (BackupVaultsClient) DeleteThenPoll

func (c BackupVaultsClient) DeleteThenPoll(ctx context.Context, id BackupVaultId) error

DeleteThenPoll performs Delete then polls until it's completed

func (BackupVaultsClient) Get

Get ...

func (BackupVaultsClient) ListByNetAppAccount

func (c BackupVaultsClient) ListByNetAppAccount(ctx context.Context, id NetAppAccountId) (result ListByNetAppAccountOperationResponse, err error)

ListByNetAppAccount ...

func (BackupVaultsClient) ListByNetAppAccountComplete

ListByNetAppAccountComplete retrieves all the results into a single object

func (BackupVaultsClient) ListByNetAppAccountCompleteMatchingPredicate

func (c BackupVaultsClient) ListByNetAppAccountCompleteMatchingPredicate(ctx context.Context, id NetAppAccountId, predicate BackupVaultOperationPredicate) (result ListByNetAppAccountCompleteResult, err error)

ListByNetAppAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BackupVaultsClient) Update

Update ...

func (BackupVaultsClient) UpdateThenPoll

func (c BackupVaultsClient) UpdateThenPoll(ctx context.Context, id BackupVaultId, input BackupVaultPatch) error

UpdateThenPoll performs Update then polls until it's completed

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BackupVault
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByNetAppAccountCompleteResult

type ListByNetAppAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BackupVault
}

type ListByNetAppAccountCustomPager added in v0.20240628.1153531

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

type ListByNetAppAccountOperationResponse

type ListByNetAppAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BackupVault
}

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 UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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