restorepoints

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: 13 Imported by: 0

README

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

The restorepoints SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2017-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/sql/2017-03-01-preview/restorepoints"

Client Initialization

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

Example Usage: RestorePointsClient.Create

ctx := context.TODO()
id := restorepoints.NewDatabaseID("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 := restorepoints.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")

read, err := client.ListByDatabase(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 PossibleValuesForRestorePointType

func PossibleValuesForRestorePointType() []string

func ValidateDatabaseID

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

ValidateDatabaseID checks that 'input' can be parsed as a Database ID

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
}

type DatabaseId

type DatabaseId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
}

DatabaseId is a struct representing the Resource ID for a Database

func NewDatabaseID

func NewDatabaseID(subscriptionId string, resourceGroupName string, serverName string, databaseName string) DatabaseId

NewDatabaseID returns a new DatabaseId struct

func ParseDatabaseID

func ParseDatabaseID(input string) (*DatabaseId, error)

ParseDatabaseID parses 'input' into a DatabaseId

func ParseDatabaseIDInsensitively

func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error)

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

func (DatabaseId) ID

func (id DatabaseId) ID() string

ID returns the formatted Database ID

func (DatabaseId) Segments

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

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

func (DatabaseId) String

func (id DatabaseId) String() string

String returns a human-readable description of this Database ID

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 ListByDatabaseOperationResponse

type ListByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RestorePointListResult
}

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

type RestorePointListResult struct {
	NextLink *string         `json:"nextLink,omitempty"`
	Value    *[]RestorePoint `json:"value,omitempty"`
}

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

func (c RestorePointsClient) ListByDatabase(ctx context.Context, id DatabaseId) (result ListByDatabaseOperationResponse, err error)

ListByDatabase ...

Jump to

Keyboard shortcuts

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