Documentation
¶
Index ¶
- type AzureClient
- func (c AzureClient) GetAllNics() network.InterfaceListResultPage
- func (c AzureClient) GetAllVM() (result compute.VirtualMachineListResultPage)
- func (c AzureClient) GetNicFromNicName(nicName string) network.Interface
- func (c AzureClient) GetNicFromVMName(vmName string) network.Interface
- func (c AzureClient) GetVM(vmname string) (vm compute.VirtualMachine)
- func (c AzureClient) PutNic(vmName string) autorest.Response
- func (c AzureClient) PutVM(vmname string) (res autorest.Response)
- type ComputeInstanceMetadata
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureClient ¶
type AzureClient struct { compute.VirtualMachinesClient compute.DisksClient compute.VirtualMachineScaleSetsClient network.InterfacesClient }
AzureClient This is an authorized client for Azure communication.
var Client AzureClient
Client Authorized Azure Client
func NewClient ¶
func NewClient(config Config) (client AzureClient)
NewClient Initialized an authorized Azure client
func (AzureClient) GetAllNics ¶
func (c AzureClient) GetAllNics() network.InterfaceListResultPage
GetAllNics Returns a ListResultPage of all Interfaces in the ResourceGroup of the Config
func (AzureClient) GetAllVM ¶
func (c AzureClient) GetAllVM() (result compute.VirtualMachineListResultPage)
GetAllVM Returns a ListResultPage of all VMs in the ResourceGroup of the Config
func (AzureClient) GetNicFromNicName ¶
func (c AzureClient) GetNicFromNicName(nicName string) network.Interface
GetNicFromNicName returns nic object based on nic name
func (AzureClient) GetNicFromVMName ¶
func (c AzureClient) GetNicFromVMName(vmName string) network.Interface
GetNicFromVMName returns primary nic object based on vm name
func (AzureClient) GetVM ¶
func (c AzureClient) GetVM(vmname string) (vm compute.VirtualMachine)
GetVM Returns a VirtualMachine object.
type ComputeInstanceMetadata ¶
type ComputeInstanceMetadata struct { Environment string `json:"azEnvironment,omitempty"` Location string `json:"location,omitempty"` Name string `json:"name,omitempty"` Offer string `json:"offer,omitempty"` OsType string `json:"osType,omitempty"` PlacementGroupID string `json:"placement_group_id,omitempty"` Plan map[string]string `json:"plan,omitempty"` PlatformFaultDomain string `json:"platformFaultDomain,omitempty"` PlatformUpdateDomain string `json:"platformUpdateDomain,omitempty"` Provider string `json:"provider,omitempty"` PublicKeys []map[string]string `json:"publicKeys,omitempty"` Publisher string `json:"publisher,omitempty"` ResourceGroupName string `json:"resourceGroupName,omitempty"` Sku string `json:"sku,omitempty"` SubscriptionID string `json:"subscriptionId,omitempty"` Tags string `json:"tags,omitempty"` Version string `json:"version,omitempty"` VMID string `json:"vmId,omitempty"` VMScaleSetName string `json:"vmScaleSetName,omitempty"` VMSize string `json:"vmSize,omitempty"` Zone string `json:"zone,omitempty"` }
ComputeInstanceMetadata denotes the compute specific instance metadata from Azure Instance Metadata Service
type Config ¶
type Config struct { VMName string SubscriptionID string Location string ResourceGroup string AzureEnvironment string EnvironmentEndpoint string }
Config returns a config with the Azure resource group and Azure location to perform requests
var Conf Config
Conf Loaded Configuration from azure.json
func LoadConfig ¶
func LoadConfig() (config Config)
LoadConfig Returns a Config struct created from Environment Variables