sqlpools

package
v0.20240223.1153421 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpools Documentation

The sqlpools SDK allows for interaction with the Azure Resource Manager Service synapse (API Version 2021-06-01).

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/synapse/2021-06-01/sqlpools"

Client Initialization

client := sqlpools.NewSqlPoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SqlPoolsClient.Create

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

payload := sqlpools.SqlPool{
	// ...
}


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

Example Usage: SqlPoolsClient.Delete

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

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

Example Usage: SqlPoolsClient.Get

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

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: SqlPoolsClient.ListByWorkspace

ctx := context.TODO()
id := sqlpools.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")

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

Example Usage: SqlPoolsClient.Pause

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

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

Example Usage: SqlPoolsClient.Resume

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

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

Example Usage: SqlPoolsClient.SqlPoolMetadataSyncConfigsCreate

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

payload := sqlpools.MetadataSyncConfig{
	// ...
}


read, err := client.SqlPoolMetadataSyncConfigsCreate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SqlPoolsClient.SqlPoolMetadataSyncConfigsGet

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

read, err := client.SqlPoolMetadataSyncConfigsGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SqlPoolsClient.Update

ctx := context.TODO()
id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "sqlPoolValue")

payload := sqlpools.SqlPoolPatchInfo{
	// ...
}


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 PossibleValuesForCreateMode

func PossibleValuesForCreateMode() []string

func PossibleValuesForStorageAccountType

func PossibleValuesForStorageAccountType() []string

func ValidateSqlPoolID

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

ValidateSqlPoolID checks that 'input' can be parsed as a Sql Pool ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateMode

type CreateMode string
const (
	CreateModeDefault            CreateMode = "Default"
	CreateModePointInTimeRestore CreateMode = "PointInTimeRestore"
	CreateModeRecovery           CreateMode = "Recovery"
	CreateModeRestore            CreateMode = "Restore"
)

func (*CreateMode) UnmarshalJSON

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

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SqlPool
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByWorkspaceCompleteResult

type ListByWorkspaceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SqlPool
}

type ListByWorkspaceOperationResponse

type ListByWorkspaceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SqlPool
}

type MetadataSyncConfig

type MetadataSyncConfig struct {
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *MetadataSyncConfigProperties `json:"properties,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type MetadataSyncConfigProperties

type MetadataSyncConfigProperties struct {
	Enabled               *bool  `json:"enabled,omitempty"`
	SyncIntervalInMinutes *int64 `json:"syncIntervalInMinutes,omitempty"`
}

type PauseOperationResponse

type PauseOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SqlPool
}

type ResumeOperationResponse

type ResumeOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SqlPool
}

type Sku

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

type SqlPool

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

type SqlPoolId

type SqlPoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	SqlPoolName       string
}

SqlPoolId is a struct representing the Resource ID for a Sql Pool

func NewSqlPoolID

func NewSqlPoolID(subscriptionId string, resourceGroupName string, workspaceName string, sqlPoolName string) SqlPoolId

NewSqlPoolID returns a new SqlPoolId struct

func ParseSqlPoolID

func ParseSqlPoolID(input string) (*SqlPoolId, error)

ParseSqlPoolID parses 'input' into a SqlPoolId

func ParseSqlPoolIDInsensitively

func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error)

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

func (*SqlPoolId) FromParseResult

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

func (SqlPoolId) ID

func (id SqlPoolId) ID() string

ID returns the formatted Sql Pool ID

func (SqlPoolId) Segments

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

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

func (SqlPoolId) String

func (id SqlPoolId) String() string

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

type SqlPoolMetadataSyncConfigsCreateOperationResponse

type SqlPoolMetadataSyncConfigsCreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetadataSyncConfig
}

type SqlPoolMetadataSyncConfigsGetOperationResponse

type SqlPoolMetadataSyncConfigsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetadataSyncConfig
}

type SqlPoolOperationPredicate

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

func (SqlPoolOperationPredicate) Matches

func (p SqlPoolOperationPredicate) Matches(input SqlPool) bool

type SqlPoolPatchInfo

type SqlPoolPatchInfo struct {
	Location   *string                    `json:"location,omitempty"`
	Properties *SqlPoolResourceProperties `json:"properties,omitempty"`
	Sku        *Sku                       `json:"sku,omitempty"`
	Tags       *map[string]string         `json:"tags,omitempty"`
}

type SqlPoolResourceProperties

type SqlPoolResourceProperties struct {
	Collation                  *string             `json:"collation,omitempty"`
	CreateMode                 *CreateMode         `json:"createMode,omitempty"`
	CreationDate               *string             `json:"creationDate,omitempty"`
	MaxSizeBytes               *int64              `json:"maxSizeBytes,omitempty"`
	ProvisioningState          *string             `json:"provisioningState,omitempty"`
	RecoverableDatabaseId      *string             `json:"recoverableDatabaseId,omitempty"`
	RestorePointInTime         *string             `json:"restorePointInTime,omitempty"`
	SourceDatabaseDeletionDate *string             `json:"sourceDatabaseDeletionDate,omitempty"`
	SourceDatabaseId           *string             `json:"sourceDatabaseId,omitempty"`
	Status                     *string             `json:"status,omitempty"`
	StorageAccountType         *StorageAccountType `json:"storageAccountType,omitempty"`
}

func (*SqlPoolResourceProperties) GetCreationDateAsTime

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

func (*SqlPoolResourceProperties) GetRestorePointInTimeAsTime

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

func (*SqlPoolResourceProperties) GetSourceDatabaseDeletionDateAsTime

func (o *SqlPoolResourceProperties) GetSourceDatabaseDeletionDateAsTime() (*time.Time, error)

func (*SqlPoolResourceProperties) SetCreationDateAsTime

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

func (*SqlPoolResourceProperties) SetRestorePointInTimeAsTime

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

func (*SqlPoolResourceProperties) SetSourceDatabaseDeletionDateAsTime

func (o *SqlPoolResourceProperties) SetSourceDatabaseDeletionDateAsTime(input time.Time)

type SqlPoolsClient

type SqlPoolsClient struct {
	Client *resourcemanager.Client
}

func NewSqlPoolsClientWithBaseURI

func NewSqlPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsClient, error)

func (SqlPoolsClient) Create

func (c SqlPoolsClient) Create(ctx context.Context, id SqlPoolId, input SqlPool) (result CreateOperationResponse, err error)

Create ...

func (SqlPoolsClient) CreateThenPoll

func (c SqlPoolsClient) CreateThenPoll(ctx context.Context, id SqlPoolId, input SqlPool) error

CreateThenPoll performs Create then polls until it's completed

func (SqlPoolsClient) Delete

func (c SqlPoolsClient) Delete(ctx context.Context, id SqlPoolId) (result DeleteOperationResponse, err error)

Delete ...

func (SqlPoolsClient) DeleteThenPoll

func (c SqlPoolsClient) DeleteThenPoll(ctx context.Context, id SqlPoolId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SqlPoolsClient) Get

func (c SqlPoolsClient) Get(ctx context.Context, id SqlPoolId) (result GetOperationResponse, err error)

Get ...

func (SqlPoolsClient) ListByWorkspace

func (c SqlPoolsClient) ListByWorkspace(ctx context.Context, id WorkspaceId) (result ListByWorkspaceOperationResponse, err error)

ListByWorkspace ...

func (SqlPoolsClient) ListByWorkspaceComplete

func (c SqlPoolsClient) ListByWorkspaceComplete(ctx context.Context, id WorkspaceId) (ListByWorkspaceCompleteResult, error)

ListByWorkspaceComplete retrieves all the results into a single object

func (SqlPoolsClient) ListByWorkspaceCompleteMatchingPredicate

func (c SqlPoolsClient) ListByWorkspaceCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, predicate SqlPoolOperationPredicate) (result ListByWorkspaceCompleteResult, err error)

ListByWorkspaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SqlPoolsClient) Pause

func (c SqlPoolsClient) Pause(ctx context.Context, id SqlPoolId) (result PauseOperationResponse, err error)

Pause ...

func (SqlPoolsClient) PauseThenPoll

func (c SqlPoolsClient) PauseThenPoll(ctx context.Context, id SqlPoolId) error

PauseThenPoll performs Pause then polls until it's completed

func (SqlPoolsClient) Resume

func (c SqlPoolsClient) Resume(ctx context.Context, id SqlPoolId) (result ResumeOperationResponse, err error)

Resume ...

func (SqlPoolsClient) ResumeThenPoll

func (c SqlPoolsClient) ResumeThenPoll(ctx context.Context, id SqlPoolId) error

ResumeThenPoll performs Resume then polls until it's completed

func (SqlPoolsClient) SqlPoolMetadataSyncConfigsCreate

func (c SqlPoolsClient) SqlPoolMetadataSyncConfigsCreate(ctx context.Context, id SqlPoolId, input MetadataSyncConfig) (result SqlPoolMetadataSyncConfigsCreateOperationResponse, err error)

SqlPoolMetadataSyncConfigsCreate ...

func (SqlPoolsClient) SqlPoolMetadataSyncConfigsGet

func (c SqlPoolsClient) SqlPoolMetadataSyncConfigsGet(ctx context.Context, id SqlPoolId) (result SqlPoolMetadataSyncConfigsGetOperationResponse, err error)

SqlPoolMetadataSyncConfigsGet ...

func (SqlPoolsClient) Update

func (c SqlPoolsClient) Update(ctx context.Context, id SqlPoolId, input SqlPoolPatchInfo) (result UpdateOperationResponse, err error)

Update ...

func (SqlPoolsClient) UpdateThenPoll

func (c SqlPoolsClient) UpdateThenPoll(ctx context.Context, id SqlPoolId, input SqlPoolPatchInfo) error

UpdateThenPoll performs Update then polls until it's completed

type StorageAccountType

type StorageAccountType string
const (
	StorageAccountTypeGRS StorageAccountType = "GRS"
	StorageAccountTypeLRS StorageAccountType = "LRS"
)

func (*StorageAccountType) UnmarshalJSON

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

type UpdateOperationResponse

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

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Workspace ID

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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