recoverabledatabases

package
v0.20240322.1155759 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

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

The recoverabledatabases SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-02-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-02-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 := commonids.NewSqlServerID("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

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 {
	LatestHttpResponse *http.Response
	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) FromParseResult

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

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(sdkApi sdkEnv.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 commonids.SqlServerId, predicate RecoverableDatabaseOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate 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