protectionintent

package
v0.20241205.1102105 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MPL-2.0 Imports: 9 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent Documentation

The protectionintent SDK allows for interaction with Azure Resource Manager recoveryservicesbackup (API Version 2024-04-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent"

Client Initialization

client := protectionintent.NewProtectionIntentClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProtectionIntentClient.CreateOrUpdate

ctx := context.TODO()
id := protectionintent.NewBackupProtectionIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultName", "backupFabricName", "backupProtectionIntentName")

payload := protectionintent.ProtectionIntentResource{
	// ...
}


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

Example Usage: ProtectionIntentClient.Delete

ctx := context.TODO()
id := protectionintent.NewBackupProtectionIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultName", "backupFabricName", "backupProtectionIntentName")

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

Example Usage: ProtectionIntentClient.Get

ctx := context.TODO()
id := protectionintent.NewBackupProtectionIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultName", "backupFabricName", "backupProtectionIntentName")

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

Example Usage: ProtectionIntentClient.Validate

ctx := context.TODO()
id := protectionintent.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName")

payload := protectionintent.PreValidateEnableBackupRequest{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBackupManagementType

func PossibleValuesForBackupManagementType() []string

func PossibleValuesForDataSourceType

func PossibleValuesForDataSourceType() []string

func PossibleValuesForProtectionIntentItemType

func PossibleValuesForProtectionIntentItemType() []string

func PossibleValuesForProtectionStatus

func PossibleValuesForProtectionStatus() []string

func PossibleValuesForValidationStatus

func PossibleValuesForValidationStatus() []string

func PossibleValuesForWorkloadItemType

func PossibleValuesForWorkloadItemType() []string

func ValidateBackupProtectionIntentID

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

ValidateBackupProtectionIntentID checks that 'input' can be parsed as a Backup Protection Intent ID

func ValidateLocationID

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

Types

type AzureRecoveryServiceVaultProtectionIntent

type AzureRecoveryServiceVaultProtectionIntent struct {
	BackupManagementType     *BackupManagementType    `json:"backupManagementType,omitempty"`
	ItemId                   *string                  `json:"itemId,omitempty"`
	PolicyId                 *string                  `json:"policyId,omitempty"`
	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"`
	ProtectionState          *ProtectionStatus        `json:"protectionState,omitempty"`
	SourceResourceId         *string                  `json:"sourceResourceId,omitempty"`
}

func (AzureRecoveryServiceVaultProtectionIntent) MarshalJSON

func (AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent added in v0.20240920.1135249

type AzureResourceProtectionIntent

type AzureResourceProtectionIntent struct {
	FriendlyName *string `json:"friendlyName,omitempty"`

	BackupManagementType     *BackupManagementType    `json:"backupManagementType,omitempty"`
	ItemId                   *string                  `json:"itemId,omitempty"`
	PolicyId                 *string                  `json:"policyId,omitempty"`
	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"`
	ProtectionState          *ProtectionStatus        `json:"protectionState,omitempty"`
	SourceResourceId         *string                  `json:"sourceResourceId,omitempty"`
}

func (AzureResourceProtectionIntent) MarshalJSON

func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error)

func (AzureResourceProtectionIntent) ProtectionIntent added in v0.20240920.1135249

type AzureWorkloadAutoProtectionIntent

type AzureWorkloadAutoProtectionIntent struct {
	BackupManagementType     *BackupManagementType    `json:"backupManagementType,omitempty"`
	ItemId                   *string                  `json:"itemId,omitempty"`
	PolicyId                 *string                  `json:"policyId,omitempty"`
	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"`
	ProtectionState          *ProtectionStatus        `json:"protectionState,omitempty"`
	SourceResourceId         *string                  `json:"sourceResourceId,omitempty"`
}

func (AzureWorkloadAutoProtectionIntent) MarshalJSON

func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error)

func (AzureWorkloadAutoProtectionIntent) ProtectionIntent added in v0.20240920.1135249

type AzureWorkloadContainerAutoProtectionIntent

type AzureWorkloadContainerAutoProtectionIntent struct {
	BackupManagementType     *BackupManagementType    `json:"backupManagementType,omitempty"`
	ItemId                   *string                  `json:"itemId,omitempty"`
	PolicyId                 *string                  `json:"policyId,omitempty"`
	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"`
	ProtectionState          *ProtectionStatus        `json:"protectionState,omitempty"`
	SourceResourceId         *string                  `json:"sourceResourceId,omitempty"`
}

func (AzureWorkloadContainerAutoProtectionIntent) MarshalJSON

func (AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent added in v0.20240920.1135249

type AzureWorkloadSQLAutoProtectionIntent

type AzureWorkloadSQLAutoProtectionIntent struct {
	WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"`

	BackupManagementType     *BackupManagementType    `json:"backupManagementType,omitempty"`
	ItemId                   *string                  `json:"itemId,omitempty"`
	PolicyId                 *string                  `json:"policyId,omitempty"`
	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"`
	ProtectionState          *ProtectionStatus        `json:"protectionState,omitempty"`
	SourceResourceId         *string                  `json:"sourceResourceId,omitempty"`
}

func (AzureWorkloadSQLAutoProtectionIntent) MarshalJSON

func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error)

func (AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent added in v0.20240920.1135249

type BackupManagementType

type BackupManagementType string
const (
	BackupManagementTypeAzureBackupServer BackupManagementType = "AzureBackupServer"
	BackupManagementTypeAzureIaasVM       BackupManagementType = "AzureIaasVM"
	BackupManagementTypeAzureSql          BackupManagementType = "AzureSql"
	BackupManagementTypeAzureStorage      BackupManagementType = "AzureStorage"
	BackupManagementTypeAzureWorkload     BackupManagementType = "AzureWorkload"
	BackupManagementTypeDPM               BackupManagementType = "DPM"
	BackupManagementTypeDefaultBackup     BackupManagementType = "DefaultBackup"
	BackupManagementTypeInvalid           BackupManagementType = "Invalid"
	BackupManagementTypeMAB               BackupManagementType = "MAB"
)

type BackupProtectionIntentId

type BackupProtectionIntentId struct {
	SubscriptionId             string
	ResourceGroupName          string
	VaultName                  string
	BackupFabricName           string
	BackupProtectionIntentName string
}

BackupProtectionIntentId is a struct representing the Resource ID for a Backup Protection Intent

func NewBackupProtectionIntentID

func NewBackupProtectionIntentID(subscriptionId string, resourceGroupName string, vaultName string, backupFabricName string, backupProtectionIntentName string) BackupProtectionIntentId

NewBackupProtectionIntentID returns a new BackupProtectionIntentId struct

func ParseBackupProtectionIntentID

func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, error)

ParseBackupProtectionIntentID parses 'input' into a BackupProtectionIntentId

func ParseBackupProtectionIntentIDInsensitively

func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtectionIntentId, error)

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

func (*BackupProtectionIntentId) FromParseResult

func (id *BackupProtectionIntentId) FromParseResult(input resourceids.ParseResult) error

func (BackupProtectionIntentId) ID

ID returns the formatted Backup Protection Intent ID

func (BackupProtectionIntentId) Segments

Segments returns a slice of Resource ID Segments which comprise this Backup Protection Intent ID

func (BackupProtectionIntentId) String

func (id BackupProtectionIntentId) String() string

String returns a human-readable description of this Backup Protection Intent ID

type BaseProtectionIntentImpl added in v0.20240920.1135249

type BaseProtectionIntentImpl struct {
	BackupManagementType     *BackupManagementType    `json:"backupManagementType,omitempty"`
	ItemId                   *string                  `json:"itemId,omitempty"`
	PolicyId                 *string                  `json:"policyId,omitempty"`
	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"`
	ProtectionState          *ProtectionStatus        `json:"protectionState,omitempty"`
	SourceResourceId         *string                  `json:"sourceResourceId,omitempty"`
}

func (BaseProtectionIntentImpl) ProtectionIntent added in v0.20240920.1135249

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ProtectionIntentResource
}

type DataSourceType

type DataSourceType string
const (
	DataSourceTypeAzureFileShare    DataSourceType = "AzureFileShare"
	DataSourceTypeAzureSqlDb        DataSourceType = "AzureSqlDb"
	DataSourceTypeClient            DataSourceType = "Client"
	DataSourceTypeExchange          DataSourceType = "Exchange"
	DataSourceTypeFileFolder        DataSourceType = "FileFolder"
	DataSourceTypeGenericDataSource DataSourceType = "GenericDataSource"
	DataSourceTypeInvalid           DataSourceType = "Invalid"
	DataSourceTypeSAPAseDatabase    DataSourceType = "SAPAseDatabase"
	DataSourceTypeSAPHanaDBInstance DataSourceType = "SAPHanaDBInstance"
	DataSourceTypeSAPHanaDatabase   DataSourceType = "SAPHanaDatabase"
	DataSourceTypeSQLDB             DataSourceType = "SQLDB"
	DataSourceTypeSQLDataBase       DataSourceType = "SQLDataBase"
	DataSourceTypeSharepoint        DataSourceType = "Sharepoint"
	DataSourceTypeSystemState       DataSourceType = "SystemState"
	DataSourceTypeVM                DataSourceType = "VM"
	DataSourceTypeVMwareVM          DataSourceType = "VMwareVM"
)

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ProtectionIntentResource
}

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (*LocationId) FromParseResult

func (id *LocationId) FromParseResult(input resourceids.ParseResult) error

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type PreValidateEnableBackupRequest

type PreValidateEnableBackupRequest struct {
	Properties   *string         `json:"properties,omitempty"`
	ResourceId   *string         `json:"resourceId,omitempty"`
	ResourceType *DataSourceType `json:"resourceType,omitempty"`
	VaultId      *string         `json:"vaultId,omitempty"`
}

type PreValidateEnableBackupResponse

type PreValidateEnableBackupResponse struct {
	ContainerName     *string           `json:"containerName,omitempty"`
	ErrorCode         *string           `json:"errorCode,omitempty"`
	ErrorMessage      *string           `json:"errorMessage,omitempty"`
	ProtectedItemName *string           `json:"protectedItemName,omitempty"`
	Recommendation    *string           `json:"recommendation,omitempty"`
	Status            *ValidationStatus `json:"status,omitempty"`
}

type ProtectionIntent

type ProtectionIntent interface {
	ProtectionIntent() BaseProtectionIntentImpl
}

func UnmarshalProtectionIntentImplementation added in v0.20240920.1135249

func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error)

type ProtectionIntentClient

type ProtectionIntentClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewProtectionIntentClientWithBaseURI

func NewProtectionIntentClientWithBaseURI(endpoint string) ProtectionIntentClient

func (ProtectionIntentClient) CreateOrUpdate

CreateOrUpdate ...

func (ProtectionIntentClient) Delete

Delete ...

func (ProtectionIntentClient) Get

Get ...

func (ProtectionIntentClient) Validate

Validate ...

type ProtectionIntentItemType

type ProtectionIntentItemType string
const (
	ProtectionIntentItemTypeAzureResourceItem                          ProtectionIntentItemType = "AzureResourceItem"
	ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent          ProtectionIntentItemType = "AzureWorkloadAutoProtectionIntent"
	ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadContainerAutoProtectionIntent"
	ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent       ProtectionIntentItemType = "AzureWorkloadSQLAutoProtectionIntent"
	ProtectionIntentItemTypeInvalid                                    ProtectionIntentItemType = "Invalid"
	ProtectionIntentItemTypeRecoveryServiceVaultItem                   ProtectionIntentItemType = "RecoveryServiceVaultItem"
)

type ProtectionIntentResource

type ProtectionIntentResource struct {
	ETag       *string            `json:"eTag,omitempty"`
	Id         *string            `json:"id,omitempty"`
	Location   *string            `json:"location,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties ProtectionIntent   `json:"properties"`
	Tags       *map[string]string `json:"tags,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

func (*ProtectionIntentResource) UnmarshalJSON

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

type ProtectionStatus

type ProtectionStatus string
const (
	ProtectionStatusInvalid          ProtectionStatus = "Invalid"
	ProtectionStatusNotProtected     ProtectionStatus = "NotProtected"
	ProtectionStatusProtected        ProtectionStatus = "Protected"
	ProtectionStatusProtecting       ProtectionStatus = "Protecting"
	ProtectionStatusProtectionFailed ProtectionStatus = "ProtectionFailed"
)

type RawProtectionIntentImpl

type RawProtectionIntentImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawProtectionIntentImpl) ProtectionIntent added in v0.20240920.1135249

type ValidateOperationResponse

type ValidateOperationResponse struct {
	HttpResponse *http.Response
	Model        *PreValidateEnableBackupResponse
}

type ValidationStatus

type ValidationStatus string
const (
	ValidationStatusFailed    ValidationStatus = "Failed"
	ValidationStatusInvalid   ValidationStatus = "Invalid"
	ValidationStatusSucceeded ValidationStatus = "Succeeded"
)

type WorkloadItemType

type WorkloadItemType string
const (
	WorkloadItemTypeInvalid           WorkloadItemType = "Invalid"
	WorkloadItemTypeSAPAseDatabase    WorkloadItemType = "SAPAseDatabase"
	WorkloadItemTypeSAPAseSystem      WorkloadItemType = "SAPAseSystem"
	WorkloadItemTypeSAPHanaDBInstance WorkloadItemType = "SAPHanaDBInstance"
	WorkloadItemTypeSAPHanaDatabase   WorkloadItemType = "SAPHanaDatabase"
	WorkloadItemTypeSAPHanaSystem     WorkloadItemType = "SAPHanaSystem"
	WorkloadItemTypeSQLDataBase       WorkloadItemType = "SQLDataBase"
	WorkloadItemTypeSQLInstance       WorkloadItemType = "SQLInstance"
)

Jump to

Keyboard shortcuts

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