serverrestart

package
v0.20230204.1123804 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MPL-2.0 Imports: 8 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/serverrestart Documentation

The serverrestart SDK allows for interaction with the Azure Resource Manager Service mysql (API Version 2021-12-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/mysql/2021-12-01-preview/serverrestart"

Client Initialization

client := serverrestart.NewServerRestartClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServerRestartClient.ServersRestart

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

payload := serverrestart.ServerRestartParameter{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEnableStatusEnum

func PossibleValuesForEnableStatusEnum() []string

func ValidateFlexibleServerID

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

ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID

Types

type EnableStatusEnum

type EnableStatusEnum string
const (
	EnableStatusEnumDisabled EnableStatusEnum = "Disabled"
	EnableStatusEnumEnabled  EnableStatusEnum = "Enabled"
)

type FlexibleServerId

type FlexibleServerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
}

FlexibleServerId is a struct representing the Resource ID for a Flexible Server

func NewFlexibleServerID

func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId

NewFlexibleServerID returns a new FlexibleServerId struct

func ParseFlexibleServerID

func ParseFlexibleServerID(input string) (*FlexibleServerId, error)

ParseFlexibleServerID parses 'input' into a FlexibleServerId

func ParseFlexibleServerIDInsensitively

func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error)

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

func (FlexibleServerId) ID

func (id FlexibleServerId) ID() string

ID returns the formatted Flexible Server ID

func (FlexibleServerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID

func (FlexibleServerId) String

func (id FlexibleServerId) String() string

String returns a human-readable description of this Flexible Server ID

type ServerRestartClient

type ServerRestartClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewServerRestartClientWithBaseURI

func NewServerRestartClientWithBaseURI(endpoint string) ServerRestartClient

func (ServerRestartClient) ServersRestart

ServersRestart ...

func (ServerRestartClient) ServersRestartThenPoll

func (c ServerRestartClient) ServersRestartThenPoll(ctx context.Context, id FlexibleServerId, input ServerRestartParameter) error

ServersRestartThenPoll performs ServersRestart then polls until it's completed

type ServerRestartParameter

type ServerRestartParameter struct {
	MaxFailoverSeconds  *int64            `json:"maxFailoverSeconds,omitempty"`
	RestartWithFailover *EnableStatusEnum `json:"restartWithFailover,omitempty"`
}

type ServersRestartOperationResponse

type ServersRestartOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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