virtualmachine

package
v1.28.12 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manage

type Manage string
const (
	VMSS Manage = "vmss"
	VMAS Manage = "vmas"
)

type ManageOption

type ManageOption = func(*VirtualMachine)

func ByVMSS

func ByVMSS(vmssName string) ManageOption

ByVMSS specifies that the virtual machine is managed by a virtual machine scale set.

type Variant

type Variant string
const (
	VariantVirtualMachine           Variant = "VirtualMachine"
	VariantVirtualMachineScaleSetVM Variant = "VirtualMachineScaleSetVM"
)

type VirtualMachine

type VirtualMachine struct {
	Variant Variant

	Manage   Manage
	VMSSName string

	// re-export fields
	// common fields
	ID        string
	Name      string
	Location  string
	Tags      map[string]string
	Zones     []string
	Type      string
	Plan      *compute.Plan
	Resources *[]compute.VirtualMachineExtension

	// fields of VirtualMachine
	Identity                 *compute.VirtualMachineIdentity
	VirtualMachineProperties *compute.VirtualMachineProperties

	// fields of VirtualMachineScaleSetVM
	InstanceID                         string
	SKU                                *compute.Sku
	VirtualMachineScaleSetVMProperties *compute.VirtualMachineScaleSetVMProperties
	// contains filtered or unexported fields
}

func FromVirtualMachine

func FromVirtualMachine(vm *compute.VirtualMachine, opt ...ManageOption) *VirtualMachine

func (*VirtualMachine) AsVirtualMachine

func (vm *VirtualMachine) AsVirtualMachine() *compute.VirtualMachine

func (*VirtualMachine) AsVirtualMachineScaleSetVM

func (vm *VirtualMachine) AsVirtualMachineScaleSetVM() *compute.VirtualMachineScaleSetVM

func (*VirtualMachine) GetInstanceViewStatus added in v1.26.20

func (vm *VirtualMachine) GetInstanceViewStatus() *[]compute.InstanceViewStatus

func (*VirtualMachine) GetProvisioningState added in v1.26.20

func (vm *VirtualMachine) GetProvisioningState() string

func (*VirtualMachine) IsVirtualMachine

func (vm *VirtualMachine) IsVirtualMachine() bool

func (*VirtualMachine) IsVirtualMachineScaleSetVM

func (vm *VirtualMachine) IsVirtualMachineScaleSetVM() bool

func (*VirtualMachine) ManagedByVMSS

func (vm *VirtualMachine) ManagedByVMSS() bool

Jump to

Keyboard shortcuts

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