vm

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package vm provides functions and data structures to interact with Azure Virtual Machine resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureResourceReport

type AzureResourceReport struct {
	Resources AzureResources `json:"resources"`
	Errors    []string       `json:"errors"`
}

AzureResourceReport contains the AzureResources and any non-fatal errors encountered during enumeration.

func EnumerateVMs

func EnumerateVMs(ctx context.Context, cfg config.AzureConfig) (*AzureResourceReport, error)

EnumerateVMs enumerates all VM related resources in the subscription, returning a report of the resources and any non-fatal errors encountered.

type AzureResources

type AzureResources struct {
	SubscriptionID        string                     `json:"subscription_id"`
	StandaloneVMInstances []VirtualMachine           `json:"standalone_vms"`
	VMSSVMInstances       []VirtualMachineScaleSetVM `json:"vmss_vms"`
}

AzureResources contains details about all VM related resources in the subscription.

type IPFqdnMapping

type IPFqdnMapping struct {
	IP   string `json:"ip"`
	FQDN string `json:"fqdn"`
}

IPFqdnMapping provides a mapping between an IP address and an FQDN.

type NetworkInterface

type NetworkInterface struct {
	ID      string               `json:"id"`
	Details armnetwork.Interface `json:"details"`
	IPFqdns []IPFqdnMapping      `json:"ip_fqdn"`
}

NetworkInterface contains details about a single network interface and its corresponding IP addresses and FQDNs.

type SubnetDetails

type SubnetDetails struct {
	ID            string `json:"id"`
	AddressPrefix string `json:"address_prefix"`
}

SubnetDetails contains details about a single subnet.

type VirtualMachine

type VirtualMachine struct {
	Details             armcompute.VirtualMachine `json:"details"`
	VNetID              string                    `json:"vnet_id"`
	NetworkInterfaces   []NetworkInterface        `json:"network_interfaces"`
	LinkedSubnetDetails []SubnetDetails           `json:"linked_subnet_details"`
}

VirtualMachine contains details about a single Virtual Machine and its corresponding network interfaces and linked subnets.

type VirtualMachineScaleSetVM

type VirtualMachineScaleSetVM struct {
	Details             armcompute.VirtualMachineScaleSetVM `json:"details"`
	VNetID              string                              `json:"vnet_id"`
	NetworkInterfaces   []NetworkInterface                  `json:"network_interfaces"`
	LinkedSubnetDetails []SubnetDetails                     `json:"linked_subnet_details"`
}

VirtualMachineScaleSetVM contains details about a single Virtual Machine Scale Set VM and its corresponding network interfaces and linked subnets.

Jump to

Keyboard shortcuts

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