virtualmachineinstances

package
v0.20240624.1135538 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances Documentation

The virtualmachineinstances SDK allows for interaction with the Azure Resource Manager Service connectedvmware (API Version 2023-10-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances"

Client Initialization

client := virtualmachineinstances.NewVirtualMachineInstancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachineInstancesClient.CreateOrUpdate

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := virtualmachineinstances.VirtualMachineInstance{
	// ...
}


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

Example Usage: VirtualMachineInstancesClient.Delete

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: VirtualMachineInstancesClient.Get

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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: VirtualMachineInstancesClient.List

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: VirtualMachineInstancesClient.Restart

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: VirtualMachineInstancesClient.Start

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: VirtualMachineInstancesClient.Stop

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := virtualmachineinstances.StopVirtualMachineOptions{
	// ...
}


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

Example Usage: VirtualMachineInstancesClient.Update

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := virtualmachineinstances.VirtualMachineInstanceUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDiskMode

func PossibleValuesForDiskMode() []string

func PossibleValuesForDiskType

func PossibleValuesForDiskType() []string

func PossibleValuesForFirmwareType

func PossibleValuesForFirmwareType() []string

func PossibleValuesForIPAddressAllocationMethod

func PossibleValuesForIPAddressAllocationMethod() []string

func PossibleValuesForNICType

func PossibleValuesForNICType() []string

func PossibleValuesForOsType

func PossibleValuesForOsType() []string

func PossibleValuesForPowerOnBootOption

func PossibleValuesForPowerOnBootOption() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSCSIControllerType

func PossibleValuesForSCSIControllerType() []string

func PossibleValuesForVirtualSCSISharing

func PossibleValuesForVirtualSCSISharing() []string

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineInstance
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	DeleteFromHost *bool
	Force          *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DiskMode

type DiskMode string
const (
	DiskModeIndependentNonpersistent DiskMode = "independent_nonpersistent"
	DiskModeIndependentPersistent    DiskMode = "independent_persistent"
	DiskModePersistent               DiskMode = "persistent"
)

func (*DiskMode) UnmarshalJSON

func (s *DiskMode) UnmarshalJSON(bytes []byte) error

type DiskType

type DiskType string
const (
	DiskTypeFlat        DiskType = "flat"
	DiskTypePmem        DiskType = "pmem"
	DiskTypeRawphysical DiskType = "rawphysical"
	DiskTypeRawvirtual  DiskType = "rawvirtual"
	DiskTypeSesparse    DiskType = "sesparse"
	DiskTypeSparse      DiskType = "sparse"
	DiskTypeUnknown     DiskType = "unknown"
)

func (*DiskType) UnmarshalJSON

func (s *DiskType) UnmarshalJSON(bytes []byte) error

type ExtendedLocation

type ExtendedLocation struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type FirmwareType

type FirmwareType string
const (
	FirmwareTypeBios FirmwareType = "bios"
	FirmwareTypeEfi  FirmwareType = "efi"
)

func (*FirmwareType) UnmarshalJSON

func (s *FirmwareType) UnmarshalJSON(bytes []byte) error

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineInstance
}

type HardwareProfile

type HardwareProfile struct {
	CpuHotAddEnabled    *bool  `json:"cpuHotAddEnabled,omitempty"`
	CpuHotRemoveEnabled *bool  `json:"cpuHotRemoveEnabled,omitempty"`
	MemoryHotAddEnabled *bool  `json:"memoryHotAddEnabled,omitempty"`
	MemorySizeMB        *int64 `json:"memorySizeMB,omitempty"`
	NumCPUs             *int64 `json:"numCPUs,omitempty"`
	NumCoresPerSocket   *int64 `json:"numCoresPerSocket,omitempty"`
}

type IPAddressAllocationMethod

type IPAddressAllocationMethod string
const (
	IPAddressAllocationMethodDynamic   IPAddressAllocationMethod = "dynamic"
	IPAddressAllocationMethodLinklayer IPAddressAllocationMethod = "linklayer"
	IPAddressAllocationMethodOther     IPAddressAllocationMethod = "other"
	IPAddressAllocationMethodRandom    IPAddressAllocationMethod = "random"
	IPAddressAllocationMethodStatic    IPAddressAllocationMethod = "static"
	IPAddressAllocationMethodUnset     IPAddressAllocationMethod = "unset"
)

func (*IPAddressAllocationMethod) UnmarshalJSON

func (s *IPAddressAllocationMethod) UnmarshalJSON(bytes []byte) error

type InfrastructureProfile

type InfrastructureProfile struct {
	CustomResourceName *string       `json:"customResourceName,omitempty"`
	FirmwareType       *FirmwareType `json:"firmwareType,omitempty"`
	FolderPath         *string       `json:"folderPath,omitempty"`
	InstanceUuid       *string       `json:"instanceUuid,omitempty"`
	InventoryItemId    *string       `json:"inventoryItemId,omitempty"`
	MoName             *string       `json:"moName,omitempty"`
	MoRefId            *string       `json:"moRefId,omitempty"`
	SmbiosUuid         *string       `json:"smbiosUuid,omitempty"`
	TemplateId         *string       `json:"templateId,omitempty"`
	VCenterId          *string       `json:"vCenterId,omitempty"`
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualMachineInstance
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualMachineInstance
}

type NICType

type NICType string
const (
	NICTypeEOneThousand  NICType = "e1000"
	NICTypeEOneThousande NICType = "e1000e"
	NICTypePcnetThreeTwo NICType = "pcnet32"
	NICTypeVMxnet        NICType = "vmxnet"
	NICTypeVMxnetThree   NICType = "vmxnet3"
	NICTypeVMxnetTwo     NICType = "vmxnet2"
)

func (*NICType) UnmarshalJSON

func (s *NICType) UnmarshalJSON(bytes []byte) error

type NetworkInterface

type NetworkInterface struct {
	DeviceKey      *int64             `json:"deviceKey,omitempty"`
	IPAddresses    *[]string          `json:"ipAddresses,omitempty"`
	IPSettings     *NicIPSettings     `json:"ipSettings,omitempty"`
	Label          *string            `json:"label,omitempty"`
	MacAddress     *string            `json:"macAddress,omitempty"`
	Name           *string            `json:"name,omitempty"`
	NetworkId      *string            `json:"networkId,omitempty"`
	NetworkMoName  *string            `json:"networkMoName,omitempty"`
	NetworkMoRefId *string            `json:"networkMoRefId,omitempty"`
	NicType        *NICType           `json:"nicType,omitempty"`
	PowerOnBoot    *PowerOnBootOption `json:"powerOnBoot,omitempty"`
}

type NetworkInterfaceUpdate

type NetworkInterfaceUpdate struct {
	DeviceKey   *int64             `json:"deviceKey,omitempty"`
	Name        *string            `json:"name,omitempty"`
	NetworkId   *string            `json:"networkId,omitempty"`
	NicType     *NICType           `json:"nicType,omitempty"`
	PowerOnBoot *PowerOnBootOption `json:"powerOnBoot,omitempty"`
}

type NetworkProfile

type NetworkProfile struct {
	NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"`
}

type NetworkProfileUpdate

type NetworkProfileUpdate struct {
	NetworkInterfaces *[]NetworkInterfaceUpdate `json:"networkInterfaces,omitempty"`
}

type NicIPAddressSettings

type NicIPAddressSettings struct {
	AllocationMethod *string `json:"allocationMethod,omitempty"`
	IPAddress        *string `json:"ipAddress,omitempty"`
	SubnetMask       *string `json:"subnetMask,omitempty"`
}

type NicIPSettings

type NicIPSettings struct {
	AllocationMethod    *IPAddressAllocationMethod `json:"allocationMethod,omitempty"`
	DnsServers          *[]string                  `json:"dnsServers,omitempty"`
	Gateway             *[]string                  `json:"gateway,omitempty"`
	IPAddress           *string                    `json:"ipAddress,omitempty"`
	IPAddressInfo       *[]NicIPAddressSettings    `json:"ipAddressInfo,omitempty"`
	PrimaryWinsServer   *string                    `json:"primaryWinsServer,omitempty"`
	SecondaryWinsServer *string                    `json:"secondaryWinsServer,omitempty"`
	SubnetMask          *string                    `json:"subnetMask,omitempty"`
}

type OsProfileForVMInstance

type OsProfileForVMInstance struct {
	AdminPassword      *string `json:"adminPassword,omitempty"`
	AdminUsername      *string `json:"adminUsername,omitempty"`
	ComputerName       *string `json:"computerName,omitempty"`
	GuestId            *string `json:"guestId,omitempty"`
	OsSku              *string `json:"osSku,omitempty"`
	OsType             *OsType `json:"osType,omitempty"`
	ToolsRunningStatus *string `json:"toolsRunningStatus,omitempty"`
	ToolsVersion       *string `json:"toolsVersion,omitempty"`
	ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty"`
}

type OsType

type OsType string
const (
	OsTypeLinux   OsType = "Linux"
	OsTypeOther   OsType = "Other"
	OsTypeWindows OsType = "Windows"
)

func (*OsType) UnmarshalJSON

func (s *OsType) UnmarshalJSON(bytes []byte) error

type PlacementProfile

type PlacementProfile struct {
	ClusterId      *string `json:"clusterId,omitempty"`
	DatastoreId    *string `json:"datastoreId,omitempty"`
	HostId         *string `json:"hostId,omitempty"`
	ResourcePoolId *string `json:"resourcePoolId,omitempty"`
}

type PowerOnBootOption

type PowerOnBootOption string
const (
	PowerOnBootOptionDisabled PowerOnBootOption = "disabled"
	PowerOnBootOptionEnabled  PowerOnBootOption = "enabled"
)

func (*PowerOnBootOption) UnmarshalJSON

func (s *PowerOnBootOption) UnmarshalJSON(bytes []byte) error

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type ResourceStatus

type ResourceStatus struct {
	LastUpdatedAt *string `json:"lastUpdatedAt,omitempty"`
	Message       *string `json:"message,omitempty"`
	Reason        *string `json:"reason,omitempty"`
	Severity      *string `json:"severity,omitempty"`
	Status        *string `json:"status,omitempty"`
	Type          *string `json:"type,omitempty"`
}

func (*ResourceStatus) GetLastUpdatedAtAsTime

func (o *ResourceStatus) GetLastUpdatedAtAsTime() (*time.Time, error)

func (*ResourceStatus) SetLastUpdatedAtAsTime

func (o *ResourceStatus) SetLastUpdatedAtAsTime(input time.Time)

type RestartOperationResponse

type RestartOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type SCSIControllerType

type SCSIControllerType string
const (
	SCSIControllerTypeBuslogic    SCSIControllerType = "buslogic"
	SCSIControllerTypeLsilogic    SCSIControllerType = "lsilogic"
	SCSIControllerTypeLsilogicsas SCSIControllerType = "lsilogicsas"
	SCSIControllerTypePvscsi      SCSIControllerType = "pvscsi"
)

func (*SCSIControllerType) UnmarshalJSON

func (s *SCSIControllerType) UnmarshalJSON(bytes []byte) error

type SecurityProfile

type SecurityProfile struct {
	UefiSettings *UefiSettings `json:"uefiSettings,omitempty"`
}

type StartOperationResponse

type StartOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type StopOperationResponse

type StopOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type StopVirtualMachineOptions

type StopVirtualMachineOptions struct {
	SkipShutdown *bool `json:"skipShutdown,omitempty"`
}

type StorageProfile

type StorageProfile struct {
	Disks           *[]VirtualDisk           `json:"disks,omitempty"`
	ScsiControllers *[]VirtualSCSIController `json:"scsiControllers,omitempty"`
}

type StorageProfileUpdate

type StorageProfileUpdate struct {
	Disks *[]VirtualDiskUpdate `json:"disks,omitempty"`
}

type UefiSettings

type UefiSettings struct {
	SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineInstance
}

type VirtualDisk

type VirtualDisk struct {
	ControllerKey *int64    `json:"controllerKey,omitempty"`
	DeviceKey     *int64    `json:"deviceKey,omitempty"`
	DeviceName    *string   `json:"deviceName,omitempty"`
	DiskMode      *DiskMode `json:"diskMode,omitempty"`
	DiskObjectId  *string   `json:"diskObjectId,omitempty"`
	DiskSizeGB    *int64    `json:"diskSizeGB,omitempty"`
	DiskType      *DiskType `json:"diskType,omitempty"`
	Label         *string   `json:"label,omitempty"`
	Name          *string   `json:"name,omitempty"`
	UnitNumber    *int64    `json:"unitNumber,omitempty"`
}

type VirtualDiskUpdate

type VirtualDiskUpdate struct {
	ControllerKey *int64    `json:"controllerKey,omitempty"`
	DeviceKey     *int64    `json:"deviceKey,omitempty"`
	DeviceName    *string   `json:"deviceName,omitempty"`
	DiskMode      *DiskMode `json:"diskMode,omitempty"`
	DiskSizeGB    *int64    `json:"diskSizeGB,omitempty"`
	DiskType      *DiskType `json:"diskType,omitempty"`
	Name          *string   `json:"name,omitempty"`
	UnitNumber    *int64    `json:"unitNumber,omitempty"`
}

type VirtualMachineInstance

type VirtualMachineInstance struct {
	ExtendedLocation *ExtendedLocation                `json:"extendedLocation,omitempty"`
	Id               *string                          `json:"id,omitempty"`
	Name             *string                          `json:"name,omitempty"`
	Properties       VirtualMachineInstanceProperties `json:"properties"`
	SystemData       *systemdata.SystemData           `json:"systemData,omitempty"`
	Type             *string                          `json:"type,omitempty"`
}

type VirtualMachineInstanceOperationPredicate

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

func (VirtualMachineInstanceOperationPredicate) Matches

type VirtualMachineInstanceProperties

type VirtualMachineInstanceProperties struct {
	HardwareProfile       *HardwareProfile        `json:"hardwareProfile,omitempty"`
	InfrastructureProfile *InfrastructureProfile  `json:"infrastructureProfile,omitempty"`
	NetworkProfile        *NetworkProfile         `json:"networkProfile,omitempty"`
	OsProfile             *OsProfileForVMInstance `json:"osProfile,omitempty"`
	PlacementProfile      *PlacementProfile       `json:"placementProfile,omitempty"`
	PowerState            *string                 `json:"powerState,omitempty"`
	ProvisioningState     *ProvisioningState      `json:"provisioningState,omitempty"`
	ResourceUid           *string                 `json:"resourceUid,omitempty"`
	SecurityProfile       *SecurityProfile        `json:"securityProfile,omitempty"`
	Statuses              *[]ResourceStatus       `json:"statuses,omitempty"`
	StorageProfile        *StorageProfile         `json:"storageProfile,omitempty"`
}

type VirtualMachineInstanceUpdate

type VirtualMachineInstanceUpdate struct {
	Properties *VirtualMachineInstanceUpdateProperties `json:"properties,omitempty"`
}

type VirtualMachineInstanceUpdateProperties

type VirtualMachineInstanceUpdateProperties struct {
	HardwareProfile *HardwareProfile      `json:"hardwareProfile,omitempty"`
	NetworkProfile  *NetworkProfileUpdate `json:"networkProfile,omitempty"`
	StorageProfile  *StorageProfileUpdate `json:"storageProfile,omitempty"`
}

type VirtualMachineInstancesClient

type VirtualMachineInstancesClient struct {
	Client *resourcemanager.Client
}

func NewVirtualMachineInstancesClientWithBaseURI

func NewVirtualMachineInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineInstancesClient, error)

func (VirtualMachineInstancesClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualMachineInstancesClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualMachineInstancesClient) Delete

Delete ...

func (VirtualMachineInstancesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualMachineInstancesClient) Get

Get ...

func (VirtualMachineInstancesClient) List

List ...

func (VirtualMachineInstancesClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualMachineInstancesClient) ListCompleteMatchingPredicate

func (c VirtualMachineInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate VirtualMachineInstanceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualMachineInstancesClient) Restart

Restart ...

func (VirtualMachineInstancesClient) RestartThenPoll

RestartThenPoll performs Restart then polls until it's completed

func (VirtualMachineInstancesClient) Start

Start ...

func (VirtualMachineInstancesClient) StartThenPoll

StartThenPoll performs Start then polls until it's completed

func (VirtualMachineInstancesClient) Stop

Stop ...

func (VirtualMachineInstancesClient) StopThenPoll

StopThenPoll performs Stop then polls until it's completed

func (VirtualMachineInstancesClient) Update

Update ...

func (VirtualMachineInstancesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type VirtualSCSIController

type VirtualSCSIController struct {
	BusNumber          *int64              `json:"busNumber,omitempty"`
	ControllerKey      *int64              `json:"controllerKey,omitempty"`
	ScsiCtlrUnitNumber *int64              `json:"scsiCtlrUnitNumber,omitempty"`
	Sharing            *VirtualSCSISharing `json:"sharing,omitempty"`
	Type               *SCSIControllerType `json:"type,omitempty"`
}

type VirtualSCSISharing

type VirtualSCSISharing string
const (
	VirtualSCSISharingNoSharing       VirtualSCSISharing = "noSharing"
	VirtualSCSISharingPhysicalSharing VirtualSCSISharing = "physicalSharing"
	VirtualSCSISharingVirtualSharing  VirtualSCSISharing = "virtualSharing"
)

func (*VirtualSCSISharing) UnmarshalJSON

func (s *VirtualSCSISharing) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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