README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-02-01-preview/serverautomatictuning
Documentation
The serverautomatictuning
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/serverautomatictuning"
Client Initialization
client := serverautomatictuning.NewServerAutomaticTuningClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ServerAutomaticTuningClient.Get
ctx := context.TODO()
id := serverautomatictuning.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue")
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: ServerAutomaticTuningClient.Update
ctx := context.TODO()
id := serverautomatictuning.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue")
payload := serverautomatictuning.ServerAutomaticTuning{
// ...
}
read, err := client.Update(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func PossibleValuesForAutomaticTuningOptionModeActual() []string
- func PossibleValuesForAutomaticTuningOptionModeDesired() []string
- func PossibleValuesForAutomaticTuningServerMode() []string
- func PossibleValuesForAutomaticTuningServerReason() []string
- func ValidateServerID(input interface{}, key string) (warnings []string, errors []error)
- type AutomaticTuningOptionModeActual
- type AutomaticTuningOptionModeDesired
- type AutomaticTuningServerMode
- type AutomaticTuningServerOptions
- type AutomaticTuningServerProperties
- type AutomaticTuningServerReason
- type GetOperationResponse
- type ServerAutomaticTuning
- type ServerAutomaticTuningClient
- type ServerId
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForAutomaticTuningOptionModeActual ¶
func PossibleValuesForAutomaticTuningOptionModeActual() []string
func PossibleValuesForAutomaticTuningOptionModeDesired ¶
func PossibleValuesForAutomaticTuningOptionModeDesired() []string
func PossibleValuesForAutomaticTuningServerMode ¶
func PossibleValuesForAutomaticTuningServerMode() []string
func PossibleValuesForAutomaticTuningServerReason ¶
func PossibleValuesForAutomaticTuningServerReason() []string
func ValidateServerID ¶
ValidateServerID checks that 'input' can be parsed as a Server ID
Types ¶
type AutomaticTuningOptionModeActual ¶
type AutomaticTuningOptionModeActual string
const ( AutomaticTuningOptionModeActualOff AutomaticTuningOptionModeActual = "Off" AutomaticTuningOptionModeActualOn AutomaticTuningOptionModeActual = "On" )
func (*AutomaticTuningOptionModeActual) UnmarshalJSON ¶
func (s *AutomaticTuningOptionModeActual) UnmarshalJSON(bytes []byte) error
type AutomaticTuningOptionModeDesired ¶
type AutomaticTuningOptionModeDesired string
const ( AutomaticTuningOptionModeDesiredDefault AutomaticTuningOptionModeDesired = "Default" AutomaticTuningOptionModeDesiredOff AutomaticTuningOptionModeDesired = "Off" AutomaticTuningOptionModeDesiredOn AutomaticTuningOptionModeDesired = "On" )
func (*AutomaticTuningOptionModeDesired) UnmarshalJSON ¶
func (s *AutomaticTuningOptionModeDesired) UnmarshalJSON(bytes []byte) error
type AutomaticTuningServerMode ¶
type AutomaticTuningServerMode string
const ( AutomaticTuningServerModeAuto AutomaticTuningServerMode = "Auto" AutomaticTuningServerModeCustom AutomaticTuningServerMode = "Custom" AutomaticTuningServerModeUnspecified AutomaticTuningServerMode = "Unspecified" )
func (*AutomaticTuningServerMode) UnmarshalJSON ¶
func (s *AutomaticTuningServerMode) UnmarshalJSON(bytes []byte) error
type AutomaticTuningServerOptions ¶
type AutomaticTuningServerOptions struct { ActualState *AutomaticTuningOptionModeActual `json:"actualState,omitempty"` DesiredState *AutomaticTuningOptionModeDesired `json:"desiredState,omitempty"` ReasonCode *int64 `json:"reasonCode,omitempty"` ReasonDesc *AutomaticTuningServerReason `json:"reasonDesc,omitempty"` }
type AutomaticTuningServerProperties ¶
type AutomaticTuningServerProperties struct { ActualState *AutomaticTuningServerMode `json:"actualState,omitempty"` DesiredState *AutomaticTuningServerMode `json:"desiredState,omitempty"` Options *map[string]AutomaticTuningServerOptions `json:"options,omitempty"` }
type AutomaticTuningServerReason ¶
type AutomaticTuningServerReason string
const ( AutomaticTuningServerReasonAutoConfigured AutomaticTuningServerReason = "AutoConfigured" AutomaticTuningServerReasonDefault AutomaticTuningServerReason = "Default" AutomaticTuningServerReasonDisabled AutomaticTuningServerReason = "Disabled" )
func (*AutomaticTuningServerReason) UnmarshalJSON ¶
func (s *AutomaticTuningServerReason) UnmarshalJSON(bytes []byte) error
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *ServerAutomaticTuning }
type ServerAutomaticTuning ¶
type ServerAutomaticTuning struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *AutomaticTuningServerProperties `json:"properties,omitempty"` Type *string `json:"type,omitempty"` }
type ServerAutomaticTuningClient ¶
type ServerAutomaticTuningClient struct {
Client *resourcemanager.Client
}
func NewServerAutomaticTuningClientWithBaseURI ¶
func NewServerAutomaticTuningClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAutomaticTuningClient, error)
func (ServerAutomaticTuningClient) Get ¶
func (c ServerAutomaticTuningClient) Get(ctx context.Context, id ServerId) (result GetOperationResponse, err error)
Get ...
func (ServerAutomaticTuningClient) Update ¶
func (c ServerAutomaticTuningClient) Update(ctx context.Context, id ServerId, input ServerAutomaticTuning) (result UpdateOperationResponse, err error)
Update ...
type ServerId ¶
ServerId is a struct representing the Resource ID for a Server
func NewServerID ¶
NewServerID returns a new ServerId struct
func ParseServerID ¶
ParseServerID parses 'input' into a ServerId
func ParseServerIDInsensitively ¶
ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId note: this method should only be used for API response data and not user input
func (ServerId) Segments ¶
func (id ServerId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Server ID
type UpdateOperationResponse ¶
type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *ServerAutomaticTuning }