recoverabledatabases

package
v0.20230530.1105843 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2022-11-01-preview/recoverabledatabases Documentation

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

Client Initialization

client := recoverabledatabases.NewRecoverableDatabasesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RecoverableDatabasesClient.Get

ctx := context.TODO()
id := recoverabledatabases.NewRecoverableDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "recoverableDatabaseValue")

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

Example Usage: RecoverableDatabasesClient.ListByServer

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

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDatabaseKeyType

func PossibleValuesForDatabaseKeyType() []string

func ValidateRecoverableDatabaseID

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

ValidateRecoverableDatabaseID checks that 'input' can be parsed as a Recoverable Database ID

func ValidateServerID

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

ValidateServerID checks that 'input' can be parsed as a Server ID

Types

type DatabaseKey

type DatabaseKey struct {
	CreationDate *string          `json:"creationDate,omitempty"`
	Subregion    *string          `json:"subregion,omitempty"`
	Thumbprint   *string          `json:"thumbprint,omitempty"`
	Type         *DatabaseKeyType `json:"type,omitempty"`
}

func (*DatabaseKey) GetCreationDateAsTime

func (o *DatabaseKey) GetCreationDateAsTime() (*time.Time, error)

func (*DatabaseKey) SetCreationDateAsTime

func (o *DatabaseKey) SetCreationDateAsTime(input time.Time)

type DatabaseKeyType

type DatabaseKeyType string
const (
	DatabaseKeyTypeAzureKeyVault DatabaseKeyType = "AzureKeyVault"
)

func (*DatabaseKeyType) UnmarshalJSON

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
	Filter *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []RecoverableDatabase
}

type ListByServerOperationResponse

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

type RecoverableDatabase

type RecoverableDatabase struct {
	Id         *string                        `json:"id,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *RecoverableDatabaseProperties `json:"properties,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type RecoverableDatabaseId

type RecoverableDatabaseId struct {
	SubscriptionId          string
	ResourceGroupName       string
	ServerName              string
	RecoverableDatabaseName string
}

RecoverableDatabaseId is a struct representing the Resource ID for a Recoverable Database

func NewRecoverableDatabaseID

func NewRecoverableDatabaseID(subscriptionId string, resourceGroupName string, serverName string, recoverableDatabaseName string) RecoverableDatabaseId

NewRecoverableDatabaseID returns a new RecoverableDatabaseId struct

func ParseRecoverableDatabaseID

func ParseRecoverableDatabaseID(input string) (*RecoverableDatabaseId, error)

ParseRecoverableDatabaseID parses 'input' into a RecoverableDatabaseId

func ParseRecoverableDatabaseIDInsensitively

func ParseRecoverableDatabaseIDInsensitively(input string) (*RecoverableDatabaseId, error)

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

func (RecoverableDatabaseId) ID

func (id RecoverableDatabaseId) ID() string

ID returns the formatted Recoverable Database ID

func (RecoverableDatabaseId) Segments

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

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

func (RecoverableDatabaseId) String

func (id RecoverableDatabaseId) String() string

String returns a human-readable description of this Recoverable Database ID

type RecoverableDatabaseOperationPredicate

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

func (RecoverableDatabaseOperationPredicate) Matches

type RecoverableDatabaseProperties

type RecoverableDatabaseProperties struct {
	Edition                 *string                 `json:"edition,omitempty"`
	ElasticPoolName         *string                 `json:"elasticPoolName,omitempty"`
	Keys                    *map[string]DatabaseKey `json:"keys,omitempty"`
	LastAvailableBackupDate *string                 `json:"lastAvailableBackupDate,omitempty"`
	ServiceLevelObjective   *string                 `json:"serviceLevelObjective,omitempty"`
}

func (*RecoverableDatabaseProperties) GetLastAvailableBackupDateAsTime

func (o *RecoverableDatabaseProperties) GetLastAvailableBackupDateAsTime() (*time.Time, error)

func (*RecoverableDatabaseProperties) SetLastAvailableBackupDateAsTime

func (o *RecoverableDatabaseProperties) SetLastAvailableBackupDateAsTime(input time.Time)

type RecoverableDatabasesClient

type RecoverableDatabasesClient struct {
	Client *resourcemanager.Client
}

func NewRecoverableDatabasesClientWithBaseURI

func NewRecoverableDatabasesClientWithBaseURI(api environments.Api) (*RecoverableDatabasesClient, error)

func (RecoverableDatabasesClient) Get

Get ...

func (RecoverableDatabasesClient) ListByServer

ListByServer ...

func (RecoverableDatabasesClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (RecoverableDatabasesClient) ListByServerCompleteMatchingPredicate

func (c RecoverableDatabasesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate RecoverableDatabaseOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ServerId

type ServerId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
}

ServerId is a struct representing the Resource ID for a Server

func NewServerID

func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId

NewServerID returns a new ServerId struct

func ParseServerID

func ParseServerID(input string) (*ServerId, error)

ParseServerID parses 'input' into a ServerId

func ParseServerIDInsensitively

func ParseServerIDInsensitively(input string) (*ServerId, error)

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

func (ServerId) ID

func (id ServerId) ID() string

ID returns the formatted Server ID

func (ServerId) Segments

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

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

func (ServerId) String

func (id ServerId) String() string

String returns a human-readable description of this Server ID

Jump to

Keyboard shortcuts

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