backupvaults

package
v0.20231025.1103234 Latest Latest
Warning

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

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

README

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

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

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", "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 PossibleValuesForCrossRegionRestoreState added in v0.20230817.1112622

func PossibleValuesForCrossRegionRestoreState() []string

func PossibleValuesForCrossSubscriptionRestoreState

func PossibleValuesForCrossSubscriptionRestoreState() []string

func PossibleValuesForImmutabilityState

func PossibleValuesForImmutabilityState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForResourceMoveState

func PossibleValuesForResourceMoveState() []string

func PossibleValuesForSecureScoreLevel added in v0.20230817.1112622

func PossibleValuesForSecureScoreLevel() []string

func PossibleValuesForSoftDeleteState

func PossibleValuesForSoftDeleteState() []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

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

type AzureMonitorAlertSettings

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

type BackupVault

type BackupVault struct {
	FeatureSettings                 *FeatureSettings     `json:"featureSettings,omitempty"`
	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"`
	SecureScore                     *SecureScoreLevel    `json:"secureScore,omitempty"`
	SecuritySettings                *SecuritySettings    `json:"securitySettings,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) 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) 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 CrossRegionRestoreSettings added in v0.20230817.1112622

type CrossRegionRestoreSettings struct {
	State *CrossRegionRestoreState `json:"state,omitempty"`
}

type CrossRegionRestoreState added in v0.20230817.1112622

type CrossRegionRestoreState string
const (
	CrossRegionRestoreStateDisabled CrossRegionRestoreState = "Disabled"
	CrossRegionRestoreStateEnabled  CrossRegionRestoreState = "Enabled"
)

func (*CrossRegionRestoreState) UnmarshalJSON added in v0.20230817.1112622

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

type CrossSubscriptionRestoreSettings

type CrossSubscriptionRestoreSettings struct {
	State *CrossSubscriptionRestoreState `json:"state,omitempty"`
}

type CrossSubscriptionRestoreState

type CrossSubscriptionRestoreState string
const (
	CrossSubscriptionRestoreStateDisabled            CrossSubscriptionRestoreState = "Disabled"
	CrossSubscriptionRestoreStateEnabled             CrossSubscriptionRestoreState = "Enabled"
	CrossSubscriptionRestoreStatePermanentlyDisabled CrossSubscriptionRestoreState = "PermanentlyDisabled"
)

func (*CrossSubscriptionRestoreState) UnmarshalJSON

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	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"`
	UserAssignedIdentities *map[string]UserAssignedIdentity `json:"userAssignedIdentities,omitempty"`
}

type FeatureSettings

type FeatureSettings struct {
	CrossRegionRestoreSettings       *CrossRegionRestoreSettings       `json:"crossRegionRestoreSettings,omitempty"`
	CrossSubscriptionRestoreSettings *CrossSubscriptionRestoreSettings `json:"crossSubscriptionRestoreSettings,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 ImmutabilitySettings

type ImmutabilitySettings struct {
	State *ImmutabilityState `json:"state,omitempty"`
}

type ImmutabilityState

type ImmutabilityState string
const (
	ImmutabilityStateDisabled ImmutabilityState = "Disabled"
	ImmutabilityStateLocked   ImmutabilityState = "Locked"
	ImmutabilityStateUnlocked ImmutabilityState = "Unlocked"
)

func (*ImmutabilityState) UnmarshalJSON

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

type MonitoringSettings

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

type PatchBackupVaultInput

type PatchBackupVaultInput struct {
	FeatureSettings    *FeatureSettings    `json:"featureSettings,omitempty"`
	MonitoringSettings *MonitoringSettings `json:"monitoringSettings,omitempty"`
	SecuritySettings   *SecuritySettings   `json:"securitySettings,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

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

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

type SecureScoreLevel added in v0.20230817.1112622

type SecureScoreLevel string
const (
	SecureScoreLevelAdequate     SecureScoreLevel = "Adequate"
	SecureScoreLevelMaximum      SecureScoreLevel = "Maximum"
	SecureScoreLevelMinimum      SecureScoreLevel = "Minimum"
	SecureScoreLevelNone         SecureScoreLevel = "None"
	SecureScoreLevelNotSupported SecureScoreLevel = "NotSupported"
)

func (*SecureScoreLevel) UnmarshalJSON added in v0.20230817.1112622

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

type SecuritySettings

type SecuritySettings struct {
	ImmutabilitySettings *ImmutabilitySettings `json:"immutabilitySettings,omitempty"`
	SoftDeleteSettings   *SoftDeleteSettings   `json:"softDeleteSettings,omitempty"`
}

type SoftDeleteSettings

type SoftDeleteSettings struct {
	RetentionDurationInDays *float64         `json:"retentionDurationInDays,omitempty"`
	State                   *SoftDeleteState `json:"state,omitempty"`
}

type SoftDeleteState

type SoftDeleteState string
const (
	SoftDeleteStateAlwaysOn SoftDeleteState = "AlwaysOn"
	SoftDeleteStateOff      SoftDeleteState = "Off"
	SoftDeleteStateOn       SoftDeleteState = "On"
)

func (*SoftDeleteState) UnmarshalJSON

func (s *SoftDeleteState) 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

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

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

type UpdateOperationResponse

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

type UserAssignedIdentity added in v0.20230817.1112622

type UserAssignedIdentity struct {
	ClientId    *string `json:"clientId,omitempty"`
	PrincipalId *string `json:"principalId,omitempty"`
}

Jump to

Keyboard shortcuts

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