backupsv2

package
v0.20240815.1003113 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2 Documentation

The backupsv2 SDK allows for interaction with the Azure Resource Manager Service mysql (API Version 2023-12-30).

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/mysql/2023-12-30/backupsv2"

Client Initialization

client := backupsv2.NewBackupsV2ClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BackupsV2Client.LongRunningBackupCreate

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

payload := backupsv2.ServerBackupV2{
	// ...
}


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

Example Usage: BackupsV2Client.LongRunningBackupsGet

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

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

Example Usage: BackupsV2Client.LongRunningBackupsList

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

// alternatively `client.LongRunningBackupsList(ctx, id)` can be used to do batched pagination
items, err := client.LongRunningBackupsListComplete(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 PossibleValuesForBackupType

func PossibleValuesForBackupType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateBackupsV2ID

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

ValidateBackupsV2ID checks that 'input' can be parsed as a Backups V 2 ID

func ValidateFlexibleServerID

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

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

Types

type BackupType

type BackupType string
const (
	BackupTypeFULL BackupType = "FULL"
)

func (*BackupType) UnmarshalJSON

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

type BackupsV2Client

type BackupsV2Client struct {
	Client *resourcemanager.Client
}

func NewBackupsV2ClientWithBaseURI

func NewBackupsV2ClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsV2Client, error)

func (BackupsV2Client) LongRunningBackupCreate

func (c BackupsV2Client) LongRunningBackupCreate(ctx context.Context, id BackupsV2Id, input ServerBackupV2) (result LongRunningBackupCreateOperationResponse, err error)

LongRunningBackupCreate ...

func (BackupsV2Client) LongRunningBackupCreateThenPoll

func (c BackupsV2Client) LongRunningBackupCreateThenPoll(ctx context.Context, id BackupsV2Id, input ServerBackupV2) error

LongRunningBackupCreateThenPoll performs LongRunningBackupCreate then polls until it's completed

func (BackupsV2Client) LongRunningBackupsGet

func (c BackupsV2Client) LongRunningBackupsGet(ctx context.Context, id BackupsV2Id) (result LongRunningBackupsGetOperationResponse, err error)

LongRunningBackupsGet ...

func (BackupsV2Client) LongRunningBackupsList

func (c BackupsV2Client) LongRunningBackupsList(ctx context.Context, id FlexibleServerId) (result LongRunningBackupsListOperationResponse, err error)

LongRunningBackupsList ...

func (BackupsV2Client) LongRunningBackupsListComplete

func (c BackupsV2Client) LongRunningBackupsListComplete(ctx context.Context, id FlexibleServerId) (LongRunningBackupsListCompleteResult, error)

LongRunningBackupsListComplete retrieves all the results into a single object

func (BackupsV2Client) LongRunningBackupsListCompleteMatchingPredicate

func (c BackupsV2Client) LongRunningBackupsListCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ServerBackupV2OperationPredicate) (result LongRunningBackupsListCompleteResult, err error)

LongRunningBackupsListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type BackupsV2Id

type BackupsV2Id struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
	BackupsV2Name      string
}

BackupsV2Id is a struct representing the Resource ID for a Backups V 2

func NewBackupsV2ID

func NewBackupsV2ID(subscriptionId string, resourceGroupName string, flexibleServerName string, backupsV2Name string) BackupsV2Id

NewBackupsV2ID returns a new BackupsV2Id struct

func ParseBackupsV2ID

func ParseBackupsV2ID(input string) (*BackupsV2Id, error)

ParseBackupsV2ID parses 'input' into a BackupsV2Id

func ParseBackupsV2IDInsensitively

func ParseBackupsV2IDInsensitively(input string) (*BackupsV2Id, error)

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

func (*BackupsV2Id) FromParseResult

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

func (BackupsV2Id) ID

func (id BackupsV2Id) ID() string

ID returns the formatted Backups V 2 ID

func (BackupsV2Id) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Backups V 2 ID

func (BackupsV2Id) String

func (id BackupsV2Id) String() string

String returns a human-readable description of this Backups V 2 ID

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

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 LongRunningBackupCreateOperationResponse

type LongRunningBackupCreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerBackupV2
}

type LongRunningBackupsGetOperationResponse

type LongRunningBackupsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerBackupV2
}

type LongRunningBackupsListCompleteResult

type LongRunningBackupsListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ServerBackupV2
}

type LongRunningBackupsListCustomPager added in v0.20240628.1153531

type LongRunningBackupsListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *LongRunningBackupsListCustomPager) NextPageLink() *odata.Link

type LongRunningBackupsListOperationResponse

type LongRunningBackupsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ServerBackupV2
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type ServerBackupPropertiesV2

type ServerBackupPropertiesV2 struct {
	BackupNameV2      *string            `json:"backupNameV2,omitempty"`
	BackupType        *BackupType        `json:"backupType,omitempty"`
	CompletedTime     *string            `json:"completedTime,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Source            *string            `json:"source,omitempty"`
}

func (*ServerBackupPropertiesV2) GetCompletedTimeAsTime

func (o *ServerBackupPropertiesV2) GetCompletedTimeAsTime() (*time.Time, error)

func (*ServerBackupPropertiesV2) SetCompletedTimeAsTime

func (o *ServerBackupPropertiesV2) SetCompletedTimeAsTime(input time.Time)

type ServerBackupV2

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

type ServerBackupV2OperationPredicate

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

func (ServerBackupV2OperationPredicate) Matches

Jump to

Keyboard shortcuts

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