backups

package
v0.20231023.1152718 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups Documentation

The backups SDK allows for interaction with the Azure Resource Manager Service mysql (API Version 2022-01-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/mysql/2022-01-01/backups"

Client Initialization

client := backups.NewBackupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BackupsClient.Get

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

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: BackupsClient.ListByServer

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

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

Example Usage: BackupsClient.Put

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

read, err := client.Put(ctx, id)
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 ValidateBackupID

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

ValidateBackupID checks that 'input' can be parsed as a Backup 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 BackupId

type BackupId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
	BackupName         string
}

BackupId is a struct representing the Resource ID for a Backup

func NewBackupID

func NewBackupID(subscriptionId string, resourceGroupName string, flexibleServerName string, backupName string) BackupId

NewBackupID returns a new BackupId struct

func ParseBackupID

func ParseBackupID(input string) (*BackupId, error)

ParseBackupID parses 'input' into a BackupId

func ParseBackupIDInsensitively

func ParseBackupIDInsensitively(input string) (*BackupId, error)

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

func (BackupId) ID

func (id BackupId) ID() string

ID returns the formatted Backup ID

func (BackupId) Segments

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

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

func (BackupId) String

func (id BackupId) String() string

String returns a human-readable description of this Backup ID

type BackupsClient

type BackupsClient struct {
	Client *resourcemanager.Client
}

func NewBackupsClientWithBaseURI

func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error)

func (BackupsClient) Get

func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperationResponse, err error)

Get ...

func (BackupsClient) ListByServer

func (c BackupsClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error)

ListByServer ...

func (BackupsClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (BackupsClient) ListByServerCompleteMatchingPredicate

func (c BackupsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ServerBackupOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BackupsClient) Put

func (c BackupsClient) Put(ctx context.Context, id BackupId) (result PutOperationResponse, err error)

Put ...

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) 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 GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerBackup
}

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []ServerBackup
}

type ListByServerOperationResponse

type ListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ServerBackup
}

type PutOperationResponse

type PutOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerBackup
}

type ServerBackup

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

type ServerBackupOperationPredicate

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

func (ServerBackupOperationPredicate) Matches

type ServerBackupProperties

type ServerBackupProperties struct {
	BackupType    *string `json:"backupType,omitempty"`
	CompletedTime *string `json:"completedTime,omitempty"`
	Source        *string `json:"source,omitempty"`
}

func (*ServerBackupProperties) GetCompletedTimeAsTime

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

func (*ServerBackupProperties) SetCompletedTimeAsTime

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

Jump to

Keyboard shortcuts

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