instancepools

package
v0.20240521.1173452 Latest Latest
Warning

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

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

README

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

The instancepools SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-05-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/instancepools"

Client Initialization

client := instancepools.NewInstancePoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: InstancePoolsClient.CreateOrUpdate

ctx := context.TODO()
id := instancepools.NewInstancePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "instancePoolValue")

payload := instancepools.InstancePool{
	// ...
}


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

Example Usage: InstancePoolsClient.Delete

ctx := context.TODO()
id := instancepools.NewInstancePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "instancePoolValue")

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

Example Usage: InstancePoolsClient.Get

ctx := context.TODO()
id := instancepools.NewInstancePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "instancePoolValue")

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: InstancePoolsClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: InstancePoolsClient.ListByResourceGroup

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

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

Example Usage: InstancePoolsClient.Update

ctx := context.TODO()
id := instancepools.NewInstancePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "instancePoolValue")

payload := instancepools.InstancePoolUpdate{
	// ...
}


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 PossibleValuesForInstancePoolLicenseType

func PossibleValuesForInstancePoolLicenseType() []string

func ValidateInstancePoolID

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

ValidateInstancePoolID checks that 'input' can be parsed as a Instance Pool ID

Types

type CreateOrUpdateOperationResponse

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

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        *InstancePool
}

type InstancePool

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

type InstancePoolId

type InstancePoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	InstancePoolName  string
}

InstancePoolId is a struct representing the Resource ID for a Instance Pool

func NewInstancePoolID

func NewInstancePoolID(subscriptionId string, resourceGroupName string, instancePoolName string) InstancePoolId

NewInstancePoolID returns a new InstancePoolId struct

func ParseInstancePoolID

func ParseInstancePoolID(input string) (*InstancePoolId, error)

ParseInstancePoolID parses 'input' into a InstancePoolId

func ParseInstancePoolIDInsensitively

func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error)

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

func (*InstancePoolId) FromParseResult

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

func (InstancePoolId) ID

func (id InstancePoolId) ID() string

ID returns the formatted Instance Pool ID

func (InstancePoolId) Segments

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

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

func (InstancePoolId) String

func (id InstancePoolId) String() string

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

type InstancePoolLicenseType

type InstancePoolLicenseType string
const (
	InstancePoolLicenseTypeBasePrice       InstancePoolLicenseType = "BasePrice"
	InstancePoolLicenseTypeLicenseIncluded InstancePoolLicenseType = "LicenseIncluded"
)

func (*InstancePoolLicenseType) UnmarshalJSON

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

type InstancePoolOperationPredicate

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

func (InstancePoolOperationPredicate) Matches

type InstancePoolProperties

type InstancePoolProperties struct {
	DnsZone                    *string                 `json:"dnsZone,omitempty"`
	LicenseType                InstancePoolLicenseType `json:"licenseType"`
	MaintenanceConfigurationId *string                 `json:"maintenanceConfigurationId,omitempty"`
	SubnetId                   string                  `json:"subnetId"`
	VCores                     int64                   `json:"vCores"`
}

type InstancePoolUpdate

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

type InstancePoolsClient

type InstancePoolsClient struct {
	Client *resourcemanager.Client
}

func NewInstancePoolsClientWithBaseURI

func NewInstancePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstancePoolsClient, error)

func (InstancePoolsClient) CreateOrUpdate

CreateOrUpdate ...

func (InstancePoolsClient) CreateOrUpdateThenPoll

func (c InstancePoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id InstancePoolId, input InstancePool) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (InstancePoolsClient) Delete

Delete ...

func (InstancePoolsClient) DeleteThenPoll

func (c InstancePoolsClient) DeleteThenPoll(ctx context.Context, id InstancePoolId) error

DeleteThenPoll performs Delete then polls until it's completed

func (InstancePoolsClient) Get

Get ...

func (InstancePoolsClient) List

List ...

func (InstancePoolsClient) ListByResourceGroup

ListByResourceGroup ...

func (InstancePoolsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (InstancePoolsClient) ListByResourceGroupCompleteMatchingPredicate

func (c InstancePoolsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate InstancePoolOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (InstancePoolsClient) ListComplete

ListComplete retrieves all the results into a single object

func (InstancePoolsClient) ListCompleteMatchingPredicate

func (c InstancePoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate InstancePoolOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (InstancePoolsClient) Update

Update ...

func (InstancePoolsClient) UpdateThenPoll

func (c InstancePoolsClient) UpdateThenPoll(ctx context.Context, id InstancePoolId, input InstancePoolUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []InstancePool
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]InstancePool
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []InstancePool
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]InstancePool
}

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
	Model        *InstancePool
}

Jump to

Keyboard shortcuts

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