README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-11-01/instancepools
Documentation
The instancepools
SDK allows for interaction with the Azure Resource Manager Service sql
(API Version 2021-11-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/sql/2021-11-01/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 := instancepools.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 := instancepools.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 ¶
- func PossibleValuesForInstancePoolLicenseType() []string
- func ValidateInstancePoolID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type InstancePool
- type InstancePoolId
- type InstancePoolLicenseType
- type InstancePoolOperationPredicate
- type InstancePoolProperties
- type InstancePoolUpdate
- type InstancePoolsClient
- func (c InstancePoolsClient) CreateOrUpdate(ctx context.Context, id InstancePoolId, input InstancePool) (result CreateOrUpdateOperationResponse, err error)
- func (c InstancePoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id InstancePoolId, input InstancePool) error
- func (c InstancePoolsClient) Delete(ctx context.Context, id InstancePoolId) (result DeleteOperationResponse, err error)
- func (c InstancePoolsClient) DeleteThenPoll(ctx context.Context, id InstancePoolId) error
- func (c InstancePoolsClient) Get(ctx context.Context, id InstancePoolId) (result GetOperationResponse, err error)
- func (c InstancePoolsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
- func (c InstancePoolsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c InstancePoolsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c InstancePoolsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c InstancePoolsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
- func (c InstancePoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListCompleteResult, err error)
- func (c InstancePoolsClient) Update(ctx context.Context, id InstancePoolId, input InstancePoolUpdate) (result UpdateOperationResponse, err error)
- func (c InstancePoolsClient) UpdateThenPoll(ctx context.Context, id InstancePoolId, input InstancePoolUpdate) error
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type Sku
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForInstancePoolLicenseType ¶
func PossibleValuesForInstancePoolLicenseType() []string
func ValidateInstancePoolID ¶
ValidateInstancePoolID checks that 'input' can be parsed as a Instance Pool ID
Types ¶
type DeleteOperationResponse ¶
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 ¶ added in v0.20231127.1171502
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 ¶
func (p InstancePoolOperationPredicate) Matches(input InstancePool) bool
type InstancePoolProperties ¶
type InstancePoolProperties struct { LicenseType InstancePoolLicenseType `json:"licenseType"` SubnetId string `json:"subnetId"` VCores int64 `json:"vCores"` }
type InstancePoolUpdate ¶
type InstancePoolsClient ¶
type InstancePoolsClient struct {
Client *resourcemanager.Client
}
func NewInstancePoolsClientWithBaseURI ¶
func NewInstancePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstancePoolsClient, error)
func (InstancePoolsClient) CreateOrUpdate ¶
func (c InstancePoolsClient) CreateOrUpdate(ctx context.Context, id InstancePoolId, input InstancePool) (result CreateOrUpdateOperationResponse, err error)
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 ¶
func (c InstancePoolsClient) Delete(ctx context.Context, id InstancePoolId) (result DeleteOperationResponse, err error)
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 ¶
func (c InstancePoolsClient) Get(ctx context.Context, id InstancePoolId) (result GetOperationResponse, err error)
Get ...
func (InstancePoolsClient) List ¶
func (c InstancePoolsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
List ...
func (InstancePoolsClient) ListByResourceGroup ¶
func (c InstancePoolsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (InstancePoolsClient) ListByResourceGroupComplete ¶
func (c InstancePoolsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
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 ¶
func (c InstancePoolsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
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 ¶
func (c InstancePoolsClient) Update(ctx context.Context, id InstancePoolId, input InstancePoolUpdate) (result UpdateOperationResponse, err error)
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 {
Items []InstancePool
}
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]InstancePool }
type ListCompleteResult ¶
type ListCompleteResult struct {
Items []InstancePool
}
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]InstancePool }