longtermretentionbackup

package
v0.20240108.1165100 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-03-01-preview/longtermretentionbackup Documentation

The longtermretentionbackup SDK allows for interaction with the Azure Resource Manager Service postgresql (API Version 2023-03-01-preview).

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/postgresql/2023-03-01-preview/longtermretentionbackup"

Client Initialization

client := longtermretentionbackup.NewLongTermRetentionBackupClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LongTermRetentionBackupClient.FlexibleServerStartLtrBackup

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

payload := longtermretentionbackup.LtrBackupRequest{
	// ...
}


if err := client.FlexibleServerStartLtrBackupThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: LongTermRetentionBackupClient.FlexibleServerTriggerLtrPreBackup

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

payload := longtermretentionbackup.BackupRequestBase{
	// ...
}


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

Example Usage: LongTermRetentionBackupClient.LtrBackupOperationsGet

ctx := context.TODO()
id := longtermretentionbackup.NewLtrBackupOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue", "ltrBackupOperationValue")

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

Example Usage: LongTermRetentionBackupClient.LtrBackupOperationsListByServer

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForExecutionStatus

func PossibleValuesForExecutionStatus() []string

func ValidateFlexibleServerID

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

ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID

func ValidateLtrBackupOperationID

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

ValidateLtrBackupOperationID checks that 'input' can be parsed as a Ltr Backup Operation ID

Types

type BackupRequestBase

type BackupRequestBase struct {
	BackupSettings BackupSettings `json:"backupSettings"`
}

type BackupSettings

type BackupSettings struct {
	BackupName string `json:"backupName"`
}

type BackupStoreDetails

type BackupStoreDetails struct {
	SasUriList []string `json:"sasUriList"`
}

type ExecutionStatus

type ExecutionStatus string
const (
	ExecutionStatusCancelled ExecutionStatus = "Cancelled"
	ExecutionStatusFailed    ExecutionStatus = "Failed"
	ExecutionStatusRunning   ExecutionStatus = "Running"
	ExecutionStatusSucceeded ExecutionStatus = "Succeeded"
)

func (*ExecutionStatus) UnmarshalJSON added in v0.20230809.1081239

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

type FlexibleServerId

type FlexibleServerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
}

FlexibleServerId is a struct representing the Resource ID for a Flexible Server

func NewFlexibleServerID

func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId

NewFlexibleServerID returns a new FlexibleServerId struct

func ParseFlexibleServerID

func ParseFlexibleServerID(input string) (*FlexibleServerId, error)

ParseFlexibleServerID parses 'input' into a FlexibleServerId

func ParseFlexibleServerIDInsensitively

func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error)

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

func (*FlexibleServerId) FromParseResult added in v0.20231127.1171502

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

func (FlexibleServerId) ID

func (id FlexibleServerId) ID() string

ID returns the formatted Flexible Server ID

func (FlexibleServerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID

func (FlexibleServerId) String

func (id FlexibleServerId) String() string

String returns a human-readable description of this Flexible Server ID

type FlexibleServerStartLtrBackupOperationResponse

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

type FlexibleServerTriggerLtrPreBackupOperationResponse

type FlexibleServerTriggerLtrPreBackupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LtrPreBackupResponse
}

type LongTermRetentionBackupClient

type LongTermRetentionBackupClient struct {
	Client *resourcemanager.Client
}

func NewLongTermRetentionBackupClientWithBaseURI

func NewLongTermRetentionBackupClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionBackupClient, error)

func (LongTermRetentionBackupClient) FlexibleServerStartLtrBackup

FlexibleServerStartLtrBackup ...

func (LongTermRetentionBackupClient) FlexibleServerStartLtrBackupThenPoll

func (c LongTermRetentionBackupClient) FlexibleServerStartLtrBackupThenPoll(ctx context.Context, id FlexibleServerId, input LtrBackupRequest) error

FlexibleServerStartLtrBackupThenPoll performs FlexibleServerStartLtrBackup then polls until it's completed

func (LongTermRetentionBackupClient) FlexibleServerTriggerLtrPreBackup

FlexibleServerTriggerLtrPreBackup ...

func (LongTermRetentionBackupClient) LtrBackupOperationsGet

LtrBackupOperationsGet ...

func (LongTermRetentionBackupClient) LtrBackupOperationsListByServer

LtrBackupOperationsListByServer ...

func (LongTermRetentionBackupClient) LtrBackupOperationsListByServerComplete

LtrBackupOperationsListByServerComplete retrieves all the results into a single object

func (LongTermRetentionBackupClient) LtrBackupOperationsListByServerCompleteMatchingPredicate

func (c LongTermRetentionBackupClient) LtrBackupOperationsListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate LtrServerBackupOperationOperationPredicate) (result LtrBackupOperationsListByServerCompleteResult, err error)

LtrBackupOperationsListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

type LtrBackupOperationId

type LtrBackupOperationId struct {
	SubscriptionId         string
	ResourceGroupName      string
	FlexibleServerName     string
	LtrBackupOperationName string
}

LtrBackupOperationId is a struct representing the Resource ID for a Ltr Backup Operation

func NewLtrBackupOperationID

func NewLtrBackupOperationID(subscriptionId string, resourceGroupName string, flexibleServerName string, ltrBackupOperationName string) LtrBackupOperationId

NewLtrBackupOperationID returns a new LtrBackupOperationId struct

func ParseLtrBackupOperationID

func ParseLtrBackupOperationID(input string) (*LtrBackupOperationId, error)

ParseLtrBackupOperationID parses 'input' into a LtrBackupOperationId

func ParseLtrBackupOperationIDInsensitively

func ParseLtrBackupOperationIDInsensitively(input string) (*LtrBackupOperationId, error)

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

func (*LtrBackupOperationId) FromParseResult added in v0.20231127.1171502

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

func (LtrBackupOperationId) ID

func (id LtrBackupOperationId) ID() string

ID returns the formatted Ltr Backup Operation ID

func (LtrBackupOperationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Ltr Backup Operation ID

func (LtrBackupOperationId) String

func (id LtrBackupOperationId) String() string

String returns a human-readable description of this Ltr Backup Operation ID

type LtrBackupOperationResponseProperties

type LtrBackupOperationResponseProperties struct {
	BackupMetadata         *string         `json:"backupMetadata,omitempty"`
	BackupName             *string         `json:"backupName,omitempty"`
	DataTransferredInBytes *int64          `json:"dataTransferredInBytes,omitempty"`
	DatasourceSizeInBytes  *int64          `json:"datasourceSizeInBytes,omitempty"`
	EndTime                *string         `json:"endTime,omitempty"`
	ErrorCode              *string         `json:"errorCode,omitempty"`
	ErrorMessage           *string         `json:"errorMessage,omitempty"`
	PercentComplete        *float64        `json:"percentComplete,omitempty"`
	StartTime              string          `json:"startTime"`
	Status                 ExecutionStatus `json:"status"`
}

func (*LtrBackupOperationResponseProperties) GetEndTimeAsTime

func (o *LtrBackupOperationResponseProperties) GetEndTimeAsTime() (*time.Time, error)

func (*LtrBackupOperationResponseProperties) GetStartTimeAsTime

func (o *LtrBackupOperationResponseProperties) GetStartTimeAsTime() (*time.Time, error)

func (*LtrBackupOperationResponseProperties) SetEndTimeAsTime

func (o *LtrBackupOperationResponseProperties) SetEndTimeAsTime(input time.Time)

func (*LtrBackupOperationResponseProperties) SetStartTimeAsTime

func (o *LtrBackupOperationResponseProperties) SetStartTimeAsTime(input time.Time)

type LtrBackupOperationsGetOperationResponse

type LtrBackupOperationsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LtrServerBackupOperation
}

type LtrBackupOperationsListByServerCompleteResult

type LtrBackupOperationsListByServerCompleteResult struct {
	Items []LtrServerBackupOperation
}

type LtrBackupOperationsListByServerOperationResponse

type LtrBackupOperationsListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LtrServerBackupOperation
}

type LtrBackupRequest

type LtrBackupRequest struct {
	BackupSettings BackupSettings     `json:"backupSettings"`
	TargetDetails  BackupStoreDetails `json:"targetDetails"`
}

type LtrBackupResponse

type LtrBackupResponse struct {
	Properties *LtrBackupOperationResponseProperties `json:"properties,omitempty"`
}

type LtrPreBackupResponse

type LtrPreBackupResponse struct {
	Properties LtrPreBackupResponseProperties `json:"properties"`
}

type LtrPreBackupResponseProperties

type LtrPreBackupResponseProperties struct {
	NumberOfContainers int64 `json:"numberOfContainers"`
}

type LtrServerBackupOperation

type LtrServerBackupOperation struct {
	Id         string                                `json:"id"`
	Name       string                                `json:"name"`
	Properties *LtrBackupOperationResponseProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                `json:"systemData,omitempty"`
	Type       *string                               `json:"type,omitempty"`
}

type LtrServerBackupOperationOperationPredicate

type LtrServerBackupOperationOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (LtrServerBackupOperationOperationPredicate) Matches

Jump to

Keyboard shortcuts

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