restorepoints

package
v0.20240826.1115152 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorepoints Documentation

The restorepoints SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-08-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorepoints"

Client Initialization

client := restorepoints.NewRestorePointsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RestorePointsClient.Create

ctx := context.TODO()
id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")

payload := restorepoints.CreateDatabaseRestorePointDefinition{
	// ...
}


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

Example Usage: RestorePointsClient.Delete

ctx := context.TODO()
id := restorepoints.NewRestorePointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "restorePointValue")

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: RestorePointsClient.Get

ctx := context.TODO()
id := restorepoints.NewRestorePointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "restorePointValue")

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: RestorePointsClient.ListByDatabase

ctx := context.TODO()
id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")

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

func PossibleValuesForRestorePointType() []string

func ValidateRestorePointID

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

ValidateRestorePointID checks that 'input' can be parsed as a Restore Point ID

Types

type CreateDatabaseRestorePointDefinition

type CreateDatabaseRestorePointDefinition struct {
	RestorePointLabel string `json:"restorePointLabel"`
}

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RestorePoint
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []RestorePoint
}

type ListByDatabaseCustomPager

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

type ListByDatabaseOperationResponse

type ListByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]RestorePoint
}

type RestorePoint

type RestorePoint struct {
	Id         *string                 `json:"id,omitempty"`
	Location   *string                 `json:"location,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties *RestorePointProperties `json:"properties,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type RestorePointId

type RestorePointId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	RestorePointName  string
}

RestorePointId is a struct representing the Resource ID for a Restore Point

func NewRestorePointID

func NewRestorePointID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, restorePointName string) RestorePointId

NewRestorePointID returns a new RestorePointId struct

func ParseRestorePointID

func ParseRestorePointID(input string) (*RestorePointId, error)

ParseRestorePointID parses 'input' into a RestorePointId

func ParseRestorePointIDInsensitively

func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error)

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

func (*RestorePointId) FromParseResult

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

func (RestorePointId) ID

func (id RestorePointId) ID() string

ID returns the formatted Restore Point ID

func (RestorePointId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Restore Point ID

func (RestorePointId) String

func (id RestorePointId) String() string

String returns a human-readable description of this Restore Point ID

type RestorePointOperationPredicate

type RestorePointOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (RestorePointOperationPredicate) Matches

type RestorePointProperties

type RestorePointProperties struct {
	EarliestRestoreDate      *string           `json:"earliestRestoreDate,omitempty"`
	RestorePointCreationDate *string           `json:"restorePointCreationDate,omitempty"`
	RestorePointLabel        *string           `json:"restorePointLabel,omitempty"`
	RestorePointType         *RestorePointType `json:"restorePointType,omitempty"`
}

func (*RestorePointProperties) GetEarliestRestoreDateAsTime

func (o *RestorePointProperties) GetEarliestRestoreDateAsTime() (*time.Time, error)

func (*RestorePointProperties) GetRestorePointCreationDateAsTime

func (o *RestorePointProperties) GetRestorePointCreationDateAsTime() (*time.Time, error)

func (*RestorePointProperties) SetEarliestRestoreDateAsTime

func (o *RestorePointProperties) SetEarliestRestoreDateAsTime(input time.Time)

func (*RestorePointProperties) SetRestorePointCreationDateAsTime

func (o *RestorePointProperties) SetRestorePointCreationDateAsTime(input time.Time)

type RestorePointType

type RestorePointType string
const (
	RestorePointTypeCONTINUOUS RestorePointType = "CONTINUOUS"
	RestorePointTypeDISCRETE   RestorePointType = "DISCRETE"
)

func (*RestorePointType) UnmarshalJSON

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

type RestorePointsClient

type RestorePointsClient struct {
	Client *resourcemanager.Client
}

func NewRestorePointsClientWithBaseURI

func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error)

func (RestorePointsClient) Create

Create ...

func (RestorePointsClient) CreateThenPoll

CreateThenPoll performs Create then polls until it's completed

func (RestorePointsClient) Delete

Delete ...

func (RestorePointsClient) Get

Get ...

func (RestorePointsClient) ListByDatabase

ListByDatabase ...

func (RestorePointsClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (RestorePointsClient) ListByDatabaseCompleteMatchingPredicate

func (c RestorePointsClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlDatabaseId, predicate RestorePointOperationPredicate) (result ListByDatabaseCompleteResult, err error)

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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