README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/databases
Documentation
The databases
SDK allows for interaction with the Azure Resource Manager Service mariadb
(API Version 2018-06-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/mariadb/2018-06-01-preview/databases"
Client Initialization
client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: DatabasesClient.CreateOrUpdate
ctx := context.TODO()
id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")
payload := databases.Database{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: DatabasesClient.Delete
ctx := context.TODO()
id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: DatabasesClient.Get
ctx := context.TODO()
id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "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: DatabasesClient.ListByServer
ctx := context.TODO()
id := databases.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue")
read, err := client.ListByServer(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateServerID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type Database
- type DatabaseId
- type DatabaseListResult
- type DatabaseProperties
- type DatabasesClient
- func (c DatabasesClient) CreateOrUpdate(ctx context.Context, id DatabaseId, input Database) (result CreateOrUpdateOperationResponse, err error)
- func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DatabaseId, input Database) error
- func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result DeleteOperationResponse, err error)
- func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) error
- func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOperationResponse, err error)
- func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error)
- type DeleteOperationResponse
- type GetOperationResponse
- type ListByServerOperationResponse
- type ServerId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDatabaseID ¶
ValidateDatabaseID checks that 'input' can be parsed as a Database ID
func ValidateServerID ¶
ValidateServerID checks that 'input' can be parsed as a Server ID
Types ¶
type Database ¶
type Database struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *DatabaseProperties `json:"properties,omitempty"` Type *string `json:"type,omitempty"` }
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) FromParseResult ¶ added in v0.20231127.1171502
func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error
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 DatabaseListResult ¶
type DatabaseListResult struct {
Value *[]Database `json:"value,omitempty"`
}
type DatabaseProperties ¶
type DatabasesClient ¶
type DatabasesClient struct {
Client *resourcemanager.Client
}
func NewDatabasesClientWithBaseURI ¶
func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error)
func (DatabasesClient) CreateOrUpdate ¶
func (c DatabasesClient) CreateOrUpdate(ctx context.Context, id DatabaseId, input Database) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (DatabasesClient) CreateOrUpdateThenPoll ¶
func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DatabaseId, input Database) error
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (DatabasesClient) Delete ¶
func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result DeleteOperationResponse, err error)
Delete ...
func (DatabasesClient) DeleteThenPoll ¶
func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) error
DeleteThenPoll performs Delete then polls until it's completed
func (DatabasesClient) Get ¶
func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOperationResponse, err error)
Get ...
func (DatabasesClient) ListByServer ¶
func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error)
ListByServer ...
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type ListByServerOperationResponse ¶
type ListByServerOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *DatabaseListResult }
type ServerId ¶
ServerId is a struct representing the Resource ID for a Server
func NewServerID ¶
NewServerID returns a new ServerId struct
func ParseServerID ¶
ParseServerID parses 'input' into a ServerId
func ParseServerIDInsensitively ¶
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) FromParseResult ¶ added in v0.20231127.1171502
func (id *ServerId) FromParseResult(input resourceids.ParseResult) error
func (ServerId) Segments ¶
func (id ServerId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Server ID