backupvaults

package
v0.20230904.1142308 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-05-01/backupvaults Documentation

The backupvaults SDK allows for interaction with the Azure Resource Manager Service dataprotection (API Version 2022-05-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/dataprotection/2022-05-01/backupvaults"

Client Initialization

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

Example Usage: BackupVaultsClient.CheckNameAvailability

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

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


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

Example Usage: BackupVaultsClient.CreateOrUpdate

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

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


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

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

Example Usage: BackupVaultsClient.Get

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

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

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

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

Example Usage: BackupVaultsClient.GetInSubscription

ctx := context.TODO()
id := backupvaults.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.GetInSubscription(ctx, id)` can be used to do batched pagination
items, err := client.GetInSubscriptionComplete(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", "backupVaultValue")

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


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 PossibleValuesForAlertsState

func PossibleValuesForAlertsState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForResourceMoveState

func PossibleValuesForResourceMoveState() []string

func PossibleValuesForStorageSettingStoreTypes

func PossibleValuesForStorageSettingStoreTypes() []string

func PossibleValuesForStorageSettingTypes

func PossibleValuesForStorageSettingTypes() []string

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 ValidateProviderLocationID

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

ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID

Types

type AlertsState

type AlertsState string
const (
	AlertsStateDisabled AlertsState = "Disabled"
	AlertsStateEnabled  AlertsState = "Enabled"
)

func (*AlertsState) UnmarshalJSON added in v0.20230420.1093529

func (s *AlertsState) UnmarshalJSON(bytes []byte) error

type AzureMonitorAlertSettings

type AzureMonitorAlertSettings struct {
	AlertsForAllJobFailures *AlertsState `json:"alertsForAllJobFailures,omitempty"`
}

type BackupVault

type BackupVault struct {
	IsVaultProtectedByResourceGuard *bool                `json:"isVaultProtectedByResourceGuard,omitempty"`
	MonitoringSettings              *MonitoringSettings  `json:"monitoringSettings,omitempty"`
	ProvisioningState               *ProvisioningState   `json:"provisioningState,omitempty"`
	ResourceMoveDetails             *ResourceMoveDetails `json:"resourceMoveDetails,omitempty"`
	ResourceMoveState               *ResourceMoveState   `json:"resourceMoveState,omitempty"`
	StorageSettings                 []StorageSetting     `json:"storageSettings"`
}

type BackupVaultId

type BackupVaultId struct {
	SubscriptionId    string
	ResourceGroupName string
	BackupVaultName   string
}

BackupVaultId is a struct representing the Resource ID for a Backup Vault

func NewBackupVaultID

func NewBackupVaultID(subscriptionId string, resourceGroupName 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) 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 BackupVaultResource

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

type BackupVaultResourceOperationPredicate

type BackupVaultResourceOperationPredicate struct {
	ETag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (BackupVaultResourceOperationPredicate) Matches

type BackupVaultsClient

type BackupVaultsClient struct {
	Client *resourcemanager.Client
}

func NewBackupVaultsClientWithBaseURI

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

func (BackupVaultsClient) CheckNameAvailability

CheckNameAvailability ...

func (BackupVaultsClient) CreateOrUpdate

CreateOrUpdate ...

func (BackupVaultsClient) CreateOrUpdateThenPoll

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

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (BackupVaultsClient) Delete

Delete ...

func (BackupVaultsClient) Get

Get ...

func (BackupVaultsClient) GetInResourceGroup

GetInResourceGroup ...

func (BackupVaultsClient) GetInResourceGroupComplete

GetInResourceGroupComplete retrieves all the results into a single object

func (BackupVaultsClient) GetInResourceGroupCompleteMatchingPredicate

func (c BackupVaultsClient) GetInResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate BackupVaultResourceOperationPredicate) (result GetInResourceGroupCompleteResult, err error)

GetInResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BackupVaultsClient) GetInSubscription

GetInSubscription ...

func (BackupVaultsClient) GetInSubscriptionComplete

GetInSubscriptionComplete retrieves all the results into a single object

func (BackupVaultsClient) GetInSubscriptionCompleteMatchingPredicate

func (c BackupVaultsClient) GetInSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BackupVaultResourceOperationPredicate) (result GetInSubscriptionCompleteResult, err error)

GetInSubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BackupVaultsClient) Update

Update ...

func (BackupVaultsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CheckNameAvailabilityResult
}

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	Message       *string `json:"message,omitempty"`
	NameAvailable *bool   `json:"nameAvailable,omitempty"`
	Reason        *string `json:"reason,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type DppIdentityDetails

type DppIdentityDetails struct {
	PrincipalId *string `json:"principalId,omitempty"`
	TenantId    *string `json:"tenantId,omitempty"`
	Type        *string `json:"type,omitempty"`
}

type GetInResourceGroupCompleteResult

type GetInResourceGroupCompleteResult struct {
	Items []BackupVaultResource
}

type GetInResourceGroupOperationResponse

type GetInResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BackupVaultResource
}

type GetInSubscriptionCompleteResult

type GetInSubscriptionCompleteResult struct {
	Items []BackupVaultResource
}

type GetInSubscriptionOperationResponse

type GetInSubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BackupVaultResource
}

type GetOperationResponse

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

type MonitoringSettings

type MonitoringSettings struct {
	AzureMonitorAlertSettings *AzureMonitorAlertSettings `json:"azureMonitorAlertSettings,omitempty"`
}

type PatchBackupVaultInput

type PatchBackupVaultInput struct {
	MonitoringSettings *MonitoringSettings `json:"monitoringSettings,omitempty"`
}

type PatchResourceRequestInput

type PatchResourceRequestInput struct {
	Identity   *DppIdentityDetails    `json:"identity,omitempty"`
	Properties *PatchBackupVaultInput `json:"properties,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
}

type ProviderLocationId

type ProviderLocationId struct {
	SubscriptionId    string
	ResourceGroupName string
	LocationName      string
}

ProviderLocationId is a struct representing the Resource ID for a Provider Location

func NewProviderLocationID

func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId

NewProviderLocationID returns a new ProviderLocationId struct

func ParseProviderLocationID

func ParseProviderLocationID(input string) (*ProviderLocationId, error)

ParseProviderLocationID parses 'input' into a ProviderLocationId

func ParseProviderLocationIDInsensitively

func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error)

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

func (ProviderLocationId) ID

func (id ProviderLocationId) ID() string

ID returns the formatted Provider Location ID

func (ProviderLocationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Provider Location ID

func (ProviderLocationId) String

func (id ProviderLocationId) String() string

String returns a human-readable description of this Provider Location ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUnknown      ProvisioningState = "Unknown"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230420.1093529

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type ResourceMoveDetails

type ResourceMoveDetails struct {
	CompletionTimeUtc  *string `json:"completionTimeUtc,omitempty"`
	OperationId        *string `json:"operationId,omitempty"`
	SourceResourcePath *string `json:"sourceResourcePath,omitempty"`
	StartTimeUtc       *string `json:"startTimeUtc,omitempty"`
	TargetResourcePath *string `json:"targetResourcePath,omitempty"`
}

type ResourceMoveState

type ResourceMoveState string
const (
	ResourceMoveStateCommitFailed    ResourceMoveState = "CommitFailed"
	ResourceMoveStateCommitTimedout  ResourceMoveState = "CommitTimedout"
	ResourceMoveStateCriticalFailure ResourceMoveState = "CriticalFailure"
	ResourceMoveStateFailed          ResourceMoveState = "Failed"
	ResourceMoveStateInProgress      ResourceMoveState = "InProgress"
	ResourceMoveStateMoveSucceeded   ResourceMoveState = "MoveSucceeded"
	ResourceMoveStatePartialSuccess  ResourceMoveState = "PartialSuccess"
	ResourceMoveStatePrepareFailed   ResourceMoveState = "PrepareFailed"
	ResourceMoveStatePrepareTimedout ResourceMoveState = "PrepareTimedout"
	ResourceMoveStateUnknown         ResourceMoveState = "Unknown"
)

func (*ResourceMoveState) UnmarshalJSON added in v0.20230420.1093529

func (s *ResourceMoveState) UnmarshalJSON(bytes []byte) error

type StorageSetting

type StorageSetting struct {
	DatastoreType *StorageSettingStoreTypes `json:"datastoreType,omitempty"`
	Type          *StorageSettingTypes      `json:"type,omitempty"`
}

type StorageSettingStoreTypes

type StorageSettingStoreTypes string
const (
	StorageSettingStoreTypesArchiveStore     StorageSettingStoreTypes = "ArchiveStore"
	StorageSettingStoreTypesOperationalStore StorageSettingStoreTypes = "OperationalStore"
	StorageSettingStoreTypesVaultStore       StorageSettingStoreTypes = "VaultStore"
)

func (*StorageSettingStoreTypes) UnmarshalJSON added in v0.20230420.1093529

func (s *StorageSettingStoreTypes) UnmarshalJSON(bytes []byte) error

type StorageSettingTypes

type StorageSettingTypes string
const (
	StorageSettingTypesGeoRedundant     StorageSettingTypes = "GeoRedundant"
	StorageSettingTypesLocallyRedundant StorageSettingTypes = "LocallyRedundant"
	StorageSettingTypesZoneRedundant    StorageSettingTypes = "ZoneRedundant"
)

func (*StorageSettingTypes) UnmarshalJSON added in v0.20230420.1093529

func (s *StorageSettingTypes) UnmarshalJSON(bytes []byte) error

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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