protectionintent

package
v0.20221216.1110338 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2022-10-01/protectionintent Documentation

The protectionintent SDK allows for interaction with the Azure Resource Manager Service recoveryservicesbackup (API Version 2022-10-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/2022-10-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", "vaultValue", "fabricValue", "intentObjectValue")

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", "vaultValue", "fabricValue", "intentObjectValue")

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", "vaultValue", "fabricValue", "intentObjectValue")

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

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

	// Fields inherited from ProtectionIntent
	BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"`
	ItemId               *string               `json:"itemId,omitempty"`
	PolicyId             *string               `json:"policyId,omitempty"`
	ProtectionState      *ProtectionStatus     `json:"protectionState,omitempty"`
	SourceResourceId     *string               `json:"sourceResourceId,omitempty"`
}

func (AzureRecoveryServiceVaultProtectionIntent) MarshalJSON

type AzureResourceProtectionIntent

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

	// Fields inherited from ProtectionIntent
	BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"`
	ItemId               *string               `json:"itemId,omitempty"`
	PolicyId             *string               `json:"policyId,omitempty"`
	ProtectionState      *ProtectionStatus     `json:"protectionState,omitempty"`
	SourceResourceId     *string               `json:"sourceResourceId,omitempty"`
}

func (AzureResourceProtectionIntent) MarshalJSON

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

type AzureWorkloadAutoProtectionIntent

type AzureWorkloadAutoProtectionIntent struct {

	// Fields inherited from ProtectionIntent
	BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"`
	ItemId               *string               `json:"itemId,omitempty"`
	PolicyId             *string               `json:"policyId,omitempty"`
	ProtectionState      *ProtectionStatus     `json:"protectionState,omitempty"`
	SourceResourceId     *string               `json:"sourceResourceId,omitempty"`
}

func (AzureWorkloadAutoProtectionIntent) MarshalJSON

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

type AzureWorkloadContainerAutoProtectionIntent

type AzureWorkloadContainerAutoProtectionIntent struct {

	// Fields inherited from ProtectionIntent
	BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"`
	ItemId               *string               `json:"itemId,omitempty"`
	PolicyId             *string               `json:"policyId,omitempty"`
	ProtectionState      *ProtectionStatus     `json:"protectionState,omitempty"`
	SourceResourceId     *string               `json:"sourceResourceId,omitempty"`
}

func (AzureWorkloadContainerAutoProtectionIntent) MarshalJSON

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
	FabricName        string
	IntentObjectName  string
}

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

func NewBackupProtectionIntentID

func NewBackupProtectionIntentID(subscriptionId string, resourceGroupName string, vaultName string, fabricName string, intentObjectName 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) 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 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
	AzureRegion    string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, azureRegion 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) 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 {
}

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 ValidateOperationResponse

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

type ValidationStatus

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

Jump to

Keyboard shortcuts

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