elasticpools

package
v0.20231024.1145744 Latest Latest
Warning

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

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

README

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

The elasticpools SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-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-sdk/resource-manager/sql/2021-02-01-preview/elasticpools"

Client Initialization

client := elasticpools.NewElasticPoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ElasticPoolsClient.CreateOrUpdate

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

payload := elasticpools.ElasticPool{
	// ...
}


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

Example Usage: ElasticPoolsClient.Delete

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

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

Example Usage: ElasticPoolsClient.Failover

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

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

Example Usage: ElasticPoolsClient.Get

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

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: ElasticPoolsClient.ListByServer

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

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

Example Usage: ElasticPoolsClient.Update

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

payload := elasticpools.ElasticPoolUpdate{
	// ...
}


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 PossibleValuesForElasticPoolLicenseType

func PossibleValuesForElasticPoolLicenseType() []string

func PossibleValuesForElasticPoolState

func PossibleValuesForElasticPoolState() []string

func ValidateElasticPoolID

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

ValidateElasticPoolID checks that 'input' can be parsed as a Elastic Pool 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 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 ElasticPool

type ElasticPool struct {
	Id         *string                `json:"id,omitempty"`
	Kind       *string                `json:"kind,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *ElasticPoolProperties `json:"properties,omitempty"`
	Sku        *Sku                   `json:"sku,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ElasticPoolId

type ElasticPoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	ElasticPoolName   string
}

ElasticPoolId is a struct representing the Resource ID for a Elastic Pool

func NewElasticPoolID

func NewElasticPoolID(subscriptionId string, resourceGroupName string, serverName string, elasticPoolName string) ElasticPoolId

NewElasticPoolID returns a new ElasticPoolId struct

func ParseElasticPoolID

func ParseElasticPoolID(input string) (*ElasticPoolId, error)

ParseElasticPoolID parses 'input' into a ElasticPoolId

func ParseElasticPoolIDInsensitively

func ParseElasticPoolIDInsensitively(input string) (*ElasticPoolId, error)

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

func (ElasticPoolId) ID

func (id ElasticPoolId) ID() string

ID returns the formatted Elastic Pool ID

func (ElasticPoolId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Elastic Pool ID

func (ElasticPoolId) String

func (id ElasticPoolId) String() string

String returns a human-readable description of this Elastic Pool ID

type ElasticPoolLicenseType

type ElasticPoolLicenseType string
const (
	ElasticPoolLicenseTypeBasePrice       ElasticPoolLicenseType = "BasePrice"
	ElasticPoolLicenseTypeLicenseIncluded ElasticPoolLicenseType = "LicenseIncluded"
)

func (*ElasticPoolLicenseType) UnmarshalJSON

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

type ElasticPoolOperationPredicate

type ElasticPoolOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (ElasticPoolOperationPredicate) Matches

type ElasticPoolPerDatabaseSettings

type ElasticPoolPerDatabaseSettings struct {
	MaxCapacity *float64 `json:"maxCapacity,omitempty"`
	MinCapacity *float64 `json:"minCapacity,omitempty"`
}

type ElasticPoolProperties

type ElasticPoolProperties struct {
	CreationDate               *string                         `json:"creationDate,omitempty"`
	LicenseType                *ElasticPoolLicenseType         `json:"licenseType,omitempty"`
	MaintenanceConfigurationId *string                         `json:"maintenanceConfigurationId,omitempty"`
	MaxSizeBytes               *int64                          `json:"maxSizeBytes,omitempty"`
	PerDatabaseSettings        *ElasticPoolPerDatabaseSettings `json:"perDatabaseSettings,omitempty"`
	State                      *ElasticPoolState               `json:"state,omitempty"`
	ZoneRedundant              *bool                           `json:"zoneRedundant,omitempty"`
}

func (*ElasticPoolProperties) GetCreationDateAsTime

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

func (*ElasticPoolProperties) SetCreationDateAsTime

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

type ElasticPoolState

type ElasticPoolState string
const (
	ElasticPoolStateCreating ElasticPoolState = "Creating"
	ElasticPoolStateDisabled ElasticPoolState = "Disabled"
	ElasticPoolStateReady    ElasticPoolState = "Ready"
)

func (*ElasticPoolState) UnmarshalJSON

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

type ElasticPoolUpdate

type ElasticPoolUpdate struct {
	Properties *ElasticPoolUpdateProperties `json:"properties,omitempty"`
	Sku        *Sku                         `json:"sku,omitempty"`
	Tags       *map[string]string           `json:"tags,omitempty"`
}

type ElasticPoolUpdateProperties

type ElasticPoolUpdateProperties struct {
	LicenseType                *ElasticPoolLicenseType         `json:"licenseType,omitempty"`
	MaintenanceConfigurationId *string                         `json:"maintenanceConfigurationId,omitempty"`
	MaxSizeBytes               *int64                          `json:"maxSizeBytes,omitempty"`
	PerDatabaseSettings        *ElasticPoolPerDatabaseSettings `json:"perDatabaseSettings,omitempty"`
	ZoneRedundant              *bool                           `json:"zoneRedundant,omitempty"`
}

type ElasticPoolsClient

type ElasticPoolsClient struct {
	Client *resourcemanager.Client
}

func NewElasticPoolsClientWithBaseURI

func NewElasticPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticPoolsClient, error)

func (ElasticPoolsClient) CreateOrUpdate

func (c ElasticPoolsClient) CreateOrUpdate(ctx context.Context, id ElasticPoolId, input ElasticPool) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ElasticPoolsClient) CreateOrUpdateThenPoll

func (c ElasticPoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id ElasticPoolId, input ElasticPool) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ElasticPoolsClient) Delete

Delete ...

func (ElasticPoolsClient) DeleteThenPoll

func (c ElasticPoolsClient) DeleteThenPoll(ctx context.Context, id ElasticPoolId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ElasticPoolsClient) Failover

Failover ...

func (ElasticPoolsClient) FailoverThenPoll

func (c ElasticPoolsClient) FailoverThenPoll(ctx context.Context, id ElasticPoolId) error

FailoverThenPoll performs Failover then polls until it's completed

func (ElasticPoolsClient) Get

Get ...

func (ElasticPoolsClient) ListByServer

ListByServer ...

func (ElasticPoolsClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (ElasticPoolsClient) ListByServerCompleteMatchingPredicate

func (c ElasticPoolsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, options ListByServerOperationOptions, predicate ElasticPoolOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ElasticPoolsClient) Update

Update ...

func (ElasticPoolsClient) UpdateThenPoll

func (c ElasticPoolsClient) UpdateThenPoll(ctx context.Context, id ElasticPoolId, input ElasticPoolUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type FailoverOperationResponse

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

type GetOperationResponse

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

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []ElasticPool
}

type ListByServerOperationOptions

type ListByServerOperationOptions struct {
	Skip *int64
}

func DefaultListByServerOperationOptions

func DefaultListByServerOperationOptions() ListByServerOperationOptions

func (ListByServerOperationOptions) ToHeaders

func (ListByServerOperationOptions) ToOData

func (ListByServerOperationOptions) ToQuery

type ListByServerOperationResponse

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

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

type Sku

type Sku struct {
	Capacity *int64  `json:"capacity,omitempty"`
	Family   *string `json:"family,omitempty"`
	Name     string  `json:"name"`
	Size     *string `json:"size,omitempty"`
	Tier     *string `json:"tier,omitempty"`
}

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