virtualmachinescalesetrollingupgrades

package
v0.20230725.1205316 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: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades Documentation

The virtualmachinescalesetrollingupgrades SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2021-07-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/compute/2021-07-01/virtualmachinescalesetrollingupgrades"

Client Initialization

client := virtualmachinescalesetrollingupgrades.NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachineScaleSetRollingUpgradesClient.Cancel

ctx := context.TODO()
id := virtualmachinescalesetrollingupgrades.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue")

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

Example Usage: VirtualMachineScaleSetRollingUpgradesClient.GetLatest

ctx := context.TODO()
id := virtualmachinescalesetrollingupgrades.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue")

read, err := client.GetLatest(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade

ctx := context.TODO()
id := virtualmachinescalesetrollingupgrades.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue")

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

Example Usage: VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade

ctx := context.TODO()
id := virtualmachinescalesetrollingupgrades.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForRollingUpgradeActionType

func PossibleValuesForRollingUpgradeActionType() []string

func PossibleValuesForRollingUpgradeStatusCode

func PossibleValuesForRollingUpgradeStatusCode() []string

func ValidateVirtualMachineScaleSetID

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

ValidateVirtualMachineScaleSetID checks that 'input' can be parsed as a Virtual Machine Scale Set ID

Types

type ApiError

type ApiError struct {
	Code       *string         `json:"code,omitempty"`
	Details    *[]ApiErrorBase `json:"details,omitempty"`
	Innererror *InnerError     `json:"innererror,omitempty"`
	Message    *string         `json:"message,omitempty"`
	Target     *string         `json:"target,omitempty"`
}

type ApiErrorBase

type ApiErrorBase struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
	Target  *string `json:"target,omitempty"`
}

type CancelOperationResponse

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

type GetLatestOperationResponse

type GetLatestOperationResponse struct {
	HttpResponse *http.Response
	Model        *RollingUpgradeStatusInfo
}

type InnerError

type InnerError struct {
	Errordetail   *string `json:"errordetail,omitempty"`
	Exceptiontype *string `json:"exceptiontype,omitempty"`
}

type RollingUpgradeActionType

type RollingUpgradeActionType string
const (
	RollingUpgradeActionTypeCancel RollingUpgradeActionType = "Cancel"
	RollingUpgradeActionTypeStart  RollingUpgradeActionType = "Start"
)

type RollingUpgradePolicy

type RollingUpgradePolicy struct {
	EnableCrossZoneUpgrade              *bool   `json:"enableCrossZoneUpgrade,omitempty"`
	MaxBatchInstancePercent             *int64  `json:"maxBatchInstancePercent,omitempty"`
	MaxUnhealthyInstancePercent         *int64  `json:"maxUnhealthyInstancePercent,omitempty"`
	MaxUnhealthyUpgradedInstancePercent *int64  `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
	PauseTimeBetweenBatches             *string `json:"pauseTimeBetweenBatches,omitempty"`
	PrioritizeUnhealthyInstances        *bool   `json:"prioritizeUnhealthyInstances,omitempty"`
}

type RollingUpgradeProgressInfo

type RollingUpgradeProgressInfo struct {
	FailedInstanceCount     *int64 `json:"failedInstanceCount,omitempty"`
	InProgressInstanceCount *int64 `json:"inProgressInstanceCount,omitempty"`
	PendingInstanceCount    *int64 `json:"pendingInstanceCount,omitempty"`
	SuccessfulInstanceCount *int64 `json:"successfulInstanceCount,omitempty"`
}

type RollingUpgradeRunningStatus

type RollingUpgradeRunningStatus struct {
	Code           *RollingUpgradeStatusCode `json:"code,omitempty"`
	LastAction     *RollingUpgradeActionType `json:"lastAction,omitempty"`
	LastActionTime *string                   `json:"lastActionTime,omitempty"`
	StartTime      *string                   `json:"startTime,omitempty"`
}

func (*RollingUpgradeRunningStatus) GetLastActionTimeAsTime

func (o *RollingUpgradeRunningStatus) GetLastActionTimeAsTime() (*time.Time, error)

func (*RollingUpgradeRunningStatus) GetStartTimeAsTime

func (o *RollingUpgradeRunningStatus) GetStartTimeAsTime() (*time.Time, error)

func (*RollingUpgradeRunningStatus) SetLastActionTimeAsTime

func (o *RollingUpgradeRunningStatus) SetLastActionTimeAsTime(input time.Time)

func (*RollingUpgradeRunningStatus) SetStartTimeAsTime

func (o *RollingUpgradeRunningStatus) SetStartTimeAsTime(input time.Time)

type RollingUpgradeStatusCode

type RollingUpgradeStatusCode string
const (
	RollingUpgradeStatusCodeCancelled      RollingUpgradeStatusCode = "Cancelled"
	RollingUpgradeStatusCodeCompleted      RollingUpgradeStatusCode = "Completed"
	RollingUpgradeStatusCodeFaulted        RollingUpgradeStatusCode = "Faulted"
	RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward"
)

type RollingUpgradeStatusInfo

type RollingUpgradeStatusInfo struct {
	Id         *string                             `json:"id,omitempty"`
	Location   string                              `json:"location"`
	Name       *string                             `json:"name,omitempty"`
	Properties *RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
	Tags       *map[string]string                  `json:"tags,omitempty"`
	Type       *string                             `json:"type,omitempty"`
}

type RollingUpgradeStatusInfoProperties

type RollingUpgradeStatusInfoProperties struct {
	Error         *ApiError                    `json:"error,omitempty"`
	Policy        *RollingUpgradePolicy        `json:"policy,omitempty"`
	Progress      *RollingUpgradeProgressInfo  `json:"progress,omitempty"`
	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
}

type StartExtensionUpgradeOperationResponse

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

type StartOSUpgradeOperationResponse

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

type VirtualMachineScaleSetId

type VirtualMachineScaleSetId struct {
	SubscriptionId             string
	ResourceGroupName          string
	VirtualMachineScaleSetName string
}

VirtualMachineScaleSetId is a struct representing the Resource ID for a Virtual Machine Scale Set

func NewVirtualMachineScaleSetID

func NewVirtualMachineScaleSetID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string) VirtualMachineScaleSetId

NewVirtualMachineScaleSetID returns a new VirtualMachineScaleSetId struct

func ParseVirtualMachineScaleSetID

func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, error)

ParseVirtualMachineScaleSetID parses 'input' into a VirtualMachineScaleSetId

func ParseVirtualMachineScaleSetIDInsensitively

func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineScaleSetId, error)

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

func (VirtualMachineScaleSetId) ID

ID returns the formatted Virtual Machine Scale Set ID

func (VirtualMachineScaleSetId) Segments

Segments returns a slice of Resource ID Segments which comprise this Virtual Machine Scale Set ID

func (VirtualMachineScaleSetId) String

func (id VirtualMachineScaleSetId) String() string

String returns a human-readable description of this Virtual Machine Scale Set ID

type VirtualMachineScaleSetRollingUpgradesClient

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

func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI

func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(endpoint string) VirtualMachineScaleSetRollingUpgradesClient

func (VirtualMachineScaleSetRollingUpgradesClient) Cancel

Cancel ...

func (VirtualMachineScaleSetRollingUpgradesClient) CancelThenPoll

CancelThenPoll performs Cancel then polls until it's completed

func (VirtualMachineScaleSetRollingUpgradesClient) GetLatest

GetLatest ...

func (VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade

StartExtensionUpgrade ...

func (VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeThenPoll

StartExtensionUpgradeThenPoll performs StartExtensionUpgrade then polls until it's completed

func (VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade

StartOSUpgrade ...

func (VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeThenPoll

StartOSUpgradeThenPoll performs StartOSUpgrade then polls until it's completed

Jump to

Keyboard shortcuts

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