azure

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(opts *Options) (*API, error)

New creates a new Azure client. If no publish settings file is provided or can't be parsed, an anonymous client is created.

func (*API) CreateImage

func (a *API) CreateImage(name, resourceGroup, blobURI string) (armcompute.Image, error)

func (*API) CreateInstance

func (a *API) CreateInstance(name, userdata, sshkey, resourceGroup, storageAccount string) (*Machine, error)

func (*API) CreateResourceGroup

func (a *API) CreateResourceGroup(prefix string) (string, error)

func (*API) CreateStorageAccount

func (a *API) CreateStorageAccount(resourceGroup string) (string, error)

func (*API) DeleteBlockBlob

func (a *API) DeleteBlockBlob(storageaccount, key, container, blob string) error

func (*API) DeleteImage

func (a *API) DeleteImage(name, resourceGroup string) error

DeleteImage removes Azure image

func (*API) DeletePageBlob

func (a *API) DeletePageBlob(storageaccount, key, container, blobname string) error

func (*API) GC

func (a *API) GC(gracePeriod time.Duration) error

func (*API) GetBlockBlob

func (a *API) GetBlockBlob(storageaccount, key, container, name string) (io.ReadCloser, error)

func (*API) GetConsoleOutput

func (a *API) GetConsoleOutput(name, resourceGroup, storageAccount string) ([]byte, error)

func (*API) GetIPAddresses

func (a *API) GetIPAddresses(name, publicIPName, resourceGroup string) (string, string, error)

returns PublicIP, PrivateIP, error

func (*API) GetPrivateIP

func (a *API) GetPrivateIP(interfaceName, resourceGroup string) (string, error)

func (*API) GetPublicIP

func (a *API) GetPublicIP(name, resourceGroup string) (string, error)

func (*API) GetStorageServiceKeys

func (a *API) GetStorageServiceKeys(account, resourceGroup string) (armstorage.AccountListKeysResult, error)

func (*API) ListResourceGroups

func (a *API) ListResourceGroups() ([]*armresources.ResourceGroup, error)

func (*API) PageBlobExists

func (a *API) PageBlobExists(storageaccount, key, container, blobname string) (bool, error)

func (*API) PrepareNetworkResources

func (a *API) PrepareNetworkResources(resourceGroup string) (armnetwork.Subnet, error)

func (*API) SetupClients

func (a *API) SetupClients() error

func (*API) TerminateInstance

func (a *API) TerminateInstance(name, resourceGroup string) error

func (*API) TerminateResourceGroup

func (a *API) TerminateResourceGroup(name string) error

func (*API) UploadPageBlob

func (a *API) UploadPageBlob(storageaccount, key, file, container, blobname string) error

type Machine

type Machine struct {
	ID               string
	PublicIPAddress  string
	PrivateIPAddress string
	InterfaceName    string
	PublicIPName     string
}

type Options

type Options struct {
	*platform.Options

	AzureCredentials  string
	AzureSubscription string

	DiskURI   string
	Publisher string
	Offer     string
	Sku       string
	Version   string
	Size      string
	Location  string

	SubscriptionName string
	SubscriptionID   string

	// Azure Storage API endpoint suffix. If unset, the Azure SDK default will be used.
	StorageEndpointSuffix string
}

Jump to

Keyboard shortcuts

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