Documentation
¶
Index ¶
- func AcceptAgreement(ctx context.Context, ...) (err error)
- func CreateNIC(ctx context.Context, nicAccess *armnetwork.InterfacesClient, ...) (nic *armnetwork.Interface, err error)
- func CreateVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, ...) (vm *armcompute.VirtualMachine, err error)
- func DeleteDisk(ctx context.Context, client *armcompute.DisksClient, ...) (err error)
- func DeleteNIC(ctx context.Context, client *armnetwork.InterfacesClient, ...) (err error)
- func DeleteVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, ...) (err error)
- func GetAgreementTerms(ctx context.Context, ...) (agreementTerms *armmarketplaceordering.AgreementTerms, err error)
- func GetNIC(ctx context.Context, client *armnetwork.InterfacesClient, ...) (nic *armnetwork.Interface, err error)
- func GetSubnet(ctx context.Context, subnetAccess *armnetwork.SubnetsClient, ...) (subnet *armnetwork.Subnet, err error)
- func GetVMImage(ctx context.Context, vmImagesAccess *armcompute.VirtualMachineImagesClient, ...) (vmImage *armcompute.VirtualMachineImage, err error)
- func GetVirtualMachine(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, ...) (vm *armcompute.VirtualMachine, err error)
- func QueryAndMap[T any](ctx context.Context, client *armresourcegraph.Client, subscriptionID string, ...) (results []T, err error)
- func ResourceGroupExists(ctx context.Context, client *armresources.ResourceGroupsClient, ...) (exists bool, err error)
- func SetCascadeDeleteForNICsAndDisks(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, ...) (err error)
- type MapperFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptAgreement ¶
func AcceptAgreement(ctx context.Context, mktPlaceAgreementAccess *armmarketplaceordering.MarketplaceAgreementsClient, purchasePlan armcompute.PurchasePlan, existingAgreement armmarketplaceordering.AgreementTerms) (err error)
AcceptAgreement updates the agreementTerms as accepted. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func CreateNIC ¶
func CreateNIC(ctx context.Context, nicAccess *armnetwork.InterfacesClient, resourceGroup string, nicParams armnetwork.Interface, nicName string) (nic *armnetwork.Interface, err error)
CreateNIC creates a NIC given the resourceGroup, nic name and NIC creation parameters. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func CreateVirtualMachine ¶
func CreateVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup string, vmCreationParams armcompute.VirtualMachine) (vm *armcompute.VirtualMachine, err error)
CreateVirtualMachine creates a Virtual Machine given a resourceGroup and virtual machine creation parameters. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func DeleteDisk ¶
func DeleteDisk(ctx context.Context, client *armcompute.DisksClient, resourceGroup, diskName string) (err error)
DeleteDisk deletes disk for passed in resourceGroup and diskName. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func DeleteNIC ¶
func DeleteNIC(ctx context.Context, client *armnetwork.InterfacesClient, resourceGroup, nicName string) (err error)
DeleteNIC deletes the NIC identified by a resourceGroup and nicName. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func DeleteVirtualMachine ¶
func DeleteVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup, vmName string) (err error)
DeleteVirtualMachine deletes the Virtual Machine with the give name and belonging to the passed in resource group. If cascade delete is set for associated NICs and Disks then these resources will also be deleted along with the VM. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func GetAgreementTerms ¶
func GetAgreementTerms(ctx context.Context, mktPlaceAgreementAccess *armmarketplaceordering.MarketplaceAgreementsClient, purchasePlan armcompute.PurchasePlan) (agreementTerms *armmarketplaceordering.AgreementTerms, err error)
GetAgreementTerms fetches the agreement terms for the purchase plan. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func GetNIC ¶
func GetNIC(ctx context.Context, client *armnetwork.InterfacesClient, resourceGroup, nicName string) (nic *armnetwork.Interface, err error)
GetNIC fetches a NIC identified by resourceGroup and nic name. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func GetSubnet ¶
func GetSubnet(ctx context.Context, subnetAccess *armnetwork.SubnetsClient, resourceGroup, virtualNetworkName, subnetName string) (subnet *armnetwork.Subnet, err error)
GetSubnet fetches a Subnet resource given a resourceGroup, virtualNetworkName and subnetName. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func GetVMImage ¶
func GetVMImage(ctx context.Context, vmImagesAccess *armcompute.VirtualMachineImagesClient, location string, imageRef armcompute.ImageReference) (vmImage *armcompute.VirtualMachineImage, err error)
GetVMImage fetches the VM Image given a location and image reference. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func GetVirtualMachine ¶
func GetVirtualMachine(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, resourceGroup, vmName string) (vm *armcompute.VirtualMachine, err error)
GetVirtualMachine gets a VirtualMachine for the given vm name and resource group. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func QueryAndMap ¶
func QueryAndMap[T any](ctx context.Context, client *armresourcegraph.Client, subscriptionID string, mapperFn MapperFn[T], queryTemplate string, templateArgs ...any) (results []T, err error)
QueryAndMap fires a resource graph KUSTO query constructing it from queryTemplate and templateArgs. The result of the query are then mapped using a mapperFn and the result or an error is returned. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func ResourceGroupExists ¶
func ResourceGroupExists(ctx context.Context, client *armresources.ResourceGroupsClient, resourceGroup string) (exists bool, err error)
ResourceGroupExists checks if the given resourceGroup exists. NOTE: All calls to this Azure API are instrumented as prometheus metric.
func SetCascadeDeleteForNICsAndDisks ¶
func SetCascadeDeleteForNICsAndDisks(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, resourceGroup string, vmName string, vmUpdateParams *armcompute.VirtualMachineUpdate) (err error)
SetCascadeDeleteForNICsAndDisks sets cascade deletion for NICs and Disks (OSDisk and DataDisks) associated to passed virtual machine. NOTE: All calls to this Azure API are instrumented as prometheus metric.