azure

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunCommandLinuxShellScript = "RunShellScript"
	RunCommandPowerShellScript = "RunPowerShellScript"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Creds

type Creds struct {
	Token    *adal.ServicePrincipalToken
	TenantID string
}

func New

func New(clientID string, clientSecret string, tenantID string) (Creds, error)

New returns a Creds struct of ServicePrincipalToken and TenantID given azure creds

func (*Creds) GetSubscriptions

func (creds *Creds) GetSubscriptions(ctx context.Context, filters []*common.Filter) ([]*manager.ManagerNode, error)

func (*Creds) GetTenantIds

func (creds *Creds) GetTenantIds(ctx context.Context) ([]string, error)

func (*Creds) ListLocations

func (creds *Creds) ListLocations(ctx context.Context, subs []*manager.ManagerNode) ([]string, error)

ListLocations returns an array of all locations for the account

func (*Creds) ListSubscriptions

func (creds *Creds) ListSubscriptions(ctx context.Context) ([]*manager.ManagerNode, error)

ListSubscriptions returns an array of all subscriptions for the account

func (*Creds) ListTags

func (creds *Creds) ListTags(ctx context.Context, subs []*manager.ManagerNode) (map[string][]string, error)

ListTags returns an array of all tags for the account

func (*Creds) QueryField

func (creds *Creds) QueryField(ctx context.Context, filters []*common.Filter, field string) ([]string, error)

QueryField returns account tags, locations, subscriptions

func (*Creds) QueryVMState

func (creds *Creds) QueryVMState(ctx context.Context) ([]pgdb.InstanceState, error)

QueryVMState returns an array of ManagerNodes, one for each vm in the account, over all subscriptions

func (*Creds) QueryVMs

func (creds *Creds) QueryVMs(ctx context.Context, filters []*common.Filter) (map[string][]*manager.ManagerNode, error)

QueryVMs returns an array of ManagerNodes, one for each vm in the account, over all subscriptions

func (*Creds) SendRunCommandJob

func (creds *Creds) SendRunCommandJob(ctx context.Context, job *types.InspecJob, script string, scriptType string) error

func (*Creds) TestConnectivity

func (creds *Creds) TestConnectivity(ctx context.Context) error

TestConnectivity tests if we can reach azure and list subscriptions

Jump to

Keyboard shortcuts

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