elasticpools

package
v0.20240117.1113630 Latest Latest
Warning

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

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

README

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

The elasticpools 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-sdk/resource-manager/sql/2023-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.NewSqlElasticPoolID("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.NewSqlElasticPoolID("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.NewSqlElasticPoolID("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.NewSqlElasticPoolID("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.NewSqlServerID("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.NewSqlElasticPoolID("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 PossibleValuesForAlwaysEncryptedEnclaveType

func PossibleValuesForAlwaysEncryptedEnclaveType() []string

func PossibleValuesForAvailabilityZoneType

func PossibleValuesForAvailabilityZoneType() []string

func PossibleValuesForElasticPoolLicenseType

func PossibleValuesForElasticPoolLicenseType() []string

func PossibleValuesForElasticPoolState

func PossibleValuesForElasticPoolState() []string

Types

type AlwaysEncryptedEnclaveType

type AlwaysEncryptedEnclaveType string
const (
	AlwaysEncryptedEnclaveTypeDefault AlwaysEncryptedEnclaveType = "Default"
	AlwaysEncryptedEnclaveTypeVBS     AlwaysEncryptedEnclaveType = "VBS"
)

func (*AlwaysEncryptedEnclaveType) UnmarshalJSON

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

type AvailabilityZoneType

type AvailabilityZoneType string
const (
	AvailabilityZoneTypeNoPreference AvailabilityZoneType = "NoPreference"
	AvailabilityZoneTypeOne          AvailabilityZoneType = "1"
	AvailabilityZoneTypeThree        AvailabilityZoneType = "3"
	AvailabilityZoneTypeTwo          AvailabilityZoneType = "2"
)

func (*AvailabilityZoneType) UnmarshalJSON

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

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 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 {
	AvailabilityZone             *AvailabilityZoneType           `json:"availabilityZone,omitempty"`
	CreationDate                 *string                         `json:"creationDate,omitempty"`
	HighAvailabilityReplicaCount *int64                          `json:"highAvailabilityReplicaCount,omitempty"`
	LicenseType                  *ElasticPoolLicenseType         `json:"licenseType,omitempty"`
	MaintenanceConfigurationId   *string                         `json:"maintenanceConfigurationId,omitempty"`
	MaxSizeBytes                 *int64                          `json:"maxSizeBytes,omitempty"`
	MinCapacity                  *float64                        `json:"minCapacity,omitempty"`
	PerDatabaseSettings          *ElasticPoolPerDatabaseSettings `json:"perDatabaseSettings,omitempty"`
	PreferredEnclaveType         *AlwaysEncryptedEnclaveType     `json:"preferredEnclaveType,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 {
	AvailabilityZone             *AvailabilityZoneType           `json:"availabilityZone,omitempty"`
	HighAvailabilityReplicaCount *int64                          `json:"highAvailabilityReplicaCount,omitempty"`
	LicenseType                  *ElasticPoolLicenseType         `json:"licenseType,omitempty"`
	MaintenanceConfigurationId   *string                         `json:"maintenanceConfigurationId,omitempty"`
	MaxSizeBytes                 *int64                          `json:"maxSizeBytes,omitempty"`
	MinCapacity                  *float64                        `json:"minCapacity,omitempty"`
	PerDatabaseSettings          *ElasticPoolPerDatabaseSettings `json:"perDatabaseSettings,omitempty"`
	PreferredEnclaveType         *AlwaysEncryptedEnclaveType     `json:"preferredEnclaveType,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

CreateOrUpdate ...

func (ElasticPoolsClient) CreateOrUpdateThenPoll

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

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ElasticPoolsClient) Delete

Delete ...

func (ElasticPoolsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ElasticPoolsClient) Failover

Failover ...

func (ElasticPoolsClient) FailoverThenPoll

func (c ElasticPoolsClient) FailoverThenPoll(ctx context.Context, id commonids.SqlElasticPoolId) 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 commonids.SqlServerId, 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

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