manageddatabases

package
v0.20230717.1131407 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

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

The manageddatabases 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/manageddatabases"

Client Initialization

client := manageddatabases.NewManagedDatabasesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedDatabasesClient.CompleteRestore

ctx := context.TODO()
id := manageddatabases.NewManagedDatabaseRestoreAzureAsyncOperationID("12345678-1234-9876-4563-123456789012", "locationValue", "operationIdValue")

payload := manageddatabases.CompleteDatabaseRestoreDefinition{
	// ...
}


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

Example Usage: ManagedDatabasesClient.CreateOrUpdate

ctx := context.TODO()
id := manageddatabases.NewManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

payload := manageddatabases.ManagedDatabase{
	// ...
}


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

Example Usage: ManagedDatabasesClient.Delete

ctx := context.TODO()
id := manageddatabases.NewManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

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

Example Usage: ManagedDatabasesClient.Get

ctx := context.TODO()
id := manageddatabases.NewManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

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: ManagedDatabasesClient.ListByInstance

ctx := context.TODO()
id := manageddatabases.NewManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue")

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

Example Usage: ManagedDatabasesClient.Update

ctx := context.TODO()
id := manageddatabases.NewManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

payload := manageddatabases.ManagedDatabaseUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCatalogCollationType

func PossibleValuesForCatalogCollationType() []string

func PossibleValuesForManagedDatabaseCreateMode

func PossibleValuesForManagedDatabaseCreateMode() []string

func PossibleValuesForManagedDatabaseStatus

func PossibleValuesForManagedDatabaseStatus() []string

func ValidateManagedDatabaseRestoreAzureAsyncOperationID

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

ValidateManagedDatabaseRestoreAzureAsyncOperationID checks that 'input' can be parsed as a Managed Database Restore Azure Async Operation ID

func ValidateManagedInstanceDatabaseID

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

ValidateManagedInstanceDatabaseID checks that 'input' can be parsed as a Managed Instance Database ID

func ValidateManagedInstanceID

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

ValidateManagedInstanceID checks that 'input' can be parsed as a Managed Instance ID

Types

type CatalogCollationType

type CatalogCollationType string
const (
	CatalogCollationTypeDATABASEDEFAULT             CatalogCollationType = "DATABASE_DEFAULT"
	CatalogCollationTypeSQLLatinOneGeneralCPOneCIAS CatalogCollationType = "SQL_Latin1_General_CP1_CI_AS"
)

func (*CatalogCollationType) UnmarshalJSON

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

type CompleteDatabaseRestoreDefinition

type CompleteDatabaseRestoreDefinition struct {
	LastBackupName string `json:"lastBackupName"`
}

type CompleteRestoreOperationResponse

type CompleteRestoreOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByInstanceCompleteResult

type ListByInstanceCompleteResult struct {
	Items []ManagedDatabase
}

type ListByInstanceOperationResponse

type ListByInstanceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedDatabase
}

type ManagedDatabase

type ManagedDatabase struct {
	Id         *string                    `json:"id,omitempty"`
	Location   string                     `json:"location"`
	Name       *string                    `json:"name,omitempty"`
	Properties *ManagedDatabaseProperties `json:"properties,omitempty"`
	Tags       *map[string]string         `json:"tags,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type ManagedDatabaseCreateMode

type ManagedDatabaseCreateMode string
const (
	ManagedDatabaseCreateModeDefault                        ManagedDatabaseCreateMode = "Default"
	ManagedDatabaseCreateModePointInTimeRestore             ManagedDatabaseCreateMode = "PointInTimeRestore"
	ManagedDatabaseCreateModeRecovery                       ManagedDatabaseCreateMode = "Recovery"
	ManagedDatabaseCreateModeRestoreExternalBackup          ManagedDatabaseCreateMode = "RestoreExternalBackup"
	ManagedDatabaseCreateModeRestoreLongTermRetentionBackup ManagedDatabaseCreateMode = "RestoreLongTermRetentionBackup"
)

func (*ManagedDatabaseCreateMode) UnmarshalJSON

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

type ManagedDatabaseOperationPredicate

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

func (ManagedDatabaseOperationPredicate) Matches

type ManagedDatabaseProperties

type ManagedDatabaseProperties struct {
	CatalogCollation                  *CatalogCollationType      `json:"catalogCollation,omitempty"`
	Collation                         *string                    `json:"collation,omitempty"`
	CreateMode                        *ManagedDatabaseCreateMode `json:"createMode,omitempty"`
	CreationDate                      *string                    `json:"creationDate,omitempty"`
	DefaultSecondaryLocation          *string                    `json:"defaultSecondaryLocation,omitempty"`
	EarliestRestorePoint              *string                    `json:"earliestRestorePoint,omitempty"`
	FailoverGroupId                   *string                    `json:"failoverGroupId,omitempty"`
	LongTermRetentionBackupResourceId *string                    `json:"longTermRetentionBackupResourceId,omitempty"`
	RecoverableDatabaseId             *string                    `json:"recoverableDatabaseId,omitempty"`
	RestorableDroppedDatabaseId       *string                    `json:"restorableDroppedDatabaseId,omitempty"`
	RestorePointInTime                *string                    `json:"restorePointInTime,omitempty"`
	SourceDatabaseId                  *string                    `json:"sourceDatabaseId,omitempty"`
	Status                            *ManagedDatabaseStatus     `json:"status,omitempty"`
	StorageContainerSasToken          *string                    `json:"storageContainerSasToken,omitempty"`
	StorageContainerUri               *string                    `json:"storageContainerUri,omitempty"`
}

func (*ManagedDatabaseProperties) GetCreationDateAsTime

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

func (*ManagedDatabaseProperties) GetEarliestRestorePointAsTime

func (o *ManagedDatabaseProperties) GetEarliestRestorePointAsTime() (*time.Time, error)

func (*ManagedDatabaseProperties) GetRestorePointInTimeAsTime

func (o *ManagedDatabaseProperties) GetRestorePointInTimeAsTime() (*time.Time, error)

func (*ManagedDatabaseProperties) SetCreationDateAsTime

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

func (*ManagedDatabaseProperties) SetEarliestRestorePointAsTime

func (o *ManagedDatabaseProperties) SetEarliestRestorePointAsTime(input time.Time)

func (*ManagedDatabaseProperties) SetRestorePointInTimeAsTime

func (o *ManagedDatabaseProperties) SetRestorePointInTimeAsTime(input time.Time)

type ManagedDatabaseRestoreAzureAsyncOperationId

type ManagedDatabaseRestoreAzureAsyncOperationId struct {
	SubscriptionId string
	LocationName   string
	OperationId    string
}

ManagedDatabaseRestoreAzureAsyncOperationId is a struct representing the Resource ID for a Managed Database Restore Azure Async Operation

func NewManagedDatabaseRestoreAzureAsyncOperationID

func NewManagedDatabaseRestoreAzureAsyncOperationID(subscriptionId string, locationName string, operationId string) ManagedDatabaseRestoreAzureAsyncOperationId

NewManagedDatabaseRestoreAzureAsyncOperationID returns a new ManagedDatabaseRestoreAzureAsyncOperationId struct

func ParseManagedDatabaseRestoreAzureAsyncOperationID

func ParseManagedDatabaseRestoreAzureAsyncOperationID(input string) (*ManagedDatabaseRestoreAzureAsyncOperationId, error)

ParseManagedDatabaseRestoreAzureAsyncOperationID parses 'input' into a ManagedDatabaseRestoreAzureAsyncOperationId

func ParseManagedDatabaseRestoreAzureAsyncOperationIDInsensitively

func ParseManagedDatabaseRestoreAzureAsyncOperationIDInsensitively(input string) (*ManagedDatabaseRestoreAzureAsyncOperationId, error)

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

func (ManagedDatabaseRestoreAzureAsyncOperationId) ID

ID returns the formatted Managed Database Restore Azure Async Operation ID

func (ManagedDatabaseRestoreAzureAsyncOperationId) Segments

Segments returns a slice of Resource ID Segments which comprise this Managed Database Restore Azure Async Operation ID

func (ManagedDatabaseRestoreAzureAsyncOperationId) String

String returns a human-readable description of this Managed Database Restore Azure Async Operation ID

type ManagedDatabaseStatus

type ManagedDatabaseStatus string
const (
	ManagedDatabaseStatusCreating     ManagedDatabaseStatus = "Creating"
	ManagedDatabaseStatusInaccessible ManagedDatabaseStatus = "Inaccessible"
	ManagedDatabaseStatusOffline      ManagedDatabaseStatus = "Offline"
	ManagedDatabaseStatusOnline       ManagedDatabaseStatus = "Online"
	ManagedDatabaseStatusRestoring    ManagedDatabaseStatus = "Restoring"
	ManagedDatabaseStatusShutdown     ManagedDatabaseStatus = "Shutdown"
	ManagedDatabaseStatusUpdating     ManagedDatabaseStatus = "Updating"
)

func (*ManagedDatabaseStatus) UnmarshalJSON

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

type ManagedDatabaseUpdate

type ManagedDatabaseUpdate struct {
	Properties *ManagedDatabaseProperties `json:"properties,omitempty"`
	Tags       *map[string]string         `json:"tags,omitempty"`
}

type ManagedDatabasesClient

type ManagedDatabasesClient struct {
	Client *resourcemanager.Client
}

func NewManagedDatabasesClientWithBaseURI

func NewManagedDatabasesClientWithBaseURI(api environments.Api) (*ManagedDatabasesClient, error)

func (ManagedDatabasesClient) CompleteRestore

CompleteRestore ...

func (ManagedDatabasesClient) CompleteRestoreThenPoll

CompleteRestoreThenPoll performs CompleteRestore then polls until it's completed

func (ManagedDatabasesClient) CreateOrUpdate

CreateOrUpdate ...

func (ManagedDatabasesClient) CreateOrUpdateThenPoll

func (c ManagedDatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id ManagedInstanceDatabaseId, input ManagedDatabase) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ManagedDatabasesClient) Delete

Delete ...

func (ManagedDatabasesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ManagedDatabasesClient) Get

Get ...

func (ManagedDatabasesClient) ListByInstance

ListByInstance ...

func (ManagedDatabasesClient) ListByInstanceComplete

ListByInstanceComplete retrieves all the results into a single object

func (ManagedDatabasesClient) ListByInstanceCompleteMatchingPredicate

func (c ManagedDatabasesClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id ManagedInstanceId, predicate ManagedDatabaseOperationPredicate) (result ListByInstanceCompleteResult, err error)

ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedDatabasesClient) Update

Update ...

func (ManagedDatabasesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type ManagedInstanceDatabaseId

type ManagedInstanceDatabaseId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ManagedInstanceName string
	DatabaseName        string
}

ManagedInstanceDatabaseId is a struct representing the Resource ID for a Managed Instance Database

func NewManagedInstanceDatabaseID

func NewManagedInstanceDatabaseID(subscriptionId string, resourceGroupName string, managedInstanceName string, databaseName string) ManagedInstanceDatabaseId

NewManagedInstanceDatabaseID returns a new ManagedInstanceDatabaseId struct

func ParseManagedInstanceDatabaseID

func ParseManagedInstanceDatabaseID(input string) (*ManagedInstanceDatabaseId, error)

ParseManagedInstanceDatabaseID parses 'input' into a ManagedInstanceDatabaseId

func ParseManagedInstanceDatabaseIDInsensitively

func ParseManagedInstanceDatabaseIDInsensitively(input string) (*ManagedInstanceDatabaseId, error)

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

func (ManagedInstanceDatabaseId) ID

ID returns the formatted Managed Instance Database ID

func (ManagedInstanceDatabaseId) Segments

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

func (ManagedInstanceDatabaseId) String

func (id ManagedInstanceDatabaseId) String() string

String returns a human-readable description of this Managed Instance Database ID

type ManagedInstanceId

type ManagedInstanceId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ManagedInstanceName string
}

ManagedInstanceId is a struct representing the Resource ID for a Managed Instance

func NewManagedInstanceID

func NewManagedInstanceID(subscriptionId string, resourceGroupName string, managedInstanceName string) ManagedInstanceId

NewManagedInstanceID returns a new ManagedInstanceId struct

func ParseManagedInstanceID

func ParseManagedInstanceID(input string) (*ManagedInstanceId, error)

ParseManagedInstanceID parses 'input' into a ManagedInstanceId

func ParseManagedInstanceIDInsensitively

func ParseManagedInstanceIDInsensitively(input string) (*ManagedInstanceId, error)

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

func (ManagedInstanceId) ID

func (id ManagedInstanceId) ID() string

ID returns the formatted Managed Instance ID

func (ManagedInstanceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Managed Instance ID

func (ManagedInstanceId) String

func (id ManagedInstanceId) String() string

String returns a human-readable description of this Managed Instance ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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