workloadclassifiers

package
v0.20230725.1160316 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

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

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

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

ValidateWorkloadGroupID checks that 'input' can be parsed as a Workload Group ID

Types

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 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

type WorkloadClassifierOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (WorkloadClassifierOperationPredicate) Matches

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(api environments.Api) (*WorkloadClassifiersClient, error)

func (WorkloadClassifiersClient) CreateOrUpdate

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

Delete ...

func (WorkloadClassifiersClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (WorkloadClassifiersClient) Get

Get ...

func (WorkloadClassifiersClient) ListByWorkloadGroup

ListByWorkloadGroup ...

func (WorkloadClassifiersClient) ListByWorkloadGroupComplete

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

Jump to

Keyboard shortcuts

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