README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-02-01-preview/workloadclassifiers
Documentation
The workloadclassifiers
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/workloadclassifiers"
Client Initialization
client := workloadclassifiers.NewWorkloadClassifiersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: WorkloadClassifiersClient.CreateOrUpdate
ctx := context.TODO()
id := workloadclassifiers.NewWorkloadClassifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "workloadGroupValue", "workloadClassifierValue")
payload := workloadclassifiers.WorkloadClassifier{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: WorkloadClassifiersClient.Delete
ctx := context.TODO()
id := workloadclassifiers.NewWorkloadClassifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "workloadGroupValue", "workloadClassifierValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: WorkloadClassifiersClient.Get
ctx := context.TODO()
id := workloadclassifiers.NewWorkloadClassifierID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "workloadGroupValue", "workloadClassifierValue")
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: WorkloadClassifiersClient.ListByWorkloadGroup
ctx := context.TODO()
id := workloadclassifiers.NewWorkloadGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "workloadGroupValue")
// alternatively `client.ListByWorkloadGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByWorkloadGroupComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Documentation ¶
Index ¶
- func ValidateWorkloadClassifierID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateWorkloadGroupID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ListByWorkloadGroupCompleteResult
- type ListByWorkloadGroupOperationResponse
- type WorkloadClassifier
- type WorkloadClassifierId
- type WorkloadClassifierOperationPredicate
- type WorkloadClassifierProperties
- type WorkloadClassifiersClient
- func (c WorkloadClassifiersClient) CreateOrUpdate(ctx context.Context, id WorkloadClassifierId, input WorkloadClassifier) (result CreateOrUpdateOperationResponse, err error)
- func (c WorkloadClassifiersClient) CreateOrUpdateThenPoll(ctx context.Context, id WorkloadClassifierId, input WorkloadClassifier) error
- func (c WorkloadClassifiersClient) Delete(ctx context.Context, id WorkloadClassifierId) (result DeleteOperationResponse, err error)
- func (c WorkloadClassifiersClient) DeleteThenPoll(ctx context.Context, id WorkloadClassifierId) error
- func (c WorkloadClassifiersClient) Get(ctx context.Context, id WorkloadClassifierId) (result GetOperationResponse, err error)
- func (c WorkloadClassifiersClient) ListByWorkloadGroup(ctx context.Context, id WorkloadGroupId) (result ListByWorkloadGroupOperationResponse, err error)
- func (c WorkloadClassifiersClient) ListByWorkloadGroupComplete(ctx context.Context, id WorkloadGroupId) (ListByWorkloadGroupCompleteResult, error)
- func (c WorkloadClassifiersClient) ListByWorkloadGroupCompleteMatchingPredicate(ctx context.Context, id WorkloadGroupId, ...) (result ListByWorkloadGroupCompleteResult, err error)
- type WorkloadGroupId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateWorkloadClassifierID ¶
func ValidateWorkloadClassifierID(input interface{}, key string) (warnings []string, errors []error)
ValidateWorkloadClassifierID checks that 'input' can be parsed as a Workload Classifier ID
func ValidateWorkloadGroupID ¶
ValidateWorkloadGroupID checks that 'input' can be parsed as a Workload Group ID
Types ¶
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *WorkloadClassifier }
type ListByWorkloadGroupCompleteResult ¶
type ListByWorkloadGroupCompleteResult struct {
Items []WorkloadClassifier
}
type ListByWorkloadGroupOperationResponse ¶
type ListByWorkloadGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]WorkloadClassifier }
type WorkloadClassifier ¶
type WorkloadClassifier struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *WorkloadClassifierProperties `json:"properties,omitempty"` Type *string `json:"type,omitempty"` }
type WorkloadClassifierId ¶
type WorkloadClassifierId struct { SubscriptionId string ResourceGroupName string ServerName string DatabaseName string WorkloadGroupName string WorkloadClassifierName string }
WorkloadClassifierId is a struct representing the Resource ID for a Workload Classifier
func NewWorkloadClassifierID ¶
func NewWorkloadClassifierID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) WorkloadClassifierId
NewWorkloadClassifierID returns a new WorkloadClassifierId struct
func ParseWorkloadClassifierID ¶
func ParseWorkloadClassifierID(input string) (*WorkloadClassifierId, error)
ParseWorkloadClassifierID parses 'input' into a WorkloadClassifierId
func ParseWorkloadClassifierIDInsensitively ¶
func ParseWorkloadClassifierIDInsensitively(input string) (*WorkloadClassifierId, error)
ParseWorkloadClassifierIDInsensitively parses 'input' case-insensitively into a WorkloadClassifierId note: this method should only be used for API response data and not user input
func (WorkloadClassifierId) ID ¶
func (id WorkloadClassifierId) ID() string
ID returns the formatted Workload Classifier ID
func (WorkloadClassifierId) Segments ¶
func (id WorkloadClassifierId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Workload Classifier ID
func (WorkloadClassifierId) String ¶
func (id WorkloadClassifierId) String() string
String returns a human-readable description of this Workload Classifier ID
type WorkloadClassifierOperationPredicate ¶
func (WorkloadClassifierOperationPredicate) Matches ¶
func (p WorkloadClassifierOperationPredicate) Matches(input WorkloadClassifier) bool
type WorkloadClassifierProperties ¶
type WorkloadClassifierProperties struct { Context *string `json:"context,omitempty"` EndTime *string `json:"endTime,omitempty"` Importance *string `json:"importance,omitempty"` Label *string `json:"label,omitempty"` MemberName string `json:"memberName"` StartTime *string `json:"startTime,omitempty"` }
type WorkloadClassifiersClient ¶
type WorkloadClassifiersClient struct {
Client *resourcemanager.Client
}
func NewWorkloadClassifiersClientWithBaseURI ¶
func NewWorkloadClassifiersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadClassifiersClient, error)
func (WorkloadClassifiersClient) CreateOrUpdate ¶
func (c WorkloadClassifiersClient) CreateOrUpdate(ctx context.Context, id WorkloadClassifierId, input WorkloadClassifier) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (WorkloadClassifiersClient) CreateOrUpdateThenPoll ¶
func (c WorkloadClassifiersClient) CreateOrUpdateThenPoll(ctx context.Context, id WorkloadClassifierId, input WorkloadClassifier) error
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (WorkloadClassifiersClient) Delete ¶
func (c WorkloadClassifiersClient) Delete(ctx context.Context, id WorkloadClassifierId) (result DeleteOperationResponse, err error)
Delete ...
func (WorkloadClassifiersClient) DeleteThenPoll ¶
func (c WorkloadClassifiersClient) DeleteThenPoll(ctx context.Context, id WorkloadClassifierId) error
DeleteThenPoll performs Delete then polls until it's completed
func (WorkloadClassifiersClient) Get ¶
func (c WorkloadClassifiersClient) Get(ctx context.Context, id WorkloadClassifierId) (result GetOperationResponse, err error)
Get ...
func (WorkloadClassifiersClient) ListByWorkloadGroup ¶
func (c WorkloadClassifiersClient) ListByWorkloadGroup(ctx context.Context, id WorkloadGroupId) (result ListByWorkloadGroupOperationResponse, err error)
ListByWorkloadGroup ...
func (WorkloadClassifiersClient) ListByWorkloadGroupComplete ¶
func (c WorkloadClassifiersClient) ListByWorkloadGroupComplete(ctx context.Context, id WorkloadGroupId) (ListByWorkloadGroupCompleteResult, error)
ListByWorkloadGroupComplete retrieves all the results into a single object
func (WorkloadClassifiersClient) ListByWorkloadGroupCompleteMatchingPredicate ¶
func (c WorkloadClassifiersClient) ListByWorkloadGroupCompleteMatchingPredicate(ctx context.Context, id WorkloadGroupId, predicate WorkloadClassifierOperationPredicate) (result ListByWorkloadGroupCompleteResult, err error)
ListByWorkloadGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate
type WorkloadGroupId ¶
type WorkloadGroupId struct { SubscriptionId string ResourceGroupName string ServerName string DatabaseName string WorkloadGroupName string }
WorkloadGroupId is a struct representing the Resource ID for a Workload Group
func NewWorkloadGroupID ¶
func NewWorkloadGroupID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) WorkloadGroupId
NewWorkloadGroupID returns a new WorkloadGroupId struct
func ParseWorkloadGroupID ¶
func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error)
ParseWorkloadGroupID parses 'input' into a WorkloadGroupId
func ParseWorkloadGroupIDInsensitively ¶
func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error)
ParseWorkloadGroupIDInsensitively parses 'input' case-insensitively into a WorkloadGroupId note: this method should only be used for API response data and not user input
func (WorkloadGroupId) ID ¶
func (id WorkloadGroupId) ID() string
ID returns the formatted Workload Group ID
func (WorkloadGroupId) Segments ¶
func (id WorkloadGroupId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Workload Group ID
func (WorkloadGroupId) String ¶
func (id WorkloadGroupId) String() string
String returns a human-readable description of this Workload Group ID