armdataprotection

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 17 Imported by: 23

README

Azure Backup Module for Go

PkgGoDev

The armdataprotection module provides operations for working with Azure Backup.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Backup module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Backup. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Backup modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armdataprotection.NewClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armdataprotection.NewClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Backup label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsoluteDeleteOption

type AbsoluteDeleteOption struct {
	// REQUIRED; Duration of deletion after given timespan
	Duration *string `json:"duration,omitempty"`

	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

AbsoluteDeleteOption - Delete option with duration

func (*AbsoluteDeleteOption) GetDeleteOption added in v0.2.0

func (a *AbsoluteDeleteOption) GetDeleteOption() *DeleteOption

GetDeleteOption implements the DeleteOptionClassification interface for type AbsoluteDeleteOption.

func (AbsoluteDeleteOption) MarshalJSON

func (a AbsoluteDeleteOption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AbsoluteDeleteOption.

func (*AbsoluteDeleteOption) UnmarshalJSON added in v0.2.0

func (a *AbsoluteDeleteOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AbsoluteDeleteOption.

type AbsoluteMarker

type AbsoluteMarker string
const (
	AbsoluteMarkerAllBackup    AbsoluteMarker = "AllBackup"
	AbsoluteMarkerFirstOfDay   AbsoluteMarker = "FirstOfDay"
	AbsoluteMarkerFirstOfMonth AbsoluteMarker = "FirstOfMonth"
	AbsoluteMarkerFirstOfWeek  AbsoluteMarker = "FirstOfWeek"
	AbsoluteMarkerFirstOfYear  AbsoluteMarker = "FirstOfYear"
)

func PossibleAbsoluteMarkerValues

func PossibleAbsoluteMarkerValues() []AbsoluteMarker

PossibleAbsoluteMarkerValues returns the possible values for the AbsoluteMarker const type.

type AdHocBackupRuleOptions

type AdHocBackupRuleOptions struct {
	// REQUIRED
	RuleName *string `json:"ruleName,omitempty"`

	// REQUIRED; Adhoc backup trigger option
	TriggerOption *AdhocBackupTriggerOption `json:"triggerOption,omitempty"`
}

AdHocBackupRuleOptions - Adhoc backup rules

type AdhocBackupTriggerOption

type AdhocBackupTriggerOption struct {
	RetentionTagOverride *string `json:"retentionTagOverride,omitempty"`
}

AdhocBackupTriggerOption - Adhoc backup trigger option

type AdhocBasedTaggingCriteria

type AdhocBasedTaggingCriteria struct {
	// Retention tag information
	TagInfo *RetentionTag `json:"tagInfo,omitempty"`
}

AdhocBasedTaggingCriteria - Adhoc backup tagging criteria

type AdhocBasedTriggerContext

type AdhocBasedTriggerContext struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Tagging Criteria containing retention tag for adhoc backup.
	TaggingCriteria *AdhocBasedTaggingCriteria `json:"taggingCriteria,omitempty"`
}

AdhocBasedTriggerContext - Adhoc trigger context

func (*AdhocBasedTriggerContext) GetTriggerContext added in v0.2.0

func (a *AdhocBasedTriggerContext) GetTriggerContext() *TriggerContext

GetTriggerContext implements the TriggerContextClassification interface for type AdhocBasedTriggerContext.

func (AdhocBasedTriggerContext) MarshalJSON

func (a AdhocBasedTriggerContext) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdhocBasedTriggerContext.

func (*AdhocBasedTriggerContext) UnmarshalJSON

func (a *AdhocBasedTriggerContext) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdhocBasedTriggerContext.

type AlertsState added in v0.3.0

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

func PossibleAlertsStateValues added in v0.3.0

func PossibleAlertsStateValues() []AlertsState

PossibleAlertsStateValues returns the possible values for the AlertsState const type.

type AuthCredentials

type AuthCredentials struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

AuthCredentials - Base class for different types of authentication credentials.

func (*AuthCredentials) GetAuthCredentials

func (a *AuthCredentials) GetAuthCredentials() *AuthCredentials

GetAuthCredentials implements the AuthCredentialsClassification interface for type AuthCredentials.

type AuthCredentialsClassification

type AuthCredentialsClassification interface {
	// GetAuthCredentials returns the AuthCredentials content of the underlying type.
	GetAuthCredentials() *AuthCredentials
}

AuthCredentialsClassification provides polymorphic access to related types. Call the interface's GetAuthCredentials() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AuthCredentials, *SecretStoreBasedAuthCredentials

type AzureBackupDiscreteRecoveryPoint

type AzureBackupDiscreteRecoveryPoint struct {
	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED
	RecoveryPointTime              *time.Time                       `json:"recoveryPointTime,omitempty"`
	FriendlyName                   *string                          `json:"friendlyName,omitempty"`
	PolicyName                     *string                          `json:"policyName,omitempty"`
	PolicyVersion                  *string                          `json:"policyVersion,omitempty"`
	RecoveryPointDataStoresDetails []*RecoveryPointDataStoreDetails `json:"recoveryPointDataStoresDetails,omitempty"`
	RecoveryPointID                *string                          `json:"recoveryPointId,omitempty"`
	RecoveryPointType              *string                          `json:"recoveryPointType,omitempty"`
	RetentionTagName               *string                          `json:"retentionTagName,omitempty"`
	RetentionTagVersion            *string                          `json:"retentionTagVersion,omitempty"`
}

AzureBackupDiscreteRecoveryPoint - Azure backup discrete RecoveryPoint

func (*AzureBackupDiscreteRecoveryPoint) GetAzureBackupRecoveryPoint added in v0.2.0

func (a *AzureBackupDiscreteRecoveryPoint) GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint

GetAzureBackupRecoveryPoint implements the AzureBackupRecoveryPointClassification interface for type AzureBackupDiscreteRecoveryPoint.

func (AzureBackupDiscreteRecoveryPoint) MarshalJSON

func (a AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBackupDiscreteRecoveryPoint.

func (*AzureBackupDiscreteRecoveryPoint) UnmarshalJSON

func (a *AzureBackupDiscreteRecoveryPoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupDiscreteRecoveryPoint.

type AzureBackupFindRestorableTimeRangesRequest

type AzureBackupFindRestorableTimeRangesRequest struct {
	// REQUIRED; Gets or sets the type of the source data store.
	SourceDataStoreType *RestoreSourceDataStoreType `json:"sourceDataStoreType,omitempty"`

	// End time for the List Restore Ranges request. ISO 8601 format.
	EndTime *string `json:"endTime,omitempty"`

	// Start time for the List Restore Ranges request. ISO 8601 format.
	StartTime *string `json:"startTime,omitempty"`
}

AzureBackupFindRestorableTimeRangesRequest - List Restore Ranges Request

type AzureBackupFindRestorableTimeRangesRequestResource

type AzureBackupFindRestorableTimeRangesRequestResource struct {
	// AzureBackupFindRestorableTimeRangesRequestResource content
	Content     *AzureBackupFindRestorableTimeRangesRequest `json:"content,omitempty"`
	CultureInfo *string                                     `json:"cultureInfo,omitempty"`
	HTTPMethod  *string                                     `json:"httpMethod,omitempty"`

	// Dictionary of
	Headers map[string][]*string `json:"headers,omitempty"`

	// Dictionary of
	Parameters             map[string]*string `json:"parameters,omitempty"`
	SubscriptionID         *string            `json:"subscriptionId,omitempty"`
	SupportedGroupVersions []*string          `json:"supportedGroupVersions,omitempty"`
	URI                    *string            `json:"uri,omitempty"`
}

AzureBackupFindRestorableTimeRangesRequestResource - List Restore Ranges Request

type AzureBackupFindRestorableTimeRangesResponse

type AzureBackupFindRestorableTimeRangesResponse struct {
	ObjectType *string `json:"objectType,omitempty"`

	// Returns the Restore Ranges available on the Backup Instance.
	RestorableTimeRanges []*RestorableTimeRange `json:"restorableTimeRanges,omitempty"`
}

AzureBackupFindRestorableTimeRangesResponse - List Restore Ranges Response

func (AzureBackupFindRestorableTimeRangesResponse) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureBackupFindRestorableTimeRangesResponse.

type AzureBackupFindRestorableTimeRangesResponseResource

type AzureBackupFindRestorableTimeRangesResponseResource struct {
	// AzureBackupFindRestorableTimeRangesResponseResource properties
	Properties *AzureBackupFindRestorableTimeRangesResponse `json:"properties,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

AzureBackupFindRestorableTimeRangesResponseResource - List Restore Ranges Response

type AzureBackupJob

type AzureBackupJob struct {
	// REQUIRED; Job Activity Id
	ActivityID *string `json:"activityID,omitempty"`

	// REQUIRED; Name of the Backup Instance
	BackupInstanceFriendlyName *string `json:"backupInstanceFriendlyName,omitempty"`

	// REQUIRED; ARM ID of the DataSource
	DataSourceID *string `json:"dataSourceId,omitempty"`

	// REQUIRED; Location of the DataSource
	DataSourceLocation *string `json:"dataSourceLocation,omitempty"`

	// REQUIRED; User Friendly Name of the DataSource
	DataSourceName *string `json:"dataSourceName,omitempty"`

	// REQUIRED; Type of DataSource
	DataSourceType *string `json:"dataSourceType,omitempty"`

	// REQUIRED; Indicated that whether the job is adhoc(true) or scheduled(false)
	IsUserTriggered *bool `json:"isUserTriggered,omitempty"`

	// REQUIRED; It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure
	Operation *string `json:"operation,omitempty"`

	// REQUIRED; It indicates the type of Job i.e. Backup/Restore/Tiering/Management
	OperationCategory *string `json:"operationCategory,omitempty"`

	// REQUIRED; Indicated whether progress is enabled for the job
	ProgressEnabled *bool `json:"progressEnabled,omitempty"`

	// REQUIRED; Resource Group Name of the Datasource
	SourceResourceGroup *string `json:"sourceResourceGroup,omitempty"`

	// REQUIRED; SubscriptionId corresponding to the DataSource
	SourceSubscriptionID *string `json:"sourceSubscriptionID,omitempty"`

	// REQUIRED; StartTime of the job(in UTC)
	StartTime *time.Time `json:"startTime,omitempty"`

	// REQUIRED; Status of the job like InProgress/Success/Failed/Cancelled/SuccessWithWarning
	Status *string `json:"status,omitempty"`

	// REQUIRED; Subscription Id of the corresponding backup vault
	SubscriptionID *string `json:"subscriptionId,omitempty"`

	// REQUIRED; List of supported actions
	SupportedActions []*string `json:"supportedActions,omitempty"`

	// REQUIRED; Name of the vault
	VaultName *string `json:"vaultName,omitempty"`

	// Data Source Set Name of the DataSource
	DataSourceSetName        *string `json:"dataSourceSetName,omitempty"`
	DestinationDataStoreName *string `json:"destinationDataStoreName,omitempty"`

	// Total run time of the job. ISO 8601 format.
	Duration            *string `json:"duration,omitempty"`
	Etag                *string `json:"etag,omitempty"`
	SourceDataStoreName *string `json:"sourceDataStoreName,omitempty"`

	// READ-ONLY; ARM ID of the Backup Instance
	BackupInstanceID *string `json:"backupInstanceId,omitempty" azure:"ro"`

	// READ-ONLY; EndTime of the job(in UTC)
	EndTime *time.Time `json:"endTime,omitempty" azure:"ro"`

	// READ-ONLY; A List, detailing the errors related to the job
	ErrorDetails []*UserFacingError `json:"errorDetails,omitempty" azure:"ro"`

	// READ-ONLY; Extended Information about the job
	ExtendedInfo *JobExtendedInfo `json:"extendedInfo,omitempty" azure:"ro"`

	// READ-ONLY; ARM ID of the policy
	PolicyID *string `json:"policyId,omitempty" azure:"ro"`

	// READ-ONLY; Name of the policy
	PolicyName *string `json:"policyName,omitempty" azure:"ro"`

	// READ-ONLY; Url which contains job's progress
	ProgressURL *string `json:"progressUrl,omitempty" azure:"ro"`

	// READ-ONLY; It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR
	RestoreType *string `json:"restoreType,omitempty" azure:"ro"`
}

AzureBackupJob - AzureBackup Job Class

func (AzureBackupJob) MarshalJSON

func (a AzureBackupJob) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBackupJob.

func (*AzureBackupJob) UnmarshalJSON

func (a *AzureBackupJob) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupJob.

type AzureBackupJobResource

type AzureBackupJobResource struct {
	// AzureBackupJobResource properties
	Properties *AzureBackupJob `json:"properties,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

AzureBackupJobResource - AzureBackup Job Resource Class

type AzureBackupJobResourceList

type AzureBackupJobResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`

	// List of resources.
	Value []*AzureBackupJobResource `json:"value,omitempty"`
}

AzureBackupJobResourceList - List of AzureBackup Job resources

type AzureBackupParams

type AzureBackupParams struct {
	// REQUIRED; BackupType ; Full/Incremental etc
	BackupType *string `json:"backupType,omitempty"`

	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

AzureBackupParams - Azure backup parameters

func (*AzureBackupParams) GetBackupParameters added in v0.2.0

func (a *AzureBackupParams) GetBackupParameters() *BackupParameters

GetBackupParameters implements the BackupParametersClassification interface for type AzureBackupParams.

func (AzureBackupParams) MarshalJSON

func (a AzureBackupParams) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBackupParams.

func (*AzureBackupParams) UnmarshalJSON

func (a *AzureBackupParams) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupParams.

type AzureBackupRecoveryPoint

type AzureBackupRecoveryPoint struct {
	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`
}

AzureBackupRecoveryPoint - Azure backup recoveryPoint

func (*AzureBackupRecoveryPoint) GetAzureBackupRecoveryPoint

func (a *AzureBackupRecoveryPoint) GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint

GetAzureBackupRecoveryPoint implements the AzureBackupRecoveryPointClassification interface for type AzureBackupRecoveryPoint.

type AzureBackupRecoveryPointBasedRestoreRequest

type AzureBackupRecoveryPointBasedRestoreRequest struct {
	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED
	RecoveryPointID *string `json:"recoveryPointId,omitempty"`

	// REQUIRED; Gets or sets the restore target information.
	RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"`

	// REQUIRED; Gets or sets the type of the source data store.
	SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"`

	// Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
	SourceResourceID *string `json:"sourceResourceId,omitempty"`
}

AzureBackupRecoveryPointBasedRestoreRequest - Azure backup recoveryPoint based restore request

func (*AzureBackupRecoveryPointBasedRestoreRequest) GetAzureBackupRecoveryPointBasedRestoreRequest

func (a *AzureBackupRecoveryPointBasedRestoreRequest) GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest

GetAzureBackupRecoveryPointBasedRestoreRequest implements the AzureBackupRecoveryPointBasedRestoreRequestClassification interface for type AzureBackupRecoveryPointBasedRestoreRequest.

func (*AzureBackupRecoveryPointBasedRestoreRequest) GetAzureBackupRestoreRequest added in v0.2.0

GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRecoveryPointBasedRestoreRequest.

func (AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPointBasedRestoreRequest.

func (*AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON

func (a *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPointBasedRestoreRequest.

type AzureBackupRecoveryPointBasedRestoreRequestClassification

type AzureBackupRecoveryPointBasedRestoreRequestClassification interface {
	AzureBackupRestoreRequestClassification
	// GetAzureBackupRecoveryPointBasedRestoreRequest returns the AzureBackupRecoveryPointBasedRestoreRequest content of the underlying type.
	GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest
}

AzureBackupRecoveryPointBasedRestoreRequestClassification provides polymorphic access to related types. Call the interface's GetAzureBackupRecoveryPointBasedRestoreRequest() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureBackupRecoveryPointBasedRestoreRequest, *AzureBackupRestoreWithRehydrationRequest

type AzureBackupRecoveryPointClassification

type AzureBackupRecoveryPointClassification interface {
	// GetAzureBackupRecoveryPoint returns the AzureBackupRecoveryPoint content of the underlying type.
	GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint
}

AzureBackupRecoveryPointClassification provides polymorphic access to related types. Call the interface's GetAzureBackupRecoveryPoint() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureBackupDiscreteRecoveryPoint, *AzureBackupRecoveryPoint

type AzureBackupRecoveryPointResource

type AzureBackupRecoveryPointResource struct {
	// AzureBackupRecoveryPointResource properties
	Properties AzureBackupRecoveryPointClassification `json:"properties,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

AzureBackupRecoveryPointResource - Azure backup recoveryPoint resource

func (AzureBackupRecoveryPointResource) MarshalJSON

func (a AzureBackupRecoveryPointResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPointResource.

func (*AzureBackupRecoveryPointResource) UnmarshalJSON

func (a *AzureBackupRecoveryPointResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPointResource.

type AzureBackupRecoveryPointResourceList

type AzureBackupRecoveryPointResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`

	// List of resources.
	Value []*AzureBackupRecoveryPointResource `json:"value,omitempty"`
}

AzureBackupRecoveryPointResourceList - Azure backup recoveryPoint resource list

type AzureBackupRecoveryTimeBasedRestoreRequest

type AzureBackupRecoveryTimeBasedRestoreRequest struct {
	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z.
	RecoveryPointTime *string `json:"recoveryPointTime,omitempty"`

	// REQUIRED; Gets or sets the restore target information.
	RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"`

	// REQUIRED; Gets or sets the type of the source data store.
	SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"`

	// Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
	SourceResourceID *string `json:"sourceResourceId,omitempty"`
}

AzureBackupRecoveryTimeBasedRestoreRequest - AzureBackup RecoveryPointTime Based Restore Request

func (*AzureBackupRecoveryTimeBasedRestoreRequest) GetAzureBackupRestoreRequest added in v0.2.0

func (a *AzureBackupRecoveryTimeBasedRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest

GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRecoveryTimeBasedRestoreRequest.

func (AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryTimeBasedRestoreRequest.

func (*AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON

func (a *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryTimeBasedRestoreRequest.

type AzureBackupRehydrationRequest

type AzureBackupRehydrationRequest struct {
	// REQUIRED; Id of the recovery point to be recovered
	RecoveryPointID *string `json:"recoveryPointId,omitempty"`

	// REQUIRED; Retention duration in ISO 8601 format i.e P10D .
	RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"`

	// Priority to be used for rehydration. Values High or Standard
	RehydrationPriority *RehydrationPriority `json:"rehydrationPriority,omitempty"`
}

AzureBackupRehydrationRequest - Azure Backup Rehydrate Request

type AzureBackupRestoreRequest

type AzureBackupRestoreRequest struct {
	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Gets or sets the restore target information.
	RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"`

	// REQUIRED; Gets or sets the type of the source data store.
	SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"`

	// Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
	SourceResourceID *string `json:"sourceResourceId,omitempty"`
}

AzureBackupRestoreRequest - Azure backup restore request

func (*AzureBackupRestoreRequest) GetAzureBackupRestoreRequest

func (a *AzureBackupRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest

GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRestoreRequest.

func (AzureBackupRestoreRequest) MarshalJSON added in v0.2.0

func (a AzureBackupRestoreRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBackupRestoreRequest.

func (*AzureBackupRestoreRequest) UnmarshalJSON

func (a *AzureBackupRestoreRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRestoreRequest.

type AzureBackupRestoreRequestClassification

type AzureBackupRestoreRequestClassification interface {
	// GetAzureBackupRestoreRequest returns the AzureBackupRestoreRequest content of the underlying type.
	GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest
}

AzureBackupRestoreRequestClassification provides polymorphic access to related types. Call the interface's GetAzureBackupRestoreRequest() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureBackupRecoveryPointBasedRestoreRequest, *AzureBackupRecoveryTimeBasedRestoreRequest, *AzureBackupRestoreRequest, - *AzureBackupRestoreWithRehydrationRequest

type AzureBackupRestoreWithRehydrationRequest

type AzureBackupRestoreWithRehydrationRequest struct {
	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED
	RecoveryPointID *string `json:"recoveryPointId,omitempty"`

	// REQUIRED; Priority to be used for rehydration. Values High or Standard
	RehydrationPriority *RehydrationPriority `json:"rehydrationPriority,omitempty"`

	// REQUIRED; Retention duration in ISO 8601 format i.e P10D .
	RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"`

	// REQUIRED; Gets or sets the restore target information.
	RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"`

	// REQUIRED; Gets or sets the type of the source data store.
	SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"`

	// Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
	SourceResourceID *string `json:"sourceResourceId,omitempty"`
}

AzureBackupRestoreWithRehydrationRequest - AzureBackup Restore with Rehydration Request

func (*AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRecoveryPointBasedRestoreRequest added in v0.2.0

func (a *AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest

GetAzureBackupRecoveryPointBasedRestoreRequest implements the AzureBackupRecoveryPointBasedRestoreRequestClassification interface for type AzureBackupRestoreWithRehydrationRequest.

func (*AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRestoreRequest added in v0.2.0

func (a *AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest

GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRestoreWithRehydrationRequest.

func (AzureBackupRestoreWithRehydrationRequest) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureBackupRestoreWithRehydrationRequest.

func (*AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON

func (a *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRestoreWithRehydrationRequest.

type AzureBackupRule

type AzureBackupRule struct {
	// REQUIRED; DataStoreInfo base
	DataStore *DataStoreInfoBase `json:"dataStore,omitempty"`

	// REQUIRED
	Name *string `json:"name,omitempty"`

	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Trigger context
	Trigger TriggerContextClassification `json:"trigger,omitempty"`

	// BackupParameters base
	BackupParameters BackupParametersClassification `json:"backupParameters,omitempty"`
}

AzureBackupRule - Azure backup rule

func (*AzureBackupRule) GetBasePolicyRule added in v0.2.0

func (a *AzureBackupRule) GetBasePolicyRule() *BasePolicyRule

GetBasePolicyRule implements the BasePolicyRuleClassification interface for type AzureBackupRule.

func (AzureBackupRule) MarshalJSON

func (a AzureBackupRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBackupRule.

func (*AzureBackupRule) UnmarshalJSON

func (a *AzureBackupRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRule.

type AzureMonitorAlertSettings added in v0.3.0

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

AzureMonitorAlertSettings - Settings for Azure Monitor based alerts

type AzureOperationalStoreParameters

type AzureOperationalStoreParameters struct {
	// REQUIRED; type of datastore; Operational/Vault/Archive
	DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"`

	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// Gets or sets the Snapshot Resource Group Uri.
	ResourceGroupID *string `json:"resourceGroupId,omitempty"`
}

AzureOperationalStoreParameters - Parameters for Operational-Tier DataStore

func (*AzureOperationalStoreParameters) GetDataStoreParameters added in v0.2.0

func (a *AzureOperationalStoreParameters) GetDataStoreParameters() *DataStoreParameters

GetDataStoreParameters implements the DataStoreParametersClassification interface for type AzureOperationalStoreParameters.

func (AzureOperationalStoreParameters) MarshalJSON

func (a AzureOperationalStoreParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureOperationalStoreParameters.

func (*AzureOperationalStoreParameters) UnmarshalJSON

func (a *AzureOperationalStoreParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureOperationalStoreParameters.

type AzureRetentionRule

type AzureRetentionRule struct {
	// REQUIRED
	Lifecycles []*SourceLifeCycle `json:"lifecycles,omitempty"`

	// REQUIRED
	Name *string `json:"name,omitempty"`

	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`
	IsDefault  *bool   `json:"isDefault,omitempty"`
}

AzureRetentionRule - Azure retention rule

func (*AzureRetentionRule) GetBasePolicyRule added in v0.2.0

func (a *AzureRetentionRule) GetBasePolicyRule() *BasePolicyRule

GetBasePolicyRule implements the BasePolicyRuleClassification interface for type AzureRetentionRule.

func (AzureRetentionRule) MarshalJSON

func (a AzureRetentionRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureRetentionRule.

func (*AzureRetentionRule) UnmarshalJSON

func (a *AzureRetentionRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureRetentionRule.

type BackupCriteria

type BackupCriteria struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

BackupCriteria base class

func (*BackupCriteria) GetBackupCriteria

func (b *BackupCriteria) GetBackupCriteria() *BackupCriteria

GetBackupCriteria implements the BackupCriteriaClassification interface for type BackupCriteria.

type BackupCriteriaClassification

type BackupCriteriaClassification interface {
	// GetBackupCriteria returns the BackupCriteria content of the underlying type.
	GetBackupCriteria() *BackupCriteria
}

BackupCriteriaClassification provides polymorphic access to related types. Call the interface's GetBackupCriteria() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *BackupCriteria, *ScheduleBasedBackupCriteria

type BackupInstance

type BackupInstance struct {
	// REQUIRED; Gets or sets the data source information.
	DataSourceInfo *Datasource `json:"dataSourceInfo,omitempty"`

	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Gets or sets the policy information.
	PolicyInfo *PolicyInfo `json:"policyInfo,omitempty"`

	// Gets or sets the data source set information.
	DataSourceSetInfo *DatasourceSet `json:"dataSourceSetInfo,omitempty"`

	// Credentials to use to authenticate with data source provider.
	DatasourceAuthCredentials AuthCredentialsClassification `json:"datasourceAuthCredentials,omitempty"`

	// Gets or sets the Backup Instance friendly name.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again.
	ValidationType *ValidationType `json:"validationType,omitempty"`

	// READ-ONLY; Specifies the current protection state of the resource
	CurrentProtectionState *CurrentProtectionState `json:"currentProtectionState,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the protection error of the resource
	ProtectionErrorDetails *UserFacingError `json:"protectionErrorDetails,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the protection status of the resource
	ProtectionStatus *ProtectionStatusDetails `json:"protectionStatus,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the provisioning state of the resource i.e. provisioning/updating/Succeeded/Failed
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

BackupInstance - Backup Instance

func (BackupInstance) MarshalJSON

func (b BackupInstance) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupInstance.

func (*BackupInstance) UnmarshalJSON

func (b *BackupInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupInstance.

type BackupInstanceResource

type BackupInstanceResource struct {
	// BackupInstanceResource properties
	Properties *BackupInstance `json:"properties,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

BackupInstanceResource - BackupInstance Resource

type BackupInstanceResourceList

type BackupInstanceResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`

	// List of resources.
	Value []*BackupInstanceResource `json:"value,omitempty"`
}

BackupInstanceResourceList - BackupInstance Resource list response

type BackupInstancesClient

type BackupInstancesClient struct {
	// contains filtered or unexported fields
}

BackupInstancesClient contains the methods for the BackupInstances group. Don't use this type directly, use NewBackupInstancesClient() instead.

func NewBackupInstancesClient

func NewBackupInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupInstancesClient, error)

NewBackupInstancesClient creates a new instance of BackupInstancesClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*BackupInstancesClient) BeginAdhocBackup

func (client *BackupInstancesClient) BeginAdhocBackup(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*runtime.Poller[BackupInstancesClientAdhocBackupResponse], error)

BeginAdhocBackup - Trigger adhoc backup If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance parameters - Request body for operation options - BackupInstancesClientBeginAdhocBackupOptions contains the optional parameters for the BackupInstancesClient.BeginAdhocBackup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/TriggerBackup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginAdhocBackup(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		armdataprotection.TriggerBackupRequest{
			BackupRuleOptions: &armdataprotection.AdHocBackupRuleOptions{
				RuleName: to.Ptr("BackupWeekly"),
				TriggerOption: &armdataprotection.AdhocBackupTriggerOption{
					RetentionTagOverride: to.Ptr("yearly"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupInstancesClient) BeginCreateOrUpdate

func (client *BackupInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupInstancesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a backup instance in a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance parameters - Request body for operation options - BackupInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupInstancesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/PutBackupInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		armdataprotection.BackupInstanceResource{
			Properties: &armdataprotection.BackupInstance{
				DataSourceInfo: &armdataprotection.Datasource{
					DatasourceType:   to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
					ObjectType:       to.Ptr("Datasource"),
					ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"),
					ResourceLocation: to.Ptr(""),
					ResourceName:     to.Ptr("testdb"),
					ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
					ResourceURI:      to.Ptr(""),
				},
				DataSourceSetInfo: &armdataprotection.DatasourceSet{
					DatasourceType:   to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
					ObjectType:       to.Ptr("DatasourceSet"),
					ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"),
					ResourceLocation: to.Ptr(""),
					ResourceName:     to.Ptr("viveksipgtest"),
					ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers"),
					ResourceURI:      to.Ptr(""),
				},
				DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{
					ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"),
					SecretStoreResource: &armdataprotection.SecretStoreResource{
						SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault),
						URI:             to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"),
					},
				},
				FriendlyName: to.Ptr("harshitbi2"),
				ObjectType:   to.Ptr("BackupInstance"),
				PolicyInfo: &armdataprotection.PolicyInfo{
					PolicyID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1"),
					PolicyParameters: &armdataprotection.PolicyParameters{
						DataStoreParametersList: []armdataprotection.DataStoreParametersClassification{
							&armdataprotection.AzureOperationalStoreParameters{
								DataStoreType:   to.Ptr(armdataprotection.DataStoreTypesOperationalStore),
								ObjectType:      to.Ptr("AzureOperationalStoreParameters"),
								ResourceGroupID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest"),
							}},
					},
				},
				ValidationType: to.Ptr(armdataprotection.ValidationTypeShallowValidation),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupInstancesClient) BeginDelete

func (client *BackupInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*runtime.Poller[BackupInstancesClientDeleteResponse], error)

BeginDelete - Delete a backup instance in a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance options - BackupInstancesClientBeginDeleteOptions contains the optional parameters for the BackupInstancesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/DeleteBackupInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*BackupInstancesClient) BeginResumeBackups added in v0.3.0

func (client *BackupInstancesClient) BeginResumeBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*runtime.Poller[BackupInstancesClientResumeBackupsResponse], error)

BeginResumeBackups - This operation will resume backups for backup instance If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupInstancesClientBeginResumeBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginResumeBackups method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ResumeBackups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginResumeBackups(ctx,
		"testrg",
		"testvault",
		"testbi",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*BackupInstancesClient) BeginResumeProtection added in v0.3.0

func (client *BackupInstancesClient) BeginResumeProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*runtime.Poller[BackupInstancesClientResumeProtectionResponse], error)

BeginResumeProtection - This operation will resume protection for a stopped backup instance If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupInstancesClientBeginResumeProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginResumeProtection method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ResumeProtection.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginResumeProtection(ctx,
		"testrg",
		"testvault",
		"testbi",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*BackupInstancesClient) BeginStopProtection added in v0.3.0

func (client *BackupInstancesClient) BeginStopProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*runtime.Poller[BackupInstancesClientStopProtectionResponse], error)

BeginStopProtection - This operation will stop protection of a backup instance and data will be held forever If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupInstancesClientBeginStopProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginStopProtection method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/StopProtection.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStopProtection(ctx,
		"testrg",
		"testvault",
		"testbi",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*BackupInstancesClient) BeginSuspendBackups added in v0.3.0

func (client *BackupInstancesClient) BeginSuspendBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*runtime.Poller[BackupInstancesClientSuspendBackupsResponse], error)

BeginSuspendBackups - This operation will stop backups for backup instance If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupInstancesClientBeginSuspendBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginSuspendBackups method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/SuspendBackups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginSuspendBackups(ctx,
		"testrg",
		"testvault",
		"testbi",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*BackupInstancesClient) BeginSyncBackupInstance added in v0.3.0

func (client *BackupInstancesClient) BeginSyncBackupInstance(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*runtime.Poller[BackupInstancesClientSyncBackupInstanceResponse], error)

BeginSyncBackupInstance - Sync backup instance again in case of failure This action will retry last failed operation and will bring backup instance to valid state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. parameters - Request body for operation options - BackupInstancesClientBeginSyncBackupInstanceOptions contains the optional parameters for the BackupInstancesClient.BeginSyncBackupInstance method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/SyncBackupInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginSyncBackupInstance(ctx,
		"testrg",
		"testvault",
		"testbi",
		armdataprotection.SyncBackupInstanceRequest{
			SyncType: to.Ptr(armdataprotection.SyncTypeDefault),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*BackupInstancesClient) BeginTriggerRehydrate

func (client *BackupInstancesClient) BeginTriggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*runtime.Poller[BackupInstancesClientTriggerRehydrateResponse], error)

BeginTriggerRehydrate - rehydrate recovery point for restore for a BackupInstance If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. parameters - Request body for operation options - BackupInstancesClientBeginTriggerRehydrateOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRehydrate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/TriggerRehydrate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginTriggerRehydrate(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		armdataprotection.AzureBackupRehydrationRequest{
			RecoveryPointID:              to.Ptr("hardcodedRP"),
			RehydrationPriority:          to.Ptr(armdataprotection.RehydrationPriorityHigh),
			RehydrationRetentionDuration: to.Ptr("7D"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*BackupInstancesClient) BeginTriggerRestore

BeginTriggerRestore - Triggers restore for a BackupInstance If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance parameters - Request body for operation options - BackupInstancesClientBeginTriggerRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRestore method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/TriggerRestore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginTriggerRestore(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		&armdataprotection.AzureBackupRecoveryPointBasedRestoreRequest{
			ObjectType: to.Ptr("AzureBackupRecoveryPointBasedRestoreRequest"),
			RestoreTargetInfo: &armdataprotection.RestoreTargetInfo{
				ObjectType:      to.Ptr("RestoreTargetInfo"),
				RecoveryOption:  to.Ptr(armdataprotection.RecoveryOptionFailIfExists),
				RestoreLocation: to.Ptr("southeastasia"),
				DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{
					ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"),
					SecretStoreResource: &armdataprotection.SecretStoreResource{
						SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault),
						URI:             to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"),
					},
				},
				DatasourceInfo: &armdataprotection.Datasource{
					DatasourceType:   to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
					ObjectType:       to.Ptr("Datasource"),
					ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb"),
					ResourceLocation: to.Ptr(""),
					ResourceName:     to.Ptr("targetdb"),
					ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
					ResourceURI:      to.Ptr(""),
				},
				DatasourceSetInfo: &armdataprotection.DatasourceSet{
					DatasourceType:   to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
					ObjectType:       to.Ptr("DatasourceSet"),
					ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"),
					ResourceLocation: to.Ptr(""),
					ResourceName:     to.Ptr("viveksipgtest"),
					ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers"),
					ResourceURI:      to.Ptr(""),
				},
			},
			SourceDataStoreType: to.Ptr(armdataprotection.SourceDataStoreTypeVaultStore),
			SourceResourceID:    to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"),
			RecoveryPointID:     to.Ptr("hardcodedRP"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupInstancesClient) BeginValidateForBackup

BeginValidateForBackup - Validate whether adhoc backup will be successful or not If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. parameters - Request body for operation options - BackupInstancesClientBeginValidateForBackupOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForBackup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ValidateForBackup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginValidateForBackup(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		armdataprotection.ValidateForBackupRequest{
			BackupInstance: &armdataprotection.BackupInstance{
				DataSourceInfo: &armdataprotection.Datasource{
					DatasourceType:   to.Ptr("OssDB"),
					ObjectType:       to.Ptr("Datasource"),
					ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"),
					ResourceLocation: to.Ptr(""),
					ResourceName:     to.Ptr("testdb"),
					ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
					ResourceURI:      to.Ptr(""),
				},
				DataSourceSetInfo: &armdataprotection.DatasourceSet{
					DatasourceType:   to.Ptr("OssDB"),
					ObjectType:       to.Ptr("DatasourceSet"),
					ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"),
					ResourceLocation: to.Ptr(""),
					ResourceName:     to.Ptr("viveksipgtest"),
					ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers"),
					ResourceURI:      to.Ptr(""),
				},
				DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{
					ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"),
					SecretStoreResource: &armdataprotection.SecretStoreResource{
						SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault),
						URI:             to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"),
					},
				},
				FriendlyName: to.Ptr("harshitbi2"),
				ObjectType:   to.Ptr("BackupInstance"),
				PolicyInfo: &armdataprotection.PolicyInfo{
					PolicyID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupInstancesClient) BeginValidateForRestore

func (client *BackupInstancesClient) BeginValidateForRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*runtime.Poller[BackupInstancesClientValidateForRestoreResponse], error)

BeginValidateForRestore - Validates if Restore can be triggered for a DataSource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance parameters - Request body for operation options - BackupInstancesClientBeginValidateForRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForRestore method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ValidateRestore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginValidateForRestore(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		armdataprotection.ValidateRestoreRequestObject{
			RestoreRequestObject: &armdataprotection.AzureBackupRecoveryPointBasedRestoreRequest{
				ObjectType: to.Ptr("AzureBackupRecoveryPointBasedRestoreRequest"),
				RestoreTargetInfo: &armdataprotection.RestoreTargetInfo{
					ObjectType:      to.Ptr("RestoreTargetInfo"),
					RecoveryOption:  to.Ptr(armdataprotection.RecoveryOptionFailIfExists),
					RestoreLocation: to.Ptr("southeastasia"),
					DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{
						ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"),
						SecretStoreResource: &armdataprotection.SecretStoreResource{
							SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault),
							URI:             to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"),
						},
					},
					DatasourceInfo: &armdataprotection.Datasource{
						DatasourceType:   to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
						ObjectType:       to.Ptr("Datasource"),
						ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb"),
						ResourceLocation: to.Ptr(""),
						ResourceName:     to.Ptr("targetdb"),
						ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
						ResourceURI:      to.Ptr(""),
					},
					DatasourceSetInfo: &armdataprotection.DatasourceSet{
						DatasourceType:   to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"),
						ObjectType:       to.Ptr("DatasourceSet"),
						ResourceID:       to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"),
						ResourceLocation: to.Ptr(""),
						ResourceName:     to.Ptr("viveksipgtest"),
						ResourceType:     to.Ptr("Microsoft.DBforPostgreSQL/servers"),
						ResourceURI:      to.Ptr(""),
					},
				},
				SourceDataStoreType: to.Ptr(armdataprotection.SourceDataStoreTypeVaultStore),
				SourceResourceID:    to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"),
				RecoveryPointID:     to.Ptr("hardcodedRP"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupInstancesClient) Get

func (client *BackupInstancesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientGetOptions) (BackupInstancesClientGetResponse, error)

Get - Gets a backup instance with name in a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance options - BackupInstancesClientGetOptions contains the optional parameters for the BackupInstancesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/GetBackupInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupInstancesClient) GetBackupInstanceOperationResult added in v0.3.0

func (client *BackupInstancesClient) GetBackupInstanceOperationResult(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, operationID string, options *BackupInstancesClientGetBackupInstanceOperationResultOptions) (BackupInstancesClientGetBackupInstanceOperationResultResponse, error)

GetBackupInstanceOperationResult - Get result of backup instance creation operation If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupInstancesClientGetBackupInstanceOperationResultOptions contains the optional parameters for the BackupInstancesClient.GetBackupInstanceOperationResult method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetBackupInstanceOperationResult(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"testInstance1",
		"YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupInstancesClient) NewListPager added in v0.4.0

func (client *BackupInstancesClient) NewListPager(resourceGroupName string, vaultName string, options *BackupInstancesClientListOptions) *runtime.Pager[BackupInstancesClientListResponse]

NewListPager - Gets a backup instances belonging to a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupInstancesClientListOptions contains the optional parameters for the BackupInstancesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ListBackupInstances.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("000pikumar",
		"PratikPrivatePreviewVault1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type BackupInstancesClientAdhocBackupResponse added in v0.2.0

type BackupInstancesClientAdhocBackupResponse struct {
	OperationJobExtendedInfo
}

BackupInstancesClientAdhocBackupResponse contains the response from method BackupInstancesClient.AdhocBackup.

type BackupInstancesClientBeginAdhocBackupOptions added in v0.2.0

type BackupInstancesClientBeginAdhocBackupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginAdhocBackupOptions contains the optional parameters for the BackupInstancesClient.BeginAdhocBackup method.

type BackupInstancesClientBeginCreateOrUpdateOptions added in v0.2.0

type BackupInstancesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupInstancesClient.BeginCreateOrUpdate method.

type BackupInstancesClientBeginDeleteOptions added in v0.2.0

type BackupInstancesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginDeleteOptions contains the optional parameters for the BackupInstancesClient.BeginDelete method.

type BackupInstancesClientBeginResumeBackupsOptions added in v0.3.0

type BackupInstancesClientBeginResumeBackupsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginResumeBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginResumeBackups method.

type BackupInstancesClientBeginResumeProtectionOptions added in v0.3.0

type BackupInstancesClientBeginResumeProtectionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginResumeProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginResumeProtection method.

type BackupInstancesClientBeginStopProtectionOptions added in v0.3.0

type BackupInstancesClientBeginStopProtectionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginStopProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginStopProtection method.

type BackupInstancesClientBeginSuspendBackupsOptions added in v0.3.0

type BackupInstancesClientBeginSuspendBackupsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginSuspendBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginSuspendBackups method.

type BackupInstancesClientBeginSyncBackupInstanceOptions added in v0.3.0

type BackupInstancesClientBeginSyncBackupInstanceOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginSyncBackupInstanceOptions contains the optional parameters for the BackupInstancesClient.BeginSyncBackupInstance method.

type BackupInstancesClientBeginTriggerRehydrateOptions added in v0.2.0

type BackupInstancesClientBeginTriggerRehydrateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginTriggerRehydrateOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRehydrate method.

type BackupInstancesClientBeginTriggerRestoreOptions added in v0.2.0

type BackupInstancesClientBeginTriggerRestoreOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginTriggerRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRestore method.

type BackupInstancesClientBeginValidateForBackupOptions added in v0.2.0

type BackupInstancesClientBeginValidateForBackupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginValidateForBackupOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForBackup method.

type BackupInstancesClientBeginValidateForRestoreOptions added in v0.2.0

type BackupInstancesClientBeginValidateForRestoreOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupInstancesClientBeginValidateForRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForRestore method.

type BackupInstancesClientCreateOrUpdateResponse added in v0.2.0

type BackupInstancesClientCreateOrUpdateResponse struct {
	BackupInstanceResource
}

BackupInstancesClientCreateOrUpdateResponse contains the response from method BackupInstancesClient.CreateOrUpdate.

type BackupInstancesClientDeleteResponse added in v0.2.0

type BackupInstancesClientDeleteResponse struct {
}

BackupInstancesClientDeleteResponse contains the response from method BackupInstancesClient.Delete.

type BackupInstancesClientGetBackupInstanceOperationResultOptions added in v0.3.0

type BackupInstancesClientGetBackupInstanceOperationResultOptions struct {
}

BackupInstancesClientGetBackupInstanceOperationResultOptions contains the optional parameters for the BackupInstancesClient.GetBackupInstanceOperationResult method.

type BackupInstancesClientGetBackupInstanceOperationResultResponse added in v0.3.0

type BackupInstancesClientGetBackupInstanceOperationResultResponse struct {
	BackupInstanceResource
}

BackupInstancesClientGetBackupInstanceOperationResultResponse contains the response from method BackupInstancesClient.GetBackupInstanceOperationResult.

type BackupInstancesClientGetOptions added in v0.2.0

type BackupInstancesClientGetOptions struct {
}

BackupInstancesClientGetOptions contains the optional parameters for the BackupInstancesClient.Get method.

type BackupInstancesClientGetResponse added in v0.2.0

type BackupInstancesClientGetResponse struct {
	BackupInstanceResource
}

BackupInstancesClientGetResponse contains the response from method BackupInstancesClient.Get.

type BackupInstancesClientListOptions added in v0.2.0

type BackupInstancesClientListOptions struct {
}

BackupInstancesClientListOptions contains the optional parameters for the BackupInstancesClient.List method.

type BackupInstancesClientListResponse added in v0.2.0

type BackupInstancesClientListResponse struct {
	BackupInstanceResourceList
}

BackupInstancesClientListResponse contains the response from method BackupInstancesClient.List.

type BackupInstancesClientResumeBackupsResponse added in v0.3.0

type BackupInstancesClientResumeBackupsResponse struct {
}

BackupInstancesClientResumeBackupsResponse contains the response from method BackupInstancesClient.ResumeBackups.

type BackupInstancesClientResumeProtectionResponse added in v0.3.0

type BackupInstancesClientResumeProtectionResponse struct {
}

BackupInstancesClientResumeProtectionResponse contains the response from method BackupInstancesClient.ResumeProtection.

type BackupInstancesClientStopProtectionResponse added in v0.3.0

type BackupInstancesClientStopProtectionResponse struct {
}

BackupInstancesClientStopProtectionResponse contains the response from method BackupInstancesClient.StopProtection.

type BackupInstancesClientSuspendBackupsResponse added in v0.3.0

type BackupInstancesClientSuspendBackupsResponse struct {
}

BackupInstancesClientSuspendBackupsResponse contains the response from method BackupInstancesClient.SuspendBackups.

type BackupInstancesClientSyncBackupInstanceResponse added in v0.3.0

type BackupInstancesClientSyncBackupInstanceResponse struct {
}

BackupInstancesClientSyncBackupInstanceResponse contains the response from method BackupInstancesClient.SyncBackupInstance.

type BackupInstancesClientTriggerRehydrateResponse added in v0.2.0

type BackupInstancesClientTriggerRehydrateResponse struct {
}

BackupInstancesClientTriggerRehydrateResponse contains the response from method BackupInstancesClient.TriggerRehydrate.

type BackupInstancesClientTriggerRestoreResponse added in v0.2.0

type BackupInstancesClientTriggerRestoreResponse struct {
	OperationJobExtendedInfo
}

BackupInstancesClientTriggerRestoreResponse contains the response from method BackupInstancesClient.TriggerRestore.

type BackupInstancesClientValidateForBackupResponse added in v0.2.0

type BackupInstancesClientValidateForBackupResponse struct {
	OperationJobExtendedInfo
}

BackupInstancesClientValidateForBackupResponse contains the response from method BackupInstancesClient.ValidateForBackup.

type BackupInstancesClientValidateForRestoreResponse added in v0.2.0

type BackupInstancesClientValidateForRestoreResponse struct {
	OperationJobExtendedInfo
}

BackupInstancesClientValidateForRestoreResponse contains the response from method BackupInstancesClient.ValidateForRestore.

type BackupParameters

type BackupParameters struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

BackupParameters base

func (*BackupParameters) GetBackupParameters

func (b *BackupParameters) GetBackupParameters() *BackupParameters

GetBackupParameters implements the BackupParametersClassification interface for type BackupParameters.

type BackupParametersClassification

type BackupParametersClassification interface {
	// GetBackupParameters returns the BackupParameters content of the underlying type.
	GetBackupParameters() *BackupParameters
}

BackupParametersClassification provides polymorphic access to related types. Call the interface's GetBackupParameters() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureBackupParams, *BackupParameters

type BackupPoliciesClient

type BackupPoliciesClient struct {
	// contains filtered or unexported fields
}

BackupPoliciesClient contains the methods for the BackupPolicies group. Don't use this type directly, use NewBackupPoliciesClient() instead.

func NewBackupPoliciesClient

func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupPoliciesClient, error)

NewBackupPoliciesClient creates a new instance of BackupPoliciesClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*BackupPoliciesClient) CreateOrUpdate

func (client *BackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, parameters BaseBackupPolicyResource, options *BackupPoliciesClientCreateOrUpdateOptions) (BackupPoliciesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a backup policy belonging to a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupPolicyName - Name of the policy parameters - Request body for operation options - BackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BackupPoliciesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"000pikumar",
		"PrivatePreviewVault",
		"OSSDBPolicy",
		armdataprotection.BaseBackupPolicyResource{
			Properties: &armdataprotection.BackupPolicy{
				DatasourceTypes: []*string{
					to.Ptr("OssDB")},
				ObjectType: to.Ptr("BackupPolicy"),
				PolicyRules: []armdataprotection.BasePolicyRuleClassification{
					&armdataprotection.AzureBackupRule{
						Name:       to.Ptr("BackupWeekly"),
						ObjectType: to.Ptr("AzureBackupRule"),
						BackupParameters: &armdataprotection.AzureBackupParams{
							ObjectType: to.Ptr("AzureBackupParams"),
							BackupType: to.Ptr("Full"),
						},
						DataStore: &armdataprotection.DataStoreInfoBase{
							DataStoreType: to.Ptr(armdataprotection.DataStoreTypesVaultStore),
							ObjectType:    to.Ptr("DataStoreInfoBase"),
						},
						Trigger: &armdataprotection.ScheduleBasedTriggerContext{
							ObjectType: to.Ptr("ScheduleBasedTriggerContext"),
							Schedule: &armdataprotection.BackupSchedule{
								RepeatingTimeIntervals: []*string{
									to.Ptr("R/2019-11-20T08:00:00-08:00/P1W")},
							},
							TaggingCriteria: []*armdataprotection.TaggingCriteria{
								{
									IsDefault: to.Ptr(true),
									TagInfo: &armdataprotection.RetentionTag{
										TagName: to.Ptr("Default"),
									},
									TaggingPriority: to.Ptr[int64](99),
								},
								{
									Criteria: []armdataprotection.BackupCriteriaClassification{
										&armdataprotection.ScheduleBasedBackupCriteria{
											ObjectType: to.Ptr("ScheduleBasedBackupCriteria"),
											DaysOfTheWeek: []*armdataprotection.DayOfWeek{
												to.Ptr(armdataprotection.DayOfWeekSunday)},
											ScheduleTimes: []*time.Time{
												to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-03-01T13:00:00Z"); return t }())},
										}},
									IsDefault: to.Ptr(false),
									TagInfo: &armdataprotection.RetentionTag{
										TagName: to.Ptr("Weekly"),
									},
									TaggingPriority: to.Ptr[int64](20),
								}},
						},
					},
					&armdataprotection.AzureRetentionRule{
						Name:       to.Ptr("Default"),
						ObjectType: to.Ptr("AzureRetentionRule"),
						IsDefault:  to.Ptr(true),
						Lifecycles: []*armdataprotection.SourceLifeCycle{
							{
								DeleteAfter: &armdataprotection.AbsoluteDeleteOption{
									Duration:   to.Ptr("P1W"),
									ObjectType: to.Ptr("AbsoluteDeleteOption"),
								},
								SourceDataStore: &armdataprotection.DataStoreInfoBase{
									DataStoreType: to.Ptr(armdataprotection.DataStoreTypesVaultStore),
									ObjectType:    to.Ptr("DataStoreInfoBase"),
								},
							}},
					},
					&armdataprotection.AzureRetentionRule{
						Name:       to.Ptr("Weekly"),
						ObjectType: to.Ptr("AzureRetentionRule"),
						IsDefault:  to.Ptr(false),
						Lifecycles: []*armdataprotection.SourceLifeCycle{
							{
								DeleteAfter: &armdataprotection.AbsoluteDeleteOption{
									Duration:   to.Ptr("P12W"),
									ObjectType: to.Ptr("AbsoluteDeleteOption"),
								},
								SourceDataStore: &armdataprotection.DataStoreInfoBase{
									DataStoreType: to.Ptr(armdataprotection.DataStoreTypesVaultStore),
									ObjectType:    to.Ptr("DataStoreInfoBase"),
								},
							}},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupPoliciesClient) Delete

func (client *BackupPoliciesClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientDeleteOptions) (BackupPoliciesClientDeleteResponse, error)

Delete - Deletes a backup policy belonging to a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupPoliciesClientDeleteOptions contains the optional parameters for the BackupPoliciesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/DeleteBackupPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"000pikumar",
		"PrivatePreviewVault",
		"OSSDBPolicy",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*BackupPoliciesClient) Get

func (client *BackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (BackupPoliciesClientGetResponse, error)

Get - Gets a backup policy belonging to a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/GetBackupPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"000pikumar",
		"PrivatePreviewVault",
		"OSSDBPolicy",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupPoliciesClient) NewListPager added in v0.4.0

func (client *BackupPoliciesClient) NewListPager(resourceGroupName string, vaultName string, options *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse]

NewListPager - Returns list of backup policies belonging to a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/ListBackupPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("000pikumar",
		"PrivatePreviewVault",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type BackupPoliciesClientCreateOrUpdateOptions added in v0.2.0

type BackupPoliciesClientCreateOrUpdateOptions struct {
}

BackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BackupPoliciesClient.CreateOrUpdate method.

type BackupPoliciesClientCreateOrUpdateResponse added in v0.2.0

type BackupPoliciesClientCreateOrUpdateResponse struct {
	BaseBackupPolicyResource
}

BackupPoliciesClientCreateOrUpdateResponse contains the response from method BackupPoliciesClient.CreateOrUpdate.

type BackupPoliciesClientDeleteOptions added in v0.2.0

type BackupPoliciesClientDeleteOptions struct {
}

BackupPoliciesClientDeleteOptions contains the optional parameters for the BackupPoliciesClient.Delete method.

type BackupPoliciesClientDeleteResponse added in v0.2.0

type BackupPoliciesClientDeleteResponse struct {
}

BackupPoliciesClientDeleteResponse contains the response from method BackupPoliciesClient.Delete.

type BackupPoliciesClientGetOptions added in v0.2.0

type BackupPoliciesClientGetOptions struct {
}

BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method.

type BackupPoliciesClientGetResponse added in v0.2.0

type BackupPoliciesClientGetResponse struct {
	BaseBackupPolicyResource
}

BackupPoliciesClientGetResponse contains the response from method BackupPoliciesClient.Get.

type BackupPoliciesClientListOptions added in v0.2.0

type BackupPoliciesClientListOptions struct {
}

BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method.

type BackupPoliciesClientListResponse added in v0.2.0

type BackupPoliciesClientListResponse struct {
	BaseBackupPolicyResourceList
}

BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.List.

type BackupPolicy

type BackupPolicy struct {
	// REQUIRED; Type of datasource for the backup management
	DatasourceTypes []*string `json:"datasourceTypes,omitempty"`

	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc
	PolicyRules []BasePolicyRuleClassification `json:"policyRules,omitempty"`
}

BackupPolicy - Rule based backup policy

func (*BackupPolicy) GetBaseBackupPolicy added in v0.2.0

func (b *BackupPolicy) GetBaseBackupPolicy() *BaseBackupPolicy

GetBaseBackupPolicy implements the BaseBackupPolicyClassification interface for type BackupPolicy.

func (BackupPolicy) MarshalJSON

func (b BackupPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupPolicy.

func (*BackupPolicy) UnmarshalJSON

func (b *BackupPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicy.

type BackupSchedule

type BackupSchedule struct {
	// REQUIRED; ISO 8601 repeating time interval format
	RepeatingTimeIntervals []*string `json:"repeatingTimeIntervals,omitempty"`

	// Time zone for a schedule. Example: Pacific Standard Time
	TimeZone *string `json:"timeZone,omitempty"`
}

BackupSchedule - Schedule for backup

func (BackupSchedule) MarshalJSON

func (b BackupSchedule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupSchedule.

type BackupVault

type BackupVault struct {
	// REQUIRED; Storage Settings
	StorageSettings []*StorageSetting `json:"storageSettings,omitempty"`

	// Monitoring Settings
	MonitoringSettings *MonitoringSettings `json:"monitoringSettings,omitempty"`

	// READ-ONLY; Provisioning state of the BackupVault resource
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Resource move details for backup vault
	ResourceMoveDetails *ResourceMoveDetails `json:"resourceMoveDetails,omitempty" azure:"ro"`

	// READ-ONLY; Resource move state for backup vault
	ResourceMoveState *ResourceMoveState `json:"resourceMoveState,omitempty" azure:"ro"`
}

BackupVault - Backup Vault

func (BackupVault) MarshalJSON

func (b BackupVault) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupVault.

type BackupVaultOperationResultsClient

type BackupVaultOperationResultsClient struct {
	// contains filtered or unexported fields
}

BackupVaultOperationResultsClient contains the methods for the BackupVaultOperationResults group. Don't use this type directly, use NewBackupVaultOperationResultsClient() instead.

func NewBackupVaultOperationResultsClient

func NewBackupVaultOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupVaultOperationResultsClient, error)

NewBackupVaultOperationResultsClient creates a new instance of BackupVaultOperationResultsClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*BackupVaultOperationResultsClient) Get

Get - If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupVaultOperationResultsClientGetOptions contains the optional parameters for the BackupVaultOperationResultsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetOperationResultPatch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultOperationResultsClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type BackupVaultOperationResultsClientGetOptions added in v0.2.0

type BackupVaultOperationResultsClientGetOptions struct {
}

BackupVaultOperationResultsClientGetOptions contains the optional parameters for the BackupVaultOperationResultsClient.Get method.

type BackupVaultOperationResultsClientGetResponse added in v0.2.0

type BackupVaultOperationResultsClientGetResponse struct {
	BackupVaultResource
	// AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response.
	AzureAsyncOperation *string

	// Location contains the information returned from the Location header response.
	Location *string

	// RetryAfter contains the information returned from the Retry-After header response.
	RetryAfter *int32
}

BackupVaultOperationResultsClientGetResponse contains the response from method BackupVaultOperationResultsClient.Get.

type BackupVaultResource

type BackupVaultResource struct {
	// REQUIRED; BackupVaultResource properties
	Properties *BackupVault `json:"properties,omitempty"`

	// Optional ETag.
	ETag *string `json:"eTag,omitempty"`

	// Input Managed Identity Details
	Identity *DppIdentityDetails `json:"identity,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

BackupVaultResource - Backup Vault Resource

func (BackupVaultResource) MarshalJSON

func (b BackupVaultResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupVaultResource.

type BackupVaultResourceList

type BackupVaultResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`

	// List of resources.
	Value []*BackupVaultResource `json:"value,omitempty"`
}

BackupVaultResourceList - List of BackupVault resources

type BackupVaultsClient

type BackupVaultsClient struct {
	// contains filtered or unexported fields
}

BackupVaultsClient contains the methods for the BackupVaults group. Don't use this type directly, use NewBackupVaultsClient() instead.

func NewBackupVaultsClient

func NewBackupVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupVaultsClient, error)

NewBackupVaultsClient creates a new instance of BackupVaultsClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*BackupVaultsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a BackupVault resource belonging to a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. parameters - Request body for operation options - BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/PutBackupVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		armdataprotection.BackupVaultResource{
			Identity: &armdataprotection.DppIdentityDetails{
				Type: to.Ptr("None"),
			},
			Location: to.Ptr("WestUS"),
			Tags: map[string]*string{
				"key1": to.Ptr("val1"),
			},
			Properties: &armdataprotection.BackupVault{
				MonitoringSettings: &armdataprotection.MonitoringSettings{
					AzureMonitorAlertSettings: &armdataprotection.AzureMonitorAlertSettings{
						AlertsForAllJobFailures: to.Ptr(armdataprotection.AlertsStateEnabled),
					},
				},
				StorageSettings: []*armdataprotection.StorageSetting{
					{
						Type:          to.Ptr(armdataprotection.StorageSettingTypesLocallyRedundant),
						DatastoreType: to.Ptr(armdataprotection.StorageSettingStoreTypesVaultStore),
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupVaultsClient) BeginUpdate

BeginUpdate - Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. parameters - Request body for operation options - BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/PatchBackupVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		armdataprotection.PatchResourceRequestInput{
			Properties: &armdataprotection.PatchBackupVaultInput{
				MonitoringSettings: &armdataprotection.MonitoringSettings{
					AzureMonitorAlertSettings: &armdataprotection.AzureMonitorAlertSettings{
						AlertsForAllJobFailures: to.Ptr(armdataprotection.AlertsStateEnabled),
					},
				},
			},
			Tags: map[string]*string{
				"newKey": to.Ptr("newVal"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupVaultsClient) CheckNameAvailability

CheckNameAvailability - API to check for resource name availability If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. location - The location in which uniqueness will be verified. parameters - Check name availability request options - BackupVaultsClientCheckNameAvailabilityOptions contains the optional parameters for the BackupVaultsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CheckNameAvailability(ctx,
		"SampleResourceGroup",
		"westus",
		armdataprotection.CheckNameAvailabilityRequest{
			Name: to.Ptr("swaggerExample"),
			Type: to.Ptr("Microsoft.DataProtection/BackupVaults"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupVaultsClient) Delete

func (client *BackupVaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientDeleteOptions) (BackupVaultsClientDeleteResponse, error)

Delete - Deletes a BackupVault resource from the resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupVaultsClientDeleteOptions contains the optional parameters for the BackupVaultsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/DeleteBackupVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*BackupVaultsClient) Get

func (client *BackupVaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientGetOptions) (BackupVaultsClientGetResponse, error)

Get - Returns a resource belonging to a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetBackupVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BackupVaultsClient) NewGetInResourceGroupPager added in v0.4.0

NewGetInResourceGroupPager - Returns resource collection belonging to a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - BackupVaultsClientGetInResourceGroupOptions contains the optional parameters for the BackupVaultsClient.GetInResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetInResourceGroupPager("SampleResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*BackupVaultsClient) NewGetInSubscriptionPager added in v0.4.0

NewGetInSubscriptionPager - Returns resource collection belonging to a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - BackupVaultsClientGetInSubscriptionOptions contains the optional parameters for the BackupVaultsClient.GetInSubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetInSubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type BackupVaultsClientBeginCreateOrUpdateOptions added in v0.2.0

type BackupVaultsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate method.

type BackupVaultsClientBeginUpdateOptions added in v0.2.0

type BackupVaultsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate method.

type BackupVaultsClientCheckNameAvailabilityOptions added in v0.2.0

type BackupVaultsClientCheckNameAvailabilityOptions struct {
}

BackupVaultsClientCheckNameAvailabilityOptions contains the optional parameters for the BackupVaultsClient.CheckNameAvailability method.

type BackupVaultsClientCheckNameAvailabilityResponse added in v0.2.0

type BackupVaultsClientCheckNameAvailabilityResponse struct {
	CheckNameAvailabilityResult
}

BackupVaultsClientCheckNameAvailabilityResponse contains the response from method BackupVaultsClient.CheckNameAvailability.

type BackupVaultsClientCreateOrUpdateResponse added in v0.2.0

type BackupVaultsClientCreateOrUpdateResponse struct {
	BackupVaultResource
}

BackupVaultsClientCreateOrUpdateResponse contains the response from method BackupVaultsClient.CreateOrUpdate.

type BackupVaultsClientDeleteOptions added in v0.2.0

type BackupVaultsClientDeleteOptions struct {
}

BackupVaultsClientDeleteOptions contains the optional parameters for the BackupVaultsClient.Delete method.

type BackupVaultsClientDeleteResponse added in v0.2.0

type BackupVaultsClientDeleteResponse struct {
}

BackupVaultsClientDeleteResponse contains the response from method BackupVaultsClient.Delete.

type BackupVaultsClientGetInResourceGroupOptions added in v0.2.0

type BackupVaultsClientGetInResourceGroupOptions struct {
}

BackupVaultsClientGetInResourceGroupOptions contains the optional parameters for the BackupVaultsClient.GetInResourceGroup method.

type BackupVaultsClientGetInResourceGroupResponse added in v0.2.0

type BackupVaultsClientGetInResourceGroupResponse struct {
	BackupVaultResourceList
}

BackupVaultsClientGetInResourceGroupResponse contains the response from method BackupVaultsClient.GetInResourceGroup.

type BackupVaultsClientGetInSubscriptionOptions added in v0.2.0

type BackupVaultsClientGetInSubscriptionOptions struct {
}

BackupVaultsClientGetInSubscriptionOptions contains the optional parameters for the BackupVaultsClient.GetInSubscription method.

type BackupVaultsClientGetInSubscriptionResponse added in v0.2.0

type BackupVaultsClientGetInSubscriptionResponse struct {
	BackupVaultResourceList
}

BackupVaultsClientGetInSubscriptionResponse contains the response from method BackupVaultsClient.GetInSubscription.

type BackupVaultsClientGetOptions added in v0.2.0

type BackupVaultsClientGetOptions struct {
}

BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method.

type BackupVaultsClientGetResponse added in v0.2.0

type BackupVaultsClientGetResponse struct {
	BackupVaultResource
}

BackupVaultsClientGetResponse contains the response from method BackupVaultsClient.Get.

type BackupVaultsClientUpdateResponse added in v0.2.0

type BackupVaultsClientUpdateResponse struct {
	BackupVaultResource
}

BackupVaultsClientUpdateResponse contains the response from method BackupVaultsClient.Update.

type BaseBackupPolicy

type BaseBackupPolicy struct {
	// REQUIRED; Type of datasource for the backup management
	DatasourceTypes []*string `json:"datasourceTypes,omitempty"`

	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`
}

BaseBackupPolicy - BackupPolicy base

func (*BaseBackupPolicy) GetBaseBackupPolicy

func (b *BaseBackupPolicy) GetBaseBackupPolicy() *BaseBackupPolicy

GetBaseBackupPolicy implements the BaseBackupPolicyClassification interface for type BaseBackupPolicy.

func (BaseBackupPolicy) MarshalJSON added in v0.2.0

func (b BaseBackupPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BaseBackupPolicy.

type BaseBackupPolicyClassification

type BaseBackupPolicyClassification interface {
	// GetBaseBackupPolicy returns the BaseBackupPolicy content of the underlying type.
	GetBaseBackupPolicy() *BaseBackupPolicy
}

BaseBackupPolicyClassification provides polymorphic access to related types. Call the interface's GetBaseBackupPolicy() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *BackupPolicy, *BaseBackupPolicy

type BaseBackupPolicyResource

type BaseBackupPolicyResource struct {
	// BaseBackupPolicyResource properties
	Properties BaseBackupPolicyClassification `json:"properties,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

BaseBackupPolicyResource - BaseBackupPolicy resource

func (BaseBackupPolicyResource) MarshalJSON

func (b BaseBackupPolicyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BaseBackupPolicyResource.

func (*BaseBackupPolicyResource) UnmarshalJSON

func (b *BaseBackupPolicyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BaseBackupPolicyResource.

type BaseBackupPolicyResourceList

type BaseBackupPolicyResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`

	// List of resources.
	Value []*BaseBackupPolicyResource `json:"value,omitempty"`
}

BaseBackupPolicyResourceList - List of BaseBackupPolicy resources

type BasePolicyRule

type BasePolicyRule struct {
	// REQUIRED
	Name *string `json:"name,omitempty"`

	// REQUIRED
	ObjectType *string `json:"objectType,omitempty"`
}

BasePolicyRule - BasePolicy Rule

func (*BasePolicyRule) GetBasePolicyRule

func (b *BasePolicyRule) GetBasePolicyRule() *BasePolicyRule

GetBasePolicyRule implements the BasePolicyRuleClassification interface for type BasePolicyRule.

type BasePolicyRuleClassification

type BasePolicyRuleClassification interface {
	// GetBasePolicyRule returns the BasePolicyRule content of the underlying type.
	GetBasePolicyRule() *BasePolicyRule
}

BasePolicyRuleClassification provides polymorphic access to related types. Call the interface's GetBasePolicyRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureBackupRule, *AzureRetentionRule, *BasePolicyRule

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	// Resource name for which availability needs to be checked
	Name *string `json:"name,omitempty"`

	// Describes the Resource type: Microsoft.DataProtection/BackupVaults
	Type *string `json:"type,omitempty"`
}

CheckNameAvailabilityRequest - CheckNameAvailability Request

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// Gets or sets the message.
	Message *string `json:"message,omitempty"`

	// Gets or sets a value indicating whether [name available].
	NameAvailable *bool `json:"nameAvailable,omitempty"`

	// Gets or sets the reason.
	Reason *string `json:"reason,omitempty"`
}

CheckNameAvailabilityResult - CheckNameAvailability Result

type Client added in v0.2.0

type Client struct {
	// contains filtered or unexported fields
}

Client contains the methods for the DataProtection group. Don't use this type directly, use NewClient() instead.

func NewClient added in v0.2.0

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*Client) CheckFeatureSupport added in v0.2.0

CheckFeatureSupport - Validates if a feature is supported If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 parameters - Feature support request object options - ClientCheckFeatureSupportOptions contains the optional parameters for the Client.CheckFeatureSupport method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/CheckfeatureSupport.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CheckFeatureSupport(ctx,
		"WestUS",
		&armdataprotection.FeatureValidationRequest{
			ObjectType:  to.Ptr("FeatureValidationRequest"),
			FeatureType: to.Ptr(armdataprotection.FeatureTypeDataSourceType),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ClientCheckFeatureSupportOptions added in v0.2.0

type ClientCheckFeatureSupportOptions struct {
}

ClientCheckFeatureSupportOptions contains the optional parameters for the Client.CheckFeatureSupport method.

type ClientCheckFeatureSupportResponse added in v0.2.0

type ClientCheckFeatureSupportResponse struct {
	FeatureValidationResponseBaseClassification
}

ClientCheckFeatureSupportResponse contains the response from method Client.CheckFeatureSupport.

func (*ClientCheckFeatureSupportResponse) UnmarshalJSON added in v0.3.0

func (c *ClientCheckFeatureSupportResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClientCheckFeatureSupportResponse.

type ClientDiscoveryDisplay

type ClientDiscoveryDisplay struct {
	// Description of the operation having details of what operation is about.
	Description *string `json:"description,omitempty"`

	// Operations Name itself.
	Operation *string `json:"operation,omitempty"`

	// Name of the provider for display purposes
	Provider *string `json:"provider,omitempty"`

	// ResourceType for which this Operation can be performed.
	Resource *string `json:"resource,omitempty"`
}

ClientDiscoveryDisplay - Localized display information of an operation.

type ClientDiscoveryForLogSpecification

type ClientDiscoveryForLogSpecification struct {
	// blob duration of shoebox log specification
	BlobDuration *string `json:"blobDuration,omitempty"`

	// Localized display name
	DisplayName *string `json:"displayName,omitempty"`

	// Name for shoebox log specification.
	Name *string `json:"name,omitempty"`
}

ClientDiscoveryForLogSpecification - Class to represent shoebox log specification in json client discovery.

type ClientDiscoveryForProperties

type ClientDiscoveryForProperties struct {
	// Operation properties.
	ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
}

ClientDiscoveryForProperties - Class to represent shoebox properties in json client discovery.

type ClientDiscoveryForServiceSpecification

type ClientDiscoveryForServiceSpecification struct {
	// List of log specifications of this operation.
	LogSpecifications []*ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
}

ClientDiscoveryForServiceSpecification - Class to represent shoebox service specification in json client discovery.

type ClientDiscoveryResponse

type ClientDiscoveryResponse struct {
	// Link to the next chunk of Response.
	NextLink *string `json:"nextLink,omitempty"`

	// List of available operations.
	Value []*ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
}

ClientDiscoveryResponse - Operations List response which contains list of available APIs.

type ClientDiscoveryValueForSingleAPI

type ClientDiscoveryValueForSingleAPI struct {
	// Contains the localized display information for this particular operation
	Display *ClientDiscoveryDisplay `json:"display,omitempty"`

	// Indicates whether the operation is a data action
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Name of the Operation.
	Name *string `json:"name,omitempty"`

	// The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX
	Origin *string `json:"origin,omitempty"`

	// Properties for the given operation.
	Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
}

ClientDiscoveryValueForSingleAPI - Available operation details.

type CloudError

type CloudError struct {
	// The resource management error response.
	Error *Error `json:"error,omitempty"`
}

CloudError - An error response from Azure Backup.

type CopyOnExpiryOption

type CopyOnExpiryOption struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

CopyOnExpiryOption - Copy on Expiry Option

func (*CopyOnExpiryOption) GetCopyOption added in v0.2.0

func (c *CopyOnExpiryOption) GetCopyOption() *CopyOption

GetCopyOption implements the CopyOptionClassification interface for type CopyOnExpiryOption.

func (CopyOnExpiryOption) MarshalJSON

func (c CopyOnExpiryOption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CopyOnExpiryOption.

func (*CopyOnExpiryOption) UnmarshalJSON added in v0.2.0

func (c *CopyOnExpiryOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CopyOnExpiryOption.

type CopyOption

type CopyOption struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

CopyOption - Options to copy

func (*CopyOption) GetCopyOption

func (c *CopyOption) GetCopyOption() *CopyOption

GetCopyOption implements the CopyOptionClassification interface for type CopyOption.

type CopyOptionClassification

type CopyOptionClassification interface {
	// GetCopyOption returns the CopyOption content of the underlying type.
	GetCopyOption() *CopyOption
}

CopyOptionClassification provides polymorphic access to related types. Call the interface's GetCopyOption() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *CopyOnExpiryOption, *CopyOption, *CustomCopyOption, *ImmediateCopyOption

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CurrentProtectionState

type CurrentProtectionState string

CurrentProtectionState - Specifies the current protection state of the resource

const (
	CurrentProtectionStateBackupSchedulesSuspended    CurrentProtectionState = "BackupSchedulesSuspended"
	CurrentProtectionStateConfiguringProtection       CurrentProtectionState = "ConfiguringProtection"
	CurrentProtectionStateConfiguringProtectionFailed CurrentProtectionState = "ConfiguringProtectionFailed"
	CurrentProtectionStateInvalid                     CurrentProtectionState = "Invalid"
	CurrentProtectionStateNotProtected                CurrentProtectionState = "NotProtected"
	CurrentProtectionStateProtectionConfigured        CurrentProtectionState = "ProtectionConfigured"
	CurrentProtectionStateProtectionError             CurrentProtectionState = "ProtectionError"
	CurrentProtectionStateProtectionStopped           CurrentProtectionState = "ProtectionStopped"
	CurrentProtectionStateRetentionSchedulesSuspended CurrentProtectionState = "RetentionSchedulesSuspended"
	CurrentProtectionStateSoftDeleted                 CurrentProtectionState = "SoftDeleted"
	CurrentProtectionStateSoftDeleting                CurrentProtectionState = "SoftDeleting"
	CurrentProtectionStateUpdatingProtection          CurrentProtectionState = "UpdatingProtection"
)

func PossibleCurrentProtectionStateValues

func PossibleCurrentProtectionStateValues() []CurrentProtectionState

PossibleCurrentProtectionStateValues returns the possible values for the CurrentProtectionState const type.

type CustomCopyOption

type CustomCopyOption struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// Data copied after given timespan
	Duration *string `json:"duration,omitempty"`
}

CustomCopyOption - Duration based custom options to copy

func (*CustomCopyOption) GetCopyOption added in v0.2.0

func (c *CustomCopyOption) GetCopyOption() *CopyOption

GetCopyOption implements the CopyOptionClassification interface for type CustomCopyOption.

func (CustomCopyOption) MarshalJSON

func (c CustomCopyOption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomCopyOption.

func (*CustomCopyOption) UnmarshalJSON

func (c *CustomCopyOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomCopyOption.

type DataStoreInfoBase

type DataStoreInfoBase struct {
	// REQUIRED; type of datastore; Operational/Vault/Archive
	DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"`

	// REQUIRED; Type of Datasource object, used to initialize the right inherited type
	ObjectType *string `json:"objectType,omitempty"`
}

DataStoreInfoBase - DataStoreInfo base

type DataStoreParameters

type DataStoreParameters struct {
	// REQUIRED; type of datastore; Operational/Vault/Archive
	DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"`

	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

DataStoreParameters - Parameters for DataStore

func (*DataStoreParameters) GetDataStoreParameters

func (d *DataStoreParameters) GetDataStoreParameters() *DataStoreParameters

GetDataStoreParameters implements the DataStoreParametersClassification interface for type DataStoreParameters.

type DataStoreParametersClassification

type DataStoreParametersClassification interface {
	// GetDataStoreParameters returns the DataStoreParameters content of the underlying type.
	GetDataStoreParameters() *DataStoreParameters
}

DataStoreParametersClassification provides polymorphic access to related types. Call the interface's GetDataStoreParameters() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureOperationalStoreParameters, *DataStoreParameters

type DataStoreTypes

type DataStoreTypes string

DataStoreTypes - type of datastore; Operational/Vault/Archive

const (
	DataStoreTypesArchiveStore     DataStoreTypes = "ArchiveStore"
	DataStoreTypesOperationalStore DataStoreTypes = "OperationalStore"
	DataStoreTypesVaultStore       DataStoreTypes = "VaultStore"
)

func PossibleDataStoreTypesValues

func PossibleDataStoreTypesValues() []DataStoreTypes

PossibleDataStoreTypesValues returns the possible values for the DataStoreTypes const type.

type Datasource

type Datasource struct {
	// REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID
	// created by backup service via Fabric/Vault.
	ResourceID *string `json:"resourceID,omitempty"`

	// DatasourceType of the resource.
	DatasourceType *string `json:"datasourceType,omitempty"`

	// Type of Datasource object, used to initialize the right inherited type
	ObjectType *string `json:"objectType,omitempty"`

	// Location of datasource.
	ResourceLocation *string `json:"resourceLocation,omitempty"`

	// Unique identifier of the resource in the context of parent.
	ResourceName *string `json:"resourceName,omitempty"`

	// Resource Type of Datasource.
	ResourceType *string `json:"resourceType,omitempty"`

	// Uri of the resource.
	ResourceURI *string `json:"resourceUri,omitempty"`
}

Datasource to be backed up

type DatasourceSet

type DatasourceSet struct {
	// REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID
	// created by backup service via Fabric/Vault.
	ResourceID *string `json:"resourceID,omitempty"`

	// DatasourceType of the resource.
	DatasourceType *string `json:"datasourceType,omitempty"`

	// Type of Datasource object, used to initialize the right inherited type
	ObjectType *string `json:"objectType,omitempty"`

	// Location of datasource.
	ResourceLocation *string `json:"resourceLocation,omitempty"`

	// Unique identifier of the resource in the context of parent.
	ResourceName *string `json:"resourceName,omitempty"`

	// Resource Type of Datasource.
	ResourceType *string `json:"resourceType,omitempty"`

	// Uri of the resource.
	ResourceURI *string `json:"resourceUri,omitempty"`
}

DatasourceSet details of datasource to be backed up

type Day

type Day struct {
	// Date of the month
	Date *int32 `json:"date,omitempty"`

	// Whether Date is last date of month
	IsLast *bool `json:"isLast,omitempty"`
}

Day of the week

type DayOfWeek

type DayOfWeek string
const (
	DayOfWeekFriday    DayOfWeek = "Friday"
	DayOfWeekMonday    DayOfWeek = "Monday"
	DayOfWeekSaturday  DayOfWeek = "Saturday"
	DayOfWeekSunday    DayOfWeek = "Sunday"
	DayOfWeekThursday  DayOfWeek = "Thursday"
	DayOfWeekTuesday   DayOfWeek = "Tuesday"
	DayOfWeekWednesday DayOfWeek = "Wednesday"
)

func PossibleDayOfWeekValues

func PossibleDayOfWeekValues() []DayOfWeek

PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type.

type DeleteOption

type DeleteOption struct {
	// REQUIRED; Duration of deletion after given timespan
	Duration *string `json:"duration,omitempty"`

	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

DeleteOption - Delete Option

func (*DeleteOption) GetDeleteOption

func (d *DeleteOption) GetDeleteOption() *DeleteOption

GetDeleteOption implements the DeleteOptionClassification interface for type DeleteOption.

type DeleteOptionClassification

type DeleteOptionClassification interface {
	// GetDeleteOption returns the DeleteOption content of the underlying type.
	GetDeleteOption() *DeleteOption
}

DeleteOptionClassification provides polymorphic access to related types. Call the interface's GetDeleteOption() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AbsoluteDeleteOption, *DeleteOption

type DppBaseResource

type DppBaseResource struct {
	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

DppBaseResource - Base resource under Microsoft.DataProtection provider namespace

type DppBaseResourceList

type DppBaseResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`

	// List of Dpp resources.
	Value []*DppBaseResource `json:"value,omitempty"`
}

DppBaseResourceList - Base for all lists of V2 resources.

type DppIdentityDetails

type DppIdentityDetails struct {
	// The identityType which can be either SystemAssigned or None
	Type *string `json:"type,omitempty"`

	// READ-ONLY; The object ID of the service principal object for the managed identity that is used to grant role-based access
	// to an Azure resource.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the resource is now a member.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

DppIdentityDetails - Identity details

type DppResource

type DppResource struct {
	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

DppResource - Resource class

type DppResourceList

type DppResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`
}

DppResourceList - ListResource

type DppTrackedResource

type DppTrackedResource struct {
	// Optional ETag.
	ETag *string `json:"eTag,omitempty"`

	// Input Managed Identity Details
	Identity *DppIdentityDetails `json:"identity,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (DppTrackedResource) MarshalJSON

func (d DppTrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DppTrackedResource.

type DppTrackedResourceList

type DppTrackedResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`
}

type DppWorkerRequest

type DppWorkerRequest struct {
	CultureInfo *string `json:"cultureInfo,omitempty"`
	HTTPMethod  *string `json:"httpMethod,omitempty"`

	// Dictionary of
	Headers map[string][]*string `json:"headers,omitempty"`

	// Dictionary of
	Parameters             map[string]*string `json:"parameters,omitempty"`
	SubscriptionID         *string            `json:"subscriptionId,omitempty"`
	SupportedGroupVersions []*string          `json:"supportedGroupVersions,omitempty"`
	URI                    *string            `json:"uri,omitempty"`
}

type Error

type Error struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`

	// READ-ONLY; The error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The error details.
	Details []*Error `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; The error message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The error target.
	Target *string `json:"target,omitempty" azure:"ro"`
}

Error - The resource management error response.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ErrorAdditionalInfo - The resource management error additional info.

type ExportJobsClient

type ExportJobsClient struct {
	// contains filtered or unexported fields
}

ExportJobsClient contains the methods for the ExportJobs group. Don't use this type directly, use NewExportJobsClient() instead.

func NewExportJobsClient

func NewExportJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsClient, error)

NewExportJobsClient creates a new instance of ExportJobsClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ExportJobsClient) BeginTrigger

func (client *ExportJobsClient) BeginTrigger(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*runtime.Poller[ExportJobsClientTriggerResponse], error)

BeginTrigger - Triggers export of jobs and returns an OperationID to track. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - ExportJobsClientBeginTriggerOptions contains the optional parameters for the ExportJobsClient.BeginTrigger method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/TriggerExportJobs.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewExportJobsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginTrigger(ctx,
		"SwaggerTestRg",
		"NetSDKTestRsVault",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

type ExportJobsClientBeginTriggerOptions added in v0.2.0

type ExportJobsClientBeginTriggerOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ExportJobsClientBeginTriggerOptions contains the optional parameters for the ExportJobsClient.BeginTrigger method.

type ExportJobsClientTriggerResponse added in v0.2.0

type ExportJobsClientTriggerResponse struct {
}

ExportJobsClientTriggerResponse contains the response from method ExportJobsClient.Trigger.

type ExportJobsOperationResultClient

type ExportJobsOperationResultClient struct {
	// contains filtered or unexported fields
}

ExportJobsOperationResultClient contains the methods for the ExportJobsOperationResult group. Don't use this type directly, use NewExportJobsOperationResultClient() instead.

func NewExportJobsOperationResultClient

func NewExportJobsOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsOperationResultClient, error)

NewExportJobsOperationResultClient creates a new instance of ExportJobsOperationResultClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ExportJobsOperationResultClient) Get

Get - Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. operationID - OperationID which represents the export job. options - ExportJobsOperationResultClientGetOptions contains the optional parameters for the ExportJobsOperationResultClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/GetExportJobsOperationResult.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewExportJobsOperationResultClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SwaggerTestRg",
		"NetSDKTestRsVault",
		"00000000-0000-0000-0000-000000000000",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ExportJobsOperationResultClientGetOptions added in v0.2.0

type ExportJobsOperationResultClientGetOptions struct {
}

ExportJobsOperationResultClientGetOptions contains the optional parameters for the ExportJobsOperationResultClient.Get method.

type ExportJobsOperationResultClientGetResponse added in v0.2.0

type ExportJobsOperationResultClientGetResponse struct {
	ExportJobsResult
}

ExportJobsOperationResultClientGetResponse contains the response from method ExportJobsOperationResultClient.Get.

type ExportJobsResult

type ExportJobsResult struct {
	// READ-ONLY; SAS key to access the blob.
	BlobSasKey *string `json:"blobSasKey,omitempty" azure:"ro"`

	// READ-ONLY; URL of the blob into which the serialized string of list of jobs is exported.
	BlobURL *string `json:"blobUrl,omitempty" azure:"ro"`

	// READ-ONLY; SAS key to access the ExcelFile blob.
	ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty" azure:"ro"`

	// READ-ONLY; URL of the blob into which the ExcelFile is uploaded.
	ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty" azure:"ro"`
}

ExportJobsResult - The result for export jobs containing blob details.

type FeatureSupportStatus

type FeatureSupportStatus string

FeatureSupportStatus - feature support status

const (
	FeatureSupportStatusAlphaPreview       FeatureSupportStatus = "AlphaPreview"
	FeatureSupportStatusGenerallyAvailable FeatureSupportStatus = "GenerallyAvailable"
	FeatureSupportStatusInvalid            FeatureSupportStatus = "Invalid"
	FeatureSupportStatusNotSupported       FeatureSupportStatus = "NotSupported"
	FeatureSupportStatusPrivatePreview     FeatureSupportStatus = "PrivatePreview"
	FeatureSupportStatusPublicPreview      FeatureSupportStatus = "PublicPreview"
)

func PossibleFeatureSupportStatusValues

func PossibleFeatureSupportStatusValues() []FeatureSupportStatus

PossibleFeatureSupportStatusValues returns the possible values for the FeatureSupportStatus const type.

type FeatureType

type FeatureType string

FeatureType - backup support feature type.

const (
	FeatureTypeDataSourceType FeatureType = "DataSourceType"
	FeatureTypeInvalid        FeatureType = "Invalid"
)

func PossibleFeatureTypeValues

func PossibleFeatureTypeValues() []FeatureType

PossibleFeatureTypeValues returns the possible values for the FeatureType const type.

type FeatureValidationRequest

type FeatureValidationRequest struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// backup support feature name.
	FeatureName *string `json:"featureName,omitempty"`

	// backup support feature type.
	FeatureType *FeatureType `json:"featureType,omitempty"`
}

FeatureValidationRequest - Base class for feature object

func (*FeatureValidationRequest) GetFeatureValidationRequestBase added in v0.2.0

func (f *FeatureValidationRequest) GetFeatureValidationRequestBase() *FeatureValidationRequestBase

GetFeatureValidationRequestBase implements the FeatureValidationRequestBaseClassification interface for type FeatureValidationRequest.

func (FeatureValidationRequest) MarshalJSON

func (f FeatureValidationRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FeatureValidationRequest.

func (*FeatureValidationRequest) UnmarshalJSON

func (f *FeatureValidationRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationRequest.

type FeatureValidationRequestBase

type FeatureValidationRequestBase struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

FeatureValidationRequestBase - Base class for Backup Feature support

func (*FeatureValidationRequestBase) GetFeatureValidationRequestBase

func (f *FeatureValidationRequestBase) GetFeatureValidationRequestBase() *FeatureValidationRequestBase

GetFeatureValidationRequestBase implements the FeatureValidationRequestBaseClassification interface for type FeatureValidationRequestBase.

type FeatureValidationRequestBaseClassification

type FeatureValidationRequestBaseClassification interface {
	// GetFeatureValidationRequestBase returns the FeatureValidationRequestBase content of the underlying type.
	GetFeatureValidationRequestBase() *FeatureValidationRequestBase
}

FeatureValidationRequestBaseClassification provides polymorphic access to related types. Call the interface's GetFeatureValidationRequestBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *FeatureValidationRequest, *FeatureValidationRequestBase

type FeatureValidationResponse

type FeatureValidationResponse struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// backup support feature type.
	FeatureType *FeatureType `json:"featureType,omitempty"`

	// Response features
	Features []*SupportedFeature `json:"features,omitempty"`
}

FeatureValidationResponse - Feature Validation Response

func (*FeatureValidationResponse) GetFeatureValidationResponseBase added in v0.2.0

func (f *FeatureValidationResponse) GetFeatureValidationResponseBase() *FeatureValidationResponseBase

GetFeatureValidationResponseBase implements the FeatureValidationResponseBaseClassification interface for type FeatureValidationResponse.

func (*FeatureValidationResponse) UnmarshalJSON

func (f *FeatureValidationResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationResponse.

type FeatureValidationResponseBase

type FeatureValidationResponseBase struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

FeatureValidationResponseBase - Base class for Backup Feature support

func (*FeatureValidationResponseBase) GetFeatureValidationResponseBase

func (f *FeatureValidationResponseBase) GetFeatureValidationResponseBase() *FeatureValidationResponseBase

GetFeatureValidationResponseBase implements the FeatureValidationResponseBaseClassification interface for type FeatureValidationResponseBase.

type FeatureValidationResponseBaseClassification

type FeatureValidationResponseBaseClassification interface {
	// GetFeatureValidationResponseBase returns the FeatureValidationResponseBase content of the underlying type.
	GetFeatureValidationResponseBase() *FeatureValidationResponseBase
}

FeatureValidationResponseBaseClassification provides polymorphic access to related types. Call the interface's GetFeatureValidationResponseBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *FeatureValidationResponse, *FeatureValidationResponseBase

type ImmediateCopyOption

type ImmediateCopyOption struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

ImmediateCopyOption - Immediate copy Option

func (*ImmediateCopyOption) GetCopyOption added in v0.2.0

func (i *ImmediateCopyOption) GetCopyOption() *CopyOption

GetCopyOption implements the CopyOptionClassification interface for type ImmediateCopyOption.

func (ImmediateCopyOption) MarshalJSON

func (i ImmediateCopyOption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImmediateCopyOption.

func (*ImmediateCopyOption) UnmarshalJSON added in v0.2.0

func (i *ImmediateCopyOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImmediateCopyOption.

type InnerError

type InnerError struct {
	// Any Key value pairs that can be provided to the client for additional verbose information.
	AdditionalInfo map[string]*string `json:"additionalInfo,omitempty"`

	// Unique code for this error
	Code *string `json:"code,omitempty"`

	// Child Inner Error, to allow Nesting.
	EmbeddedInnerError *InnerError `json:"embeddedInnerError,omitempty"`
}

InnerError - Inner Error

func (InnerError) MarshalJSON

func (i InnerError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InnerError.

type ItemLevelRestoreCriteria

type ItemLevelRestoreCriteria struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

ItemLevelRestoreCriteria - Class to contain criteria for item level restore

func (*ItemLevelRestoreCriteria) GetItemLevelRestoreCriteria

func (i *ItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria

GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type ItemLevelRestoreCriteria.

type ItemLevelRestoreCriteriaClassification

type ItemLevelRestoreCriteriaClassification interface {
	// GetItemLevelRestoreCriteria returns the ItemLevelRestoreCriteria content of the underlying type.
	GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria
}

ItemLevelRestoreCriteriaClassification provides polymorphic access to related types. Call the interface's GetItemLevelRestoreCriteria() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ItemLevelRestoreCriteria, *KubernetesPVRestoreCriteria, *KubernetesStorageClassRestoreCriteria, *RangeBasedItemLevelRestoreCriteria

type ItemLevelRestoreTargetInfo

type ItemLevelRestoreTargetInfo struct {
	// REQUIRED; Information of target DS
	DatasourceInfo *Datasource `json:"datasourceInfo,omitempty"`

	// REQUIRED; Type of Datasource object, used to initialize the right inherited type
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Recovery Option
	RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"`

	// REQUIRED; Restore Criteria
	RestoreCriteria []ItemLevelRestoreCriteriaClassification `json:"restoreCriteria,omitempty"`

	// Credentials to use to authenticate with data source provider.
	DatasourceAuthCredentials AuthCredentialsClassification `json:"datasourceAuthCredentials,omitempty"`

	// Information of target DS Set
	DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"`

	// Target Restore region
	RestoreLocation *string `json:"restoreLocation,omitempty"`
}

ItemLevelRestoreTargetInfo - Restore target info for Item level restore operation

func (*ItemLevelRestoreTargetInfo) GetRestoreTargetInfoBase added in v0.2.0

func (i *ItemLevelRestoreTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase

GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type ItemLevelRestoreTargetInfo.

func (ItemLevelRestoreTargetInfo) MarshalJSON

func (i ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ItemLevelRestoreTargetInfo.

func (*ItemLevelRestoreTargetInfo) UnmarshalJSON

func (i *ItemLevelRestoreTargetInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ItemLevelRestoreTargetInfo.

type JobExtendedInfo

type JobExtendedInfo struct {
	// Job's Additional Details
	AdditionalDetails map[string]*string `json:"additionalDetails,omitempty"`

	// READ-ONLY; State of the Backup Instance
	BackupInstanceState *string `json:"backupInstanceState,omitempty" azure:"ro"`

	// READ-ONLY; Number of bytes transferred
	DataTransferredInBytes *float64 `json:"dataTransferredInBytes,omitempty" azure:"ro"`

	// READ-ONLY; Destination where restore is done
	RecoveryDestination *string `json:"recoveryDestination,omitempty" azure:"ro"`

	// READ-ONLY; Details of the Source Recovery Point
	SourceRecoverPoint *RestoreJobRecoveryPointDetails `json:"sourceRecoverPoint,omitempty" azure:"ro"`

	// READ-ONLY; List of Sub Tasks of the job
	SubTasks []*JobSubTask `json:"subTasks,omitempty" azure:"ro"`

	// READ-ONLY; Details of the Target Recovery Point
	TargetRecoverPoint *RestoreJobRecoveryPointDetails `json:"targetRecoverPoint,omitempty" azure:"ro"`
}

JobExtendedInfo - Extended Information about the job

func (JobExtendedInfo) MarshalJSON

func (j JobExtendedInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobExtendedInfo.

type JobSubTask

type JobSubTask struct {
	// REQUIRED; Task Id of the Sub Task
	TaskID *int32 `json:"taskId,omitempty"`

	// REQUIRED; Name of the Sub Task
	TaskName *string `json:"taskName,omitempty"`

	// REQUIRED; Status of the Sub Task
	TaskStatus *string `json:"taskStatus,omitempty"`

	// Additional details of Sub Tasks
	AdditionalDetails map[string]*string `json:"additionalDetails,omitempty"`

	// READ-ONLY; Progress of the Sub Task
	TaskProgress *string `json:"taskProgress,omitempty" azure:"ro"`
}

JobSubTask - Details of Job's Sub Task

func (JobSubTask) MarshalJSON

func (j JobSubTask) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobSubTask.

type JobsClient

type JobsClient struct {
	// contains filtered or unexported fields
}

JobsClient contains the methods for the Jobs group. Don't use this type directly, use NewJobsClient() instead.

func NewJobsClient

func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error)

NewJobsClient creates a new instance of JobsClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*JobsClient) Get

func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, jobID string, options *JobsClientGetOptions) (JobsClientGetResponse, error)

Get - Gets a job with id in a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. jobID - The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/GetJob.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewJobsClient("62b829ee-7936-40c9-a1c9-47a93f9f3965", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"BugBash1",
		"BugBashVaultForCCYv11",
		"3c60cb49-63e8-4b21-b9bd-26277b3fdfae",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*JobsClient) NewListPager added in v0.4.0

func (client *JobsClient) NewListPager(resourceGroupName string, vaultName string, options *JobsClientListOptions) *runtime.Pager[JobsClientListResponse]

NewListPager - Returns list of jobs belonging to a backup vault If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - JobsClientListOptions contains the optional parameters for the JobsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/ListJobs.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewJobsClient("62b829ee-7936-40c9-a1c9-47a93f9f3965", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("BugBash1",
		"BugBashVaultForCCYv11",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type JobsClientGetOptions added in v0.2.0

type JobsClientGetOptions struct {
}

JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.

type JobsClientGetResponse added in v0.2.0

type JobsClientGetResponse struct {
	AzureBackupJobResource
}

JobsClientGetResponse contains the response from method JobsClient.Get.

type JobsClientListOptions added in v0.2.0

type JobsClientListOptions struct {
}

JobsClientListOptions contains the optional parameters for the JobsClient.List method.

type JobsClientListResponse added in v0.2.0

type JobsClientListResponse struct {
	AzureBackupJobResourceList
}

JobsClientListResponse contains the response from method JobsClient.List.

type KubernetesPVRestoreCriteria added in v1.0.0

type KubernetesPVRestoreCriteria struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// Selected persistent volume claim name
	Name *string `json:"name,omitempty"`

	// Selected storage class name for restore operation
	StorageClassName *string `json:"storageClassName,omitempty"`
}

KubernetesPVRestoreCriteria - Item Level kubernetes persistent volume target info for restore operation

func (*KubernetesPVRestoreCriteria) GetItemLevelRestoreCriteria added in v1.0.0

func (k *KubernetesPVRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria

GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesPVRestoreCriteria.

func (KubernetesPVRestoreCriteria) MarshalJSON added in v1.0.0

func (k KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KubernetesPVRestoreCriteria.

func (*KubernetesPVRestoreCriteria) UnmarshalJSON added in v1.0.0

func (k *KubernetesPVRestoreCriteria) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPVRestoreCriteria.

type KubernetesStorageClassRestoreCriteria added in v1.0.0

type KubernetesStorageClassRestoreCriteria struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// Provisioner of the storage class
	Provisioner *string `json:"provisioner,omitempty"`

	// Selected storage class name
	SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"`
}

KubernetesStorageClassRestoreCriteria - Item Level kubernetes storage class target info for restore operation

func (*KubernetesStorageClassRestoreCriteria) GetItemLevelRestoreCriteria added in v1.0.0

func (k *KubernetesStorageClassRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria

GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesStorageClassRestoreCriteria.

func (KubernetesStorageClassRestoreCriteria) MarshalJSON added in v1.0.0

func (k KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KubernetesStorageClassRestoreCriteria.

func (*KubernetesStorageClassRestoreCriteria) UnmarshalJSON added in v1.0.0

func (k *KubernetesStorageClassRestoreCriteria) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesStorageClassRestoreCriteria.

type MonitoringSettings added in v0.3.0

type MonitoringSettings struct {
	// Settings for Azure Monitor based alerts
	AzureMonitorAlertSettings *AzureMonitorAlertSettings `json:"azureMonitorAlertSettings,omitempty"`
}

MonitoringSettings - Monitoring Settings

type Month

type Month string
const (
	MonthApril     Month = "April"
	MonthAugust    Month = "August"
	MonthDecember  Month = "December"
	MonthFebruary  Month = "February"
	MonthJanuary   Month = "January"
	MonthJuly      Month = "July"
	MonthJune      Month = "June"
	MonthMarch     Month = "March"
	MonthMay       Month = "May"
	MonthNovember  Month = "November"
	MonthOctober   Month = "October"
	MonthSeptember Month = "September"
)

func PossibleMonthValues

func PossibleMonthValues() []Month

PossibleMonthValues returns the possible values for the Month const type.

type OperationExtendedInfo

type OperationExtendedInfo struct {
	// REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
	ObjectType *string `json:"objectType,omitempty"`
}

OperationExtendedInfo - Operation Extended Info

func (*OperationExtendedInfo) GetOperationExtendedInfo

func (o *OperationExtendedInfo) GetOperationExtendedInfo() *OperationExtendedInfo

GetOperationExtendedInfo implements the OperationExtendedInfoClassification interface for type OperationExtendedInfo.

type OperationExtendedInfoClassification

type OperationExtendedInfoClassification interface {
	// GetOperationExtendedInfo returns the OperationExtendedInfo content of the underlying type.
	GetOperationExtendedInfo() *OperationExtendedInfo
}

OperationExtendedInfoClassification provides polymorphic access to related types. Call the interface's GetOperationExtendedInfo() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *OperationExtendedInfo, *OperationJobExtendedInfo

type OperationJobExtendedInfo

type OperationJobExtendedInfo struct {
	// REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
	ObjectType *string `json:"objectType,omitempty"`

	// Arm Id of the job created for this operation.
	JobID *string `json:"jobId,omitempty"`
}

OperationJobExtendedInfo - Operation Job Extended Info

func (*OperationJobExtendedInfo) GetOperationExtendedInfo added in v0.2.0

func (o *OperationJobExtendedInfo) GetOperationExtendedInfo() *OperationExtendedInfo

GetOperationExtendedInfo implements the OperationExtendedInfoClassification interface for type OperationJobExtendedInfo.

func (*OperationJobExtendedInfo) UnmarshalJSON

func (o *OperationJobExtendedInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationJobExtendedInfo.

type OperationResource

type OperationResource struct {
	// End time of the operation
	EndTime *time.Time `json:"endTime,omitempty"`

	// Required if status == failed or status == canceled. This is the OData v4 error format, used by the RPC and will go into
	// the v2.2 Azure REST API guidelines. The full set of optional properties (e.g.
	// inner errors / details) can be found in the "Error Response" section.
	Error *Error `json:"error,omitempty"`

	// It should match what is used to GET the operation result
	ID *string `json:"id,omitempty"`

	// It must match the last segment of the "id" field, and will typically be a GUID / system generated value
	Name *string `json:"name,omitempty"`

	// End time of the operation
	Properties OperationExtendedInfoClassification `json:"properties,omitempty"`

	// Start time of the operation
	StartTime *time.Time `json:"startTime,omitempty"`
	Status    *string    `json:"status,omitempty"`
}

OperationResource - Operation Resource

func (*OperationResource) UnmarshalJSON

func (o *OperationResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResource.

type OperationResultClient

type OperationResultClient struct {
	// contains filtered or unexported fields
}

OperationResultClient contains the methods for the OperationResult group. Don't use this type directly, use NewOperationResultClient() instead.

func NewOperationResultClient

func NewOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultClient, error)

NewOperationResultClient creates a new instance of OperationResultClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationResultClient) Get

Get - Gets the operation result for a resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - OperationResultClientGetOptions contains the optional parameters for the OperationResultClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationResult.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewOperationResultClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==",
		"WestUS",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationResultClientGetOptions added in v0.2.0

type OperationResultClientGetOptions struct {
}

OperationResultClientGetOptions contains the optional parameters for the OperationResultClient.Get method.

type OperationResultClientGetResponse added in v0.2.0

type OperationResultClientGetResponse struct {
	OperationJobExtendedInfo
	// AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response.
	AzureAsyncOperation *string

	// Location contains the information returned from the Location header response.
	Location *string

	// RetryAfter contains the information returned from the Retry-After header response.
	RetryAfter *int32
}

OperationResultClientGetResponse contains the response from method OperationResultClient.Get.

type OperationStatusBackupVaultContextClient added in v0.3.0

type OperationStatusBackupVaultContextClient struct {
	// contains filtered or unexported fields
}

OperationStatusBackupVaultContextClient contains the methods for the OperationStatusBackupVaultContext group. Don't use this type directly, use NewOperationStatusBackupVaultContextClient() instead.

func NewOperationStatusBackupVaultContextClient added in v0.3.0

func NewOperationStatusBackupVaultContextClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusBackupVaultContextClient, error)

NewOperationStatusBackupVaultContextClient creates a new instance of OperationStatusBackupVaultContextClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationStatusBackupVaultContextClient) Get added in v0.3.0

Get - Gets the operation status for an operation over a BackupVault's context. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. options - OperationStatusBackupVaultContextClientGetOptions contains the optional parameters for the OperationStatusBackupVaultContextClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationStatusVaultContext.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewOperationStatusBackupVaultContextClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationStatusBackupVaultContextClientGetOptions added in v0.3.0

type OperationStatusBackupVaultContextClientGetOptions struct {
}

OperationStatusBackupVaultContextClientGetOptions contains the optional parameters for the OperationStatusBackupVaultContextClient.Get method.

type OperationStatusBackupVaultContextClientGetResponse added in v0.3.0

type OperationStatusBackupVaultContextClientGetResponse struct {
	OperationResource
}

OperationStatusBackupVaultContextClientGetResponse contains the response from method OperationStatusBackupVaultContextClient.Get.

type OperationStatusClient

type OperationStatusClient struct {
	// contains filtered or unexported fields
}

OperationStatusClient contains the methods for the OperationStatus group. Don't use this type directly, use NewOperationStatusClient() instead.

func NewOperationStatusClient

func NewOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusClient, error)

NewOperationStatusClient creates a new instance of OperationStatusClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationStatusClient) Get

Get - Gets the operation status for a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationStatus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewOperationStatusClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"WestUS",
		"MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationStatusClientGetOptions added in v0.2.0

type OperationStatusClientGetOptions struct {
}

OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method.

type OperationStatusClientGetResponse added in v0.2.0

type OperationStatusClientGetResponse struct {
	OperationResource
}

OperationStatusClientGetResponse contains the response from method OperationStatusClient.Get.

type OperationStatusResourceGroupContextClient added in v0.3.0

type OperationStatusResourceGroupContextClient struct {
	// contains filtered or unexported fields
}

OperationStatusResourceGroupContextClient contains the methods for the OperationStatusResourceGroupContext group. Don't use this type directly, use NewOperationStatusResourceGroupContextClient() instead.

func NewOperationStatusResourceGroupContextClient added in v0.3.0

func NewOperationStatusResourceGroupContextClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusResourceGroupContextClient, error)

NewOperationStatusResourceGroupContextClient creates a new instance of OperationStatusResourceGroupContextClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationStatusResourceGroupContextClient) Get added in v0.3.0

Get - Gets the operation status for an operation over a ResourceGroup's context. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - OperationStatusResourceGroupContextClientGetOptions contains the optional parameters for the OperationStatusResourceGroupContextClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationStatusRGContext.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewOperationStatusResourceGroupContextClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SampleResourceGroup",
		"MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationStatusResourceGroupContextClientGetOptions added in v0.3.0

type OperationStatusResourceGroupContextClientGetOptions struct {
}

OperationStatusResourceGroupContextClientGetOptions contains the optional parameters for the OperationStatusResourceGroupContextClient.Get method.

type OperationStatusResourceGroupContextClientGetResponse added in v0.3.0

type OperationStatusResourceGroupContextClientGetResponse struct {
	OperationResource
}

OperationStatusResourceGroupContextClientGetResponse contains the response from method OperationStatusResourceGroupContextClient.Get.

type OperationsClient added in v0.2.0

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the DataProtectionOperations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient added in v0.2.0

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Returns the list of available operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/Operations/List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	ClientDiscoveryResponse
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type PatchBackupVaultInput added in v0.3.0

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

PatchBackupVaultInput - Backup Vault Contract for Patch Backup Vault API.

type PatchResourceRequestInput

type PatchResourceRequestInput struct {
	// Input Managed Identity Details
	Identity *DppIdentityDetails `json:"identity,omitempty"`

	// Resource properties.
	Properties *PatchBackupVaultInput `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`
}

PatchResourceRequestInput - Patch Request content for Microsoft.DataProtection resources

func (PatchResourceRequestInput) MarshalJSON

func (p PatchResourceRequestInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PatchResourceRequestInput.

type PolicyInfo

type PolicyInfo struct {
	// REQUIRED
	PolicyID *string `json:"policyId,omitempty"`

	// Policy parameters for the backup instance
	PolicyParameters *PolicyParameters `json:"policyParameters,omitempty"`

	// READ-ONLY
	PolicyVersion *string `json:"policyVersion,omitempty" azure:"ro"`
}

PolicyInfo - Policy Info in backupInstance

type PolicyParameters

type PolicyParameters struct {
	// Gets or sets the DataStore Parameters
	DataStoreParametersList []DataStoreParametersClassification `json:"dataStoreParametersList,omitempty"`
}

PolicyParameters - Parameters in Policy

func (PolicyParameters) MarshalJSON

func (p PolicyParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyParameters.

func (*PolicyParameters) UnmarshalJSON

func (p *PolicyParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyParameters.

type ProtectionStatusDetails

type ProtectionStatusDetails struct {
	// Specifies the protection status error of the resource
	ErrorDetails *UserFacingError `json:"errorDetails,omitempty"`

	// Specifies the protection status of the resource
	Status *Status `json:"status,omitempty"`
}

ProtectionStatusDetails - Protection status details

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the BackupVault resource

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

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type RangeBasedItemLevelRestoreCriteria

type RangeBasedItemLevelRestoreCriteria struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// maximum value for range prefix match
	MaxMatchingValue *string `json:"maxMatchingValue,omitempty"`

	// minimum value for range prefix match
	MinMatchingValue *string `json:"minMatchingValue,omitempty"`
}

RangeBasedItemLevelRestoreCriteria - Item Level target info for restore operation

func (*RangeBasedItemLevelRestoreCriteria) GetItemLevelRestoreCriteria added in v0.2.0

func (r *RangeBasedItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria

GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type RangeBasedItemLevelRestoreCriteria.

func (RangeBasedItemLevelRestoreCriteria) MarshalJSON

func (r RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RangeBasedItemLevelRestoreCriteria.

func (*RangeBasedItemLevelRestoreCriteria) UnmarshalJSON

func (r *RangeBasedItemLevelRestoreCriteria) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RangeBasedItemLevelRestoreCriteria.

type RecoveryOption

type RecoveryOption string

RecoveryOption - Recovery Option

const (
	RecoveryOptionFailIfExists RecoveryOption = "FailIfExists"
)

func PossibleRecoveryOptionValues

func PossibleRecoveryOptionValues() []RecoveryOption

PossibleRecoveryOptionValues returns the possible values for the RecoveryOption const type.

type RecoveryPointDataStoreDetails

type RecoveryPointDataStoreDetails struct {
	CreationTime *time.Time `json:"creationTime,omitempty"`
	ExpiryTime   *time.Time `json:"expiryTime,omitempty"`
	ID           *string    `json:"id,omitempty"`
	MetaData     *string    `json:"metaData,omitempty"`
	State        *string    `json:"state,omitempty"`
	Type         *string    `json:"type,omitempty"`
	Visible      *bool      `json:"visible,omitempty"`

	// READ-ONLY
	RehydrationExpiryTime *time.Time `json:"rehydrationExpiryTime,omitempty" azure:"ro"`

	// READ-ONLY
	RehydrationStatus *RehydrationStatus `json:"rehydrationStatus,omitempty" azure:"ro"`
}

RecoveryPointDataStoreDetails - RecoveryPoint datastore details

func (RecoveryPointDataStoreDetails) MarshalJSON

func (r RecoveryPointDataStoreDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RecoveryPointDataStoreDetails.

func (*RecoveryPointDataStoreDetails) UnmarshalJSON

func (r *RecoveryPointDataStoreDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointDataStoreDetails.

type RecoveryPointsClient

type RecoveryPointsClient struct {
	// contains filtered or unexported fields
}

RecoveryPointsClient contains the methods for the RecoveryPoints group. Don't use this type directly, use NewRecoveryPointsClient() instead.

func NewRecoveryPointsClient

func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error)

NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RecoveryPointsClient) Get

func (client *RecoveryPointsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error)

Get - Gets a Recovery Point using recoveryPointId for a Datasource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/GetRecoveryPoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewRecoveryPointsClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		"7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*RecoveryPointsClient) NewListPager added in v0.4.0

func (client *RecoveryPointsClient) NewListPager(resourceGroupName string, vaultName string, backupInstanceName string, options *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse]

NewListPager - Returns a list of Recovery Points for a DataSource in a vault. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance options - RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ListRecoveryPoints.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewRecoveryPointsClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("000pikumar",
		"PratikPrivatePreviewVault1",
		"testInstance1",
		&armdataprotection.RecoveryPointsClientListOptions{Filter: nil,
			SkipToken: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type RecoveryPointsClientGetOptions added in v0.2.0

type RecoveryPointsClientGetOptions struct {
}

RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method.

type RecoveryPointsClientGetResponse added in v0.2.0

type RecoveryPointsClientGetResponse struct {
	AzureBackupRecoveryPointResource
}

RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get.

type RecoveryPointsClientListOptions added in v0.2.0

type RecoveryPointsClientListOptions struct {
	// OData filter options.
	Filter *string
	// skipToken Filter.
	SkipToken *string
}

RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.List method.

type RecoveryPointsClientListResponse added in v0.2.0

type RecoveryPointsClientListResponse struct {
	AzureBackupRecoveryPointResourceList
}

RecoveryPointsClientListResponse contains the response from method RecoveryPointsClient.List.

type RecoveryPointsFilters

type RecoveryPointsFilters struct {
	EndDate                 *string `json:"endDate,omitempty"`
	ExtendedInfo            *bool   `json:"extendedInfo,omitempty"`
	IsVisible               *bool   `json:"isVisible,omitempty"`
	RestorePointDataStoreID *string `json:"restorePointDataStoreId,omitempty"`
	RestorePointState       *string `json:"restorePointState,omitempty"`
	StartDate               *string `json:"startDate,omitempty"`
}

type RehydrationPriority

type RehydrationPriority string

RehydrationPriority - Priority to be used for rehydration. Values High or Standard

const (
	RehydrationPriorityHigh     RehydrationPriority = "High"
	RehydrationPriorityInvalid  RehydrationPriority = "Invalid"
	RehydrationPriorityStandard RehydrationPriority = "Standard"
)

func PossibleRehydrationPriorityValues

func PossibleRehydrationPriorityValues() []RehydrationPriority

PossibleRehydrationPriorityValues returns the possible values for the RehydrationPriority const type.

type RehydrationStatus

type RehydrationStatus string
const (
	RehydrationStatusCOMPLETED        RehydrationStatus = "COMPLETED"
	RehydrationStatusCREATEINPROGRESS RehydrationStatus = "CREATE_IN_PROGRESS"
	RehydrationStatusDELETED          RehydrationStatus = "DELETED"
	RehydrationStatusDELETEINPROGRESS RehydrationStatus = "DELETE_IN_PROGRESS"
	RehydrationStatusFAILED           RehydrationStatus = "FAILED"
)

func PossibleRehydrationStatusValues

func PossibleRehydrationStatusValues() []RehydrationStatus

PossibleRehydrationStatusValues returns the possible values for the RehydrationStatus const type.

type ResourceGuard

type ResourceGuard struct {
	// List of critical operations which are not protected by this resourceGuard
	VaultCriticalOperationExclusionList []*string `json:"vaultCriticalOperationExclusionList,omitempty"`

	// READ-ONLY; This flag indicates whether auto approval is allowed or not.
	AllowAutoApprovals *bool `json:"allowAutoApprovals,omitempty" azure:"ro"`

	// READ-ONLY; Description about the pre-req steps to perform all the critical operations.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Provisioning state of the BackupVault resource
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; {readonly} List of operation details those are protected by the ResourceGuard resource
	ResourceGuardOperations []*ResourceGuardOperation `json:"resourceGuardOperations,omitempty" azure:"ro"`
}

func (ResourceGuard) MarshalJSON

func (r ResourceGuard) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceGuard.

type ResourceGuardOperation

type ResourceGuardOperation struct {
	// READ-ONLY; Type of resource request.
	RequestResourceType *string `json:"requestResourceType,omitempty" azure:"ro"`

	// READ-ONLY; Name of the critical operation.
	VaultCriticalOperation *string `json:"vaultCriticalOperation,omitempty" azure:"ro"`
}

ResourceGuardOperation - This class contains all the details about a critical operation.

type ResourceGuardResource

type ResourceGuardResource struct {
	// Optional ETag.
	ETag *string `json:"eTag,omitempty"`

	// Input Managed Identity Details
	Identity *DppIdentityDetails `json:"identity,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// ResourceGuardResource properties
	Properties *ResourceGuard `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name associated with the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (ResourceGuardResource) MarshalJSON

func (r ResourceGuardResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceGuardResource.

type ResourceGuardResourceList

type ResourceGuardResourceList struct {
	// The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
	NextLink *string `json:"nextLink,omitempty"`

	// List of resources.
	Value []*ResourceGuardResource `json:"value,omitempty"`
}

ResourceGuardResourceList - List of ResourceGuard resources

type ResourceGuardsClient

type ResourceGuardsClient struct {
	// contains filtered or unexported fields
}

ResourceGuardsClient contains the methods for the ResourceGuards group. Don't use this type directly, use NewResourceGuardsClient() instead.

func NewResourceGuardsClient

func NewResourceGuardsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGuardsClient, error)

NewResourceGuardsClient creates a new instance of ResourceGuardsClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ResourceGuardsClient) Delete

func (client *ResourceGuardsClient) Delete(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientDeleteOptions) (ResourceGuardsClientDeleteResponse, error)

Delete - Deletes a ResourceGuard resource from the resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. resourceGuardsName - The name of ResourceGuard options - ResourceGuardsClientDeleteOptions contains the optional parameters for the ResourceGuardsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ResourceGuardsClient) Get

func (client *ResourceGuardsClient) Get(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetOptions) (ResourceGuardsClientGetResponse, error)

Get - Returns a ResourceGuard belonging to a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. resourceGuardsName - The name of ResourceGuard options - ResourceGuardsClientGetOptions contains the optional parameters for the ResourceGuardsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetResourceGuard.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject

func (client *ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions) (ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse, error)

GetDefaultBackupSecurityPINRequestsObject - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefaultBackupSecurityPINRequestsObject(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject

func (client *ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions) (ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse, error)

GetDefaultDeleteProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefaultDeleteProtectedItemRequestsObject(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject

func (client *ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions) (ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse, error)

GetDefaultDeleteResourceGuardProxyRequestsObject - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefaultDeleteResourceGuardProxyRequestsObject(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject

func (client *ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions) (ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse, error)

GetDefaultDisableSoftDeleteRequestsObject - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefaultDisableSoftDeleteRequestsObject(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject

func (client *ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions) (ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse, error)

GetDefaultUpdateProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefaultUpdateProtectedItemRequestsObject(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject

func (client *ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions) (ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse, error)

GetDefaultUpdateProtectionPolicyRequestsObject - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefaultUpdateProtectionPolicyRequestsObject(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) NewGetBackupSecurityPINRequestsObjectsPager added in v0.4.0

func (client *ResourceGuardsClient) NewGetBackupSecurityPINRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse]

NewGetBackupSecurityPINRequestsObjectsPager - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetBackupSecurityPINRequestsObjects method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetBackupSecurityPINRequestsObjectsPager("SampleResourceGroup",
		"swaggerExample",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) NewGetDeleteProtectedItemRequestsObjectsPager added in v0.4.0

func (client *ResourceGuardsClient) NewGetDeleteProtectedItemRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse]

NewGetDeleteProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetDeleteProtectedItemRequestsObjectsPager("SampleResourceGroup",
		"swaggerExample",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) NewGetDeleteResourceGuardProxyRequestsObjectsPager added in v0.4.0

func (client *ResourceGuardsClient) NewGetDeleteResourceGuardProxyRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse]

NewGetDeleteResourceGuardProxyRequestsObjectsPager - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetDeleteResourceGuardProxyRequestsObjectsPager("SampleResourceGroup",
		"swaggerExample",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) NewGetDisableSoftDeleteRequestsObjectsPager added in v0.4.0

func (client *ResourceGuardsClient) NewGetDisableSoftDeleteRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse]

NewGetDisableSoftDeleteRequestsObjectsPager - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetDisableSoftDeleteRequestsObjectsPager("SampleResourceGroup",
		"swaggerExample",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) NewGetResourcesInResourceGroupPager added in v0.4.0

NewGetResourcesInResourceGroupPager - Returns ResourceGuards collection belonging to a ResourceGroup. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetResourcesInResourceGroupOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetResourcesInResourceGroupPager("SampleResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) NewGetResourcesInSubscriptionPager added in v0.4.0

NewGetResourcesInSubscriptionPager - Returns ResourceGuards collection belonging to a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - ResourceGuardsClientGetResourcesInSubscriptionOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInSubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetResourcesInSubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) NewGetUpdateProtectedItemRequestsObjectsPager added in v0.4.0

func (client *ResourceGuardsClient) NewGetUpdateProtectedItemRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse]

NewGetUpdateProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetUpdateProtectedItemRequestsObjectsPager("SampleResourceGroup",
		"swaggerExample",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) NewGetUpdateProtectionPolicyRequestsObjectsPager added in v0.4.0

func (client *ResourceGuardsClient) NewGetUpdateProtectionPolicyRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse]

NewGetUpdateProtectionPolicyRequestsObjectsPager - Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. options - ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetUpdateProtectionPolicyRequestsObjectsPager("SampleResourceGroup",
		"swaggerExample",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ResourceGuardsClient) Patch

func (client *ResourceGuardsClient) Patch(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters PatchResourceRequestInput, options *ResourceGuardsClientPatchOptions) (ResourceGuardsClientPatchResponse, error)

Patch - Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. resourceGuardsName - The name of ResourceGuard parameters - Request body for operation options - ResourceGuardsClientPatchOptions contains the optional parameters for the ResourceGuardsClient.Patch method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/PatchResourceGuard.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Patch(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		armdataprotection.PatchResourceRequestInput{
			Tags: map[string]*string{
				"newKey": to.Ptr("newVal"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ResourceGuardsClient) Put

func (client *ResourceGuardsClient) Put(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters ResourceGuardResource, options *ResourceGuardsClientPutOptions) (ResourceGuardsClientPutResponse, error)

Put - Creates or updates a ResourceGuard resource belonging to a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. resourceGuardsName - The name of ResourceGuard parameters - Request body for operation options - ResourceGuardsClientPutOptions contains the optional parameters for the ResourceGuardsClient.Put method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/PutResourceGuard.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Put(ctx,
		"SampleResourceGroup",
		"swaggerExample",
		armdataprotection.ResourceGuardResource{
			Location: to.Ptr("WestUS"),
			Tags: map[string]*string{
				"key1": to.Ptr("val1"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ResourceGuardsClientDeleteOptions added in v0.2.0

type ResourceGuardsClientDeleteOptions struct {
}

ResourceGuardsClientDeleteOptions contains the optional parameters for the ResourceGuardsClient.Delete method.

type ResourceGuardsClientDeleteResponse added in v0.2.0

type ResourceGuardsClientDeleteResponse struct {
}

ResourceGuardsClientDeleteResponse contains the response from method ResourceGuardsClient.Delete.

type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions added in v0.2.0

type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions struct {
}

ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetBackupSecurityPINRequestsObjects method.

type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse added in v0.2.0

type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse struct {
	DppBaseResourceList
}

ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetBackupSecurityPINRequestsObjects.

type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions added in v0.2.0

type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions struct {
}

ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject method.

type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse added in v0.2.0

type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse struct {
	DppBaseResource
}

ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject.

type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions added in v0.2.0

type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions struct {
}

ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject method.

type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse added in v0.2.0

type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse struct {
	DppBaseResource
}

ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject.

type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions added in v0.2.0

type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions struct {
}

ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject method.

type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse added in v0.2.0

type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse struct {
	DppBaseResource
}

ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject.

type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions added in v0.2.0

type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions struct {
}

ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject method.

type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse added in v0.2.0

type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse struct {
	DppBaseResource
}

ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject.

type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions added in v0.2.0

type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions struct {
}

ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject method.

type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse added in v0.2.0

type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse struct {
	DppBaseResource
}

ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject.

type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions added in v0.2.0

type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions struct {
}

ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject method.

type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse added in v0.2.0

type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse struct {
	DppBaseResource
}

ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject.

type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions added in v0.2.0

type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions struct {
}

ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects method.

type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse added in v0.2.0

type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse struct {
	DppBaseResourceList
}

ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects.

type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions added in v0.2.0

type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions struct {
}

ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects method.

type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse added in v0.2.0

type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse struct {
	DppBaseResourceList
}

ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects.

type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions added in v0.2.0

type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions struct {
}

ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects method.

type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse added in v0.2.0

type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse struct {
	DppBaseResourceList
}

ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects.

type ResourceGuardsClientGetOptions added in v0.2.0

type ResourceGuardsClientGetOptions struct {
}

ResourceGuardsClientGetOptions contains the optional parameters for the ResourceGuardsClient.Get method.

type ResourceGuardsClientGetResourcesInResourceGroupOptions added in v0.2.0

type ResourceGuardsClientGetResourcesInResourceGroupOptions struct {
}

ResourceGuardsClientGetResourcesInResourceGroupOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInResourceGroup method.

type ResourceGuardsClientGetResourcesInResourceGroupResponse added in v0.2.0

type ResourceGuardsClientGetResourcesInResourceGroupResponse struct {
	ResourceGuardResourceList
}

ResourceGuardsClientGetResourcesInResourceGroupResponse contains the response from method ResourceGuardsClient.GetResourcesInResourceGroup.

type ResourceGuardsClientGetResourcesInSubscriptionOptions added in v0.2.0

type ResourceGuardsClientGetResourcesInSubscriptionOptions struct {
}

ResourceGuardsClientGetResourcesInSubscriptionOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInSubscription method.

type ResourceGuardsClientGetResourcesInSubscriptionResponse added in v0.2.0

type ResourceGuardsClientGetResourcesInSubscriptionResponse struct {
	ResourceGuardResourceList
}

ResourceGuardsClientGetResourcesInSubscriptionResponse contains the response from method ResourceGuardsClient.GetResourcesInSubscription.

type ResourceGuardsClientGetResponse added in v0.2.0

type ResourceGuardsClientGetResponse struct {
	ResourceGuardResource
}

ResourceGuardsClientGetResponse contains the response from method ResourceGuardsClient.Get.

type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions added in v0.2.0

type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions struct {
}

ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects method.

type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse added in v0.2.0

type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse struct {
	DppBaseResourceList
}

ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects.

type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions added in v0.2.0

type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions struct {
}

ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects method.

type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse added in v0.2.0

type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse struct {
	DppBaseResourceList
}

ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects.

type ResourceGuardsClientPatchOptions added in v0.2.0

type ResourceGuardsClientPatchOptions struct {
}

ResourceGuardsClientPatchOptions contains the optional parameters for the ResourceGuardsClient.Patch method.

type ResourceGuardsClientPatchResponse added in v0.2.0

type ResourceGuardsClientPatchResponse struct {
	ResourceGuardResource
}

ResourceGuardsClientPatchResponse contains the response from method ResourceGuardsClient.Patch.

type ResourceGuardsClientPutOptions added in v0.2.0

type ResourceGuardsClientPutOptions struct {
}

ResourceGuardsClientPutOptions contains the optional parameters for the ResourceGuardsClient.Put method.

type ResourceGuardsClientPutResponse added in v0.2.0

type ResourceGuardsClientPutResponse struct {
	ResourceGuardResource
}

ResourceGuardsClientPutResponse contains the response from method ResourceGuardsClient.Put.

type ResourceMoveDetails

type ResourceMoveDetails struct {
	// Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 format.
	CompletionTimeUTC *string `json:"completionTimeUtc,omitempty"`

	// CorrelationId of latest ResourceMove operation attempted
	OperationID *string `json:"operationId,omitempty"`

	// ARM resource path of source resource
	SourceResourcePath *string `json:"sourceResourcePath,omitempty"`

	// Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format.
	StartTimeUTC *string `json:"startTimeUtc,omitempty"`

	// ARM resource path of target resource used in latest ResourceMove operation
	TargetResourcePath *string `json:"targetResourcePath,omitempty"`
}

ResourceMoveDetails will be returned in response to GetResource call from ARM

type ResourceMoveState

type ResourceMoveState string

ResourceMoveState - Resource move state for backup vault

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 PossibleResourceMoveStateValues

func PossibleResourceMoveStateValues() []ResourceMoveState

PossibleResourceMoveStateValues returns the possible values for the ResourceMoveState const type.

type RestorableTimeRange

type RestorableTimeRange struct {
	// REQUIRED; End time for the available restore range
	EndTime *string `json:"endTime,omitempty"`

	// REQUIRED; Start time for the available restore range
	StartTime  *string `json:"startTime,omitempty"`
	ObjectType *string `json:"objectType,omitempty"`
}

type RestorableTimeRangesClient

type RestorableTimeRangesClient struct {
	// contains filtered or unexported fields
}

RestorableTimeRangesClient contains the methods for the RestorableTimeRanges group. Don't use this type directly, use NewRestorableTimeRangesClient() instead.

func NewRestorableTimeRangesClient

func NewRestorableTimeRangesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTimeRangesClient, error)

NewRestorableTimeRangesClient creates a new instance of RestorableTimeRangesClient with the specified values. subscriptionID - The subscription Id. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorableTimeRangesClient) Find

Find - If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group where the backup vault is present. vaultName - The name of the backup vault. backupInstanceName - The name of the backup instance parameters - Request body for operation options - RestorableTimeRangesClientFindOptions contains the optional parameters for the RestorableTimeRangesClient.Find method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdataprotection.NewRestorableTimeRangesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Find(ctx,
		"Blob-Backup",
		"ZBlobBackupVaultBVTD3",
		"zblobbackuptestsa58",
		armdataprotection.AzureBackupFindRestorableTimeRangesRequest{
			EndTime:             to.Ptr("2021-02-24T00:35:17.6829685Z"),
			SourceDataStoreType: to.Ptr(armdataprotection.RestoreSourceDataStoreTypeOperationalStore),
			StartTime:           to.Ptr("2020-10-17T23:28:17.6829685Z"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type RestorableTimeRangesClientFindOptions added in v0.2.0

type RestorableTimeRangesClientFindOptions struct {
}

RestorableTimeRangesClientFindOptions contains the optional parameters for the RestorableTimeRangesClient.Find method.

type RestorableTimeRangesClientFindResponse added in v0.2.0

type RestorableTimeRangesClientFindResponse struct {
	AzureBackupFindRestorableTimeRangesResponseResource
}

RestorableTimeRangesClientFindResponse contains the response from method RestorableTimeRangesClient.Find.

type RestoreFilesTargetInfo

type RestoreFilesTargetInfo struct {
	// REQUIRED; Type of Datasource object, used to initialize the right inherited type
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Recovery Option
	RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"`

	// REQUIRED; Destination of RestoreAsFiles operation, when destination is not a datasource
	TargetDetails *TargetDetails `json:"targetDetails,omitempty"`

	// Target Restore region
	RestoreLocation *string `json:"restoreLocation,omitempty"`
}

RestoreFilesTargetInfo - Class encapsulating restore as files target parameters

func (*RestoreFilesTargetInfo) GetRestoreTargetInfoBase added in v0.2.0

func (r *RestoreFilesTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase

GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreFilesTargetInfo.

func (RestoreFilesTargetInfo) MarshalJSON

func (r RestoreFilesTargetInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestoreFilesTargetInfo.

func (*RestoreFilesTargetInfo) UnmarshalJSON

func (r *RestoreFilesTargetInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RestoreFilesTargetInfo.

type RestoreJobRecoveryPointDetails

type RestoreJobRecoveryPointDetails struct {
	RecoveryPointID   *string    `json:"recoveryPointID,omitempty"`
	RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"`
}

func (RestoreJobRecoveryPointDetails) MarshalJSON

func (r RestoreJobRecoveryPointDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestoreJobRecoveryPointDetails.

func (*RestoreJobRecoveryPointDetails) UnmarshalJSON

func (r *RestoreJobRecoveryPointDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RestoreJobRecoveryPointDetails.

type RestoreSourceDataStoreType

type RestoreSourceDataStoreType string

RestoreSourceDataStoreType - Gets or sets the type of the source data store.

const (
	RestoreSourceDataStoreTypeArchiveStore     RestoreSourceDataStoreType = "ArchiveStore"
	RestoreSourceDataStoreTypeOperationalStore RestoreSourceDataStoreType = "OperationalStore"
	RestoreSourceDataStoreTypeVaultStore       RestoreSourceDataStoreType = "VaultStore"
)

func PossibleRestoreSourceDataStoreTypeValues

func PossibleRestoreSourceDataStoreTypeValues() []RestoreSourceDataStoreType

PossibleRestoreSourceDataStoreTypeValues returns the possible values for the RestoreSourceDataStoreType const type.

type RestoreTargetInfo

type RestoreTargetInfo struct {
	// REQUIRED; Information of target DS
	DatasourceInfo *Datasource `json:"datasourceInfo,omitempty"`

	// REQUIRED; Type of Datasource object, used to initialize the right inherited type
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Recovery Option
	RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"`

	// Credentials to use to authenticate with data source provider.
	DatasourceAuthCredentials AuthCredentialsClassification `json:"datasourceAuthCredentials,omitempty"`

	// Information of target DS Set
	DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"`

	// Target Restore region
	RestoreLocation *string `json:"restoreLocation,omitempty"`
}

RestoreTargetInfo - Class encapsulating restore target parameters

func (*RestoreTargetInfo) GetRestoreTargetInfoBase added in v0.2.0

func (r *RestoreTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase

GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreTargetInfo.

func (RestoreTargetInfo) MarshalJSON

func (r RestoreTargetInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestoreTargetInfo.

func (*RestoreTargetInfo) UnmarshalJSON

func (r *RestoreTargetInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RestoreTargetInfo.

type RestoreTargetInfoBase

type RestoreTargetInfoBase struct {
	// REQUIRED; Type of Datasource object, used to initialize the right inherited type
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Recovery Option
	RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"`

	// Target Restore region
	RestoreLocation *string `json:"restoreLocation,omitempty"`
}

RestoreTargetInfoBase - Base class common to RestoreTargetInfo and RestoreFilesTargetInfo

func (*RestoreTargetInfoBase) GetRestoreTargetInfoBase

func (r *RestoreTargetInfoBase) GetRestoreTargetInfoBase() *RestoreTargetInfoBase

GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreTargetInfoBase.

type RestoreTargetInfoBaseClassification

type RestoreTargetInfoBaseClassification interface {
	// GetRestoreTargetInfoBase returns the RestoreTargetInfoBase content of the underlying type.
	GetRestoreTargetInfoBase() *RestoreTargetInfoBase
}

RestoreTargetInfoBaseClassification provides polymorphic access to related types. Call the interface's GetRestoreTargetInfoBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ItemLevelRestoreTargetInfo, *RestoreFilesTargetInfo, *RestoreTargetInfo, *RestoreTargetInfoBase

type RestoreTargetLocationType

type RestoreTargetLocationType string

RestoreTargetLocationType - Denotes the target location where the data will be restored, string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}

const (
	RestoreTargetLocationTypeAzureBlobs RestoreTargetLocationType = "AzureBlobs"
	RestoreTargetLocationTypeAzureFiles RestoreTargetLocationType = "AzureFiles"
	RestoreTargetLocationTypeInvalid    RestoreTargetLocationType = "Invalid"
)

func PossibleRestoreTargetLocationTypeValues

func PossibleRestoreTargetLocationTypeValues() []RestoreTargetLocationType

PossibleRestoreTargetLocationTypeValues returns the possible values for the RestoreTargetLocationType const type.

type RetentionTag

type RetentionTag struct {
	// REQUIRED; Retention Tag Name to relate it to retention rule.
	TagName *string `json:"tagName,omitempty"`

	// READ-ONLY; Retention Tag version.
	ETag *string `json:"eTag,omitempty" azure:"ro"`

	// READ-ONLY; Retention Tag version.
	ID *string `json:"id,omitempty" azure:"ro"`
}

RetentionTag - Retention tag

type ScheduleBasedBackupCriteria

type ScheduleBasedBackupCriteria struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" and should be part of AbsoluteMarker
	// enum
	AbsoluteCriteria []*AbsoluteMarker `json:"absoluteCriteria,omitempty"`

	// This is day of the month from 1 to 28 other wise last of month
	DaysOfMonth []*Day `json:"daysOfMonth,omitempty"`

	// It should be Sunday/Monday/T…./Saturday
	DaysOfTheWeek []*DayOfWeek `json:"daysOfTheWeek,omitempty"`

	// It should be January/February/……/December
	MonthsOfYear []*Month `json:"monthsOfYear,omitempty"`

	// List of schedule times for backup
	ScheduleTimes []*time.Time `json:"scheduleTimes,omitempty"`

	// It should be First/Second/Third/Fourth/Last
	WeeksOfTheMonth []*WeekNumber `json:"weeksOfTheMonth,omitempty"`
}

ScheduleBasedBackupCriteria - Schedule based backup criteria

func (*ScheduleBasedBackupCriteria) GetBackupCriteria added in v0.2.0

func (s *ScheduleBasedBackupCriteria) GetBackupCriteria() *BackupCriteria

GetBackupCriteria implements the BackupCriteriaClassification interface for type ScheduleBasedBackupCriteria.

func (ScheduleBasedBackupCriteria) MarshalJSON

func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScheduleBasedBackupCriteria.

func (*ScheduleBasedBackupCriteria) UnmarshalJSON

func (s *ScheduleBasedBackupCriteria) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBasedBackupCriteria.

type ScheduleBasedTriggerContext

type ScheduleBasedTriggerContext struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// REQUIRED; Schedule for this backup
	Schedule *BackupSchedule `json:"schedule,omitempty"`

	// REQUIRED; List of tags that can be applicable for given schedule.
	TaggingCriteria []*TaggingCriteria `json:"taggingCriteria,omitempty"`
}

ScheduleBasedTriggerContext - Schedule based trigger context

func (*ScheduleBasedTriggerContext) GetTriggerContext added in v0.2.0

func (s *ScheduleBasedTriggerContext) GetTriggerContext() *TriggerContext

GetTriggerContext implements the TriggerContextClassification interface for type ScheduleBasedTriggerContext.

func (ScheduleBasedTriggerContext) MarshalJSON

func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScheduleBasedTriggerContext.

func (*ScheduleBasedTriggerContext) UnmarshalJSON

func (s *ScheduleBasedTriggerContext) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBasedTriggerContext.

type SecretStoreBasedAuthCredentials

type SecretStoreBasedAuthCredentials struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`

	// Secret store resource
	SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"`
}

SecretStoreBasedAuthCredentials - Secret store based authentication credentials.

func (*SecretStoreBasedAuthCredentials) GetAuthCredentials added in v0.2.0

func (s *SecretStoreBasedAuthCredentials) GetAuthCredentials() *AuthCredentials

GetAuthCredentials implements the AuthCredentialsClassification interface for type SecretStoreBasedAuthCredentials.

func (SecretStoreBasedAuthCredentials) MarshalJSON

func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretStoreBasedAuthCredentials.

func (*SecretStoreBasedAuthCredentials) UnmarshalJSON

func (s *SecretStoreBasedAuthCredentials) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretStoreBasedAuthCredentials.

type SecretStoreResource

type SecretStoreResource struct {
	// REQUIRED; Gets or sets the type of secret store
	SecretStoreType *SecretStoreType `json:"secretStoreType,omitempty"`

	// Uri to get to the resource
	URI *string `json:"uri,omitempty"`

	// Gets or sets value stored in secret store resource
	Value *string `json:"value,omitempty"`
}

SecretStoreResource - Class representing a secret store resource.

type SecretStoreType

type SecretStoreType string

SecretStoreType - Gets or sets the type of secret store

const (
	SecretStoreTypeAzureKeyVault SecretStoreType = "AzureKeyVault"
	SecretStoreTypeInvalid       SecretStoreType = "Invalid"
)

func PossibleSecretStoreTypeValues

func PossibleSecretStoreTypeValues() []SecretStoreType

PossibleSecretStoreTypeValues returns the possible values for the SecretStoreType const type.

type SourceDataStoreType

type SourceDataStoreType string

SourceDataStoreType - Gets or sets the type of the source data store.

const (
	SourceDataStoreTypeArchiveStore  SourceDataStoreType = "ArchiveStore"
	SourceDataStoreTypeSnapshotStore SourceDataStoreType = "SnapshotStore"
	SourceDataStoreTypeVaultStore    SourceDataStoreType = "VaultStore"
)

func PossibleSourceDataStoreTypeValues

func PossibleSourceDataStoreTypeValues() []SourceDataStoreType

PossibleSourceDataStoreTypeValues returns the possible values for the SourceDataStoreType const type.

type SourceLifeCycle

type SourceLifeCycle struct {
	// REQUIRED; Delete Option
	DeleteAfter DeleteOptionClassification `json:"deleteAfter,omitempty"`

	// REQUIRED; DataStoreInfo base
	SourceDataStore             *DataStoreInfoBase   `json:"sourceDataStore,omitempty"`
	TargetDataStoreCopySettings []*TargetCopySetting `json:"targetDataStoreCopySettings,omitempty"`
}

SourceLifeCycle - Source LifeCycle

func (SourceLifeCycle) MarshalJSON

func (s SourceLifeCycle) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SourceLifeCycle.

func (*SourceLifeCycle) UnmarshalJSON

func (s *SourceLifeCycle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SourceLifeCycle.

type Status

type Status string

Status - Specifies the protection status of the resource

const (
	StatusConfiguringProtection       Status = "ConfiguringProtection"
	StatusConfiguringProtectionFailed Status = "ConfiguringProtectionFailed"
	StatusProtectionConfigured        Status = "ProtectionConfigured"
	StatusProtectionStopped           Status = "ProtectionStopped"
	StatusSoftDeleted                 Status = "SoftDeleted"
	StatusSoftDeleting                Status = "SoftDeleting"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type StorageSetting

type StorageSetting struct {
	// Gets or sets the type of the datastore.
	DatastoreType *StorageSettingStoreTypes `json:"datastoreType,omitempty"`

	// Gets or sets the type.
	Type *StorageSettingTypes `json:"type,omitempty"`
}

StorageSetting - Storage setting

type StorageSettingStoreTypes

type StorageSettingStoreTypes string

StorageSettingStoreTypes - Gets or sets the type of the datastore.

const (
	StorageSettingStoreTypesArchiveStore  StorageSettingStoreTypes = "ArchiveStore"
	StorageSettingStoreTypesSnapshotStore StorageSettingStoreTypes = "SnapshotStore"
	StorageSettingStoreTypesVaultStore    StorageSettingStoreTypes = "VaultStore"
)

func PossibleStorageSettingStoreTypesValues

func PossibleStorageSettingStoreTypesValues() []StorageSettingStoreTypes

PossibleStorageSettingStoreTypesValues returns the possible values for the StorageSettingStoreTypes const type.

type StorageSettingTypes

type StorageSettingTypes string

StorageSettingTypes - Gets or sets the type.

const (
	StorageSettingTypesGeoRedundant     StorageSettingTypes = "GeoRedundant"
	StorageSettingTypesLocallyRedundant StorageSettingTypes = "LocallyRedundant"
)

func PossibleStorageSettingTypesValues

func PossibleStorageSettingTypesValues() []StorageSettingTypes

PossibleStorageSettingTypesValues returns the possible values for the StorageSettingTypes const type.

type SupportedFeature

type SupportedFeature struct {
	// support feature type.
	ExposureControlledFeatures []*string `json:"exposureControlledFeatures,omitempty"`

	// support feature type.
	FeatureName *string `json:"featureName,omitempty"`

	// feature support status
	SupportStatus *FeatureSupportStatus `json:"supportStatus,omitempty"`
}

SupportedFeature - Elements class for feature request

type SyncBackupInstanceRequest added in v0.3.0

type SyncBackupInstanceRequest struct {
	// Field indicating sync type e.g. to sync only in case of failure or in all cases
	SyncType *SyncType `json:"syncType,omitempty"`
}

SyncBackupInstanceRequest - Sync BackupInstance Request

type SyncType added in v0.3.0

type SyncType string

SyncType - Field indicating sync type e.g. to sync only in case of failure or in all cases

const (
	SyncTypeDefault     SyncType = "Default"
	SyncTypeForceResync SyncType = "ForceResync"
)

func PossibleSyncTypeValues added in v0.3.0

func PossibleSyncTypeValues() []SyncType

PossibleSyncTypeValues returns the possible values for the SyncType const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TaggingCriteria

type TaggingCriteria struct {
	// REQUIRED; Specifies if tag is default.
	IsDefault *bool `json:"isDefault,omitempty"`

	// REQUIRED; Retention tag information
	TagInfo *RetentionTag `json:"tagInfo,omitempty"`

	// REQUIRED; Retention Tag priority.
	TaggingPriority *int64 `json:"taggingPriority,omitempty"`

	// Criteria which decides whether the tag can be applied to a triggered backup.
	Criteria []BackupCriteriaClassification `json:"criteria,omitempty"`
}

TaggingCriteria - Tagging criteria

func (TaggingCriteria) MarshalJSON

func (t TaggingCriteria) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaggingCriteria.

func (*TaggingCriteria) UnmarshalJSON

func (t *TaggingCriteria) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TaggingCriteria.

type TargetCopySetting

type TargetCopySetting struct {
	// REQUIRED; It can be CustomCopyOption or ImmediateCopyOption.
	CopyAfter CopyOptionClassification `json:"copyAfter,omitempty"`

	// REQUIRED; Info of target datastore
	DataStore *DataStoreInfoBase `json:"dataStore,omitempty"`
}

TargetCopySetting - Target copy settings

func (TargetCopySetting) MarshalJSON

func (t TargetCopySetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TargetCopySetting.

func (*TargetCopySetting) UnmarshalJSON

func (t *TargetCopySetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TargetCopySetting.

type TargetDetails

type TargetDetails struct {
	// REQUIRED; Restore operation may create multiple files inside location pointed by Url Below will be the common prefix for
	// all of them
	FilePrefix *string `json:"filePrefix,omitempty"`

	// REQUIRED; Denotes the target location where the data will be restored, string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}
	RestoreTargetLocationType *RestoreTargetLocationType `json:"restoreTargetLocationType,omitempty"`

	// REQUIRED; Url denoting the restore destination. It can point to container / file share etc
	URL *string `json:"url,omitempty"`
}

TargetDetails - Class encapsulating target details, used where the destination is not a datasource

type TriggerBackupRequest

type TriggerBackupRequest struct {
	// REQUIRED; Name for the Rule of the Policy which needs to be applied for this backup
	BackupRuleOptions *AdHocBackupRuleOptions `json:"backupRuleOptions,omitempty"`
}

TriggerBackupRequest - Trigger backup request

type TriggerContext

type TriggerContext struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string `json:"objectType,omitempty"`
}

TriggerContext - Trigger context

func (*TriggerContext) GetTriggerContext

func (t *TriggerContext) GetTriggerContext() *TriggerContext

GetTriggerContext implements the TriggerContextClassification interface for type TriggerContext.

type TriggerContextClassification

type TriggerContextClassification interface {
	// GetTriggerContext returns the TriggerContext content of the underlying type.
	GetTriggerContext() *TriggerContext
}

TriggerContextClassification provides polymorphic access to related types. Call the interface's GetTriggerContext() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AdhocBasedTriggerContext, *ScheduleBasedTriggerContext, *TriggerContext

type UserFacingError

type UserFacingError struct {
	// Unique code for this error
	Code *string `json:"code,omitempty"`

	// Additional related Errors
	Details []*UserFacingError `json:"details,omitempty"`

	// Inner Error
	InnerError *InnerError `json:"innerError,omitempty"`

	// Whether the operation will be retryable or not
	IsRetryable *bool `json:"isRetryable,omitempty"`

	// Whether the operation is due to a user error or service error
	IsUserError *bool   `json:"isUserError,omitempty"`
	Message     *string `json:"message,omitempty"`

	// Any key value pairs that can be injected inside error object
	Properties map[string]*string `json:"properties,omitempty"`

	// RecommendedAction � localized.
	RecommendedAction []*string `json:"recommendedAction,omitempty"`

	// Target of the error.
	Target *string `json:"target,omitempty"`
}

UserFacingError - Error object used by layers that have access to localized content, and propagate that to user

func (UserFacingError) MarshalJSON

func (u UserFacingError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserFacingError.

type ValidateForBackupRequest

type ValidateForBackupRequest struct {
	// REQUIRED; Backup Instance
	BackupInstance *BackupInstance `json:"backupInstance,omitempty"`
}

ValidateForBackupRequest - Validate for backup request

type ValidateRestoreRequestObject

type ValidateRestoreRequestObject struct {
	// REQUIRED; Gets or sets the restore request object.
	RestoreRequestObject AzureBackupRestoreRequestClassification `json:"restoreRequestObject,omitempty"`
}

ValidateRestoreRequestObject - Validate restore request object

func (ValidateRestoreRequestObject) MarshalJSON

func (v ValidateRestoreRequestObject) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateRestoreRequestObject.

func (*ValidateRestoreRequestObject) UnmarshalJSON

func (v *ValidateRestoreRequestObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateRestoreRequestObject.

type ValidationType added in v0.3.0

type ValidationType string

ValidationType - Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again.

const (
	ValidationTypeDeepValidation    ValidationType = "DeepValidation"
	ValidationTypeShallowValidation ValidationType = "ShallowValidation"
)

func PossibleValidationTypeValues added in v0.3.0

func PossibleValidationTypeValues() []ValidationType

PossibleValidationTypeValues returns the possible values for the ValidationType const type.

type WeekNumber

type WeekNumber string
const (
	WeekNumberFirst  WeekNumber = "First"
	WeekNumberFourth WeekNumber = "Fourth"
	WeekNumberLast   WeekNumber = "Last"
	WeekNumberSecond WeekNumber = "Second"
	WeekNumberThird  WeekNumber = "Third"
)

func PossibleWeekNumberValues

func PossibleWeekNumberValues() []WeekNumber

PossibleWeekNumberValues returns the possible values for the WeekNumber const type.

Jump to

Keyboard shortcuts

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