Documentation ¶
Index ¶
- type Service
- type UpdateFunctor
- type VirtualMachineClient
- func (c *VirtualMachineClient) CreateOrUpdate(ctx context.Context, group, name string, compute *compute.VirtualMachine) (*compute.VirtualMachine, error)
- func (c *VirtualMachineClient) Delete(ctx context.Context, group string, name string) error
- func (c *VirtualMachineClient) DiskAttach(ctx context.Context, group string, vmName, diskName string) (err error)
- func (c *VirtualMachineClient) DiskDetach(ctx context.Context, group string, vmName, diskName string) (err error)
- func (c *VirtualMachineClient) Get(ctx context.Context, group, name string) (*[]compute.VirtualMachine, error)
- func (c *VirtualMachineClient) GetByComputerName(ctx context.Context, group string, computerName string) (*[]compute.VirtualMachine, error)
- func (c *VirtualMachineClient) ListIPs(ctx context.Context, group, name string) ([]string, error)
- func (c *VirtualMachineClient) NetworkInterfaceAdd(ctx context.Context, group string, vmName, nicName string) (err error)
- func (c *VirtualMachineClient) NetworkInterfaceRemove(ctx context.Context, group string, vmName, nicName string) (err error)
- func (c *VirtualMachineClient) Query(ctx context.Context, group, query string) (*[]compute.VirtualMachine, error)
- func (c *VirtualMachineClient) Resize(ctx context.Context, group string, vmName string, ...) (err error)
- func (c *VirtualMachineClient) Restart(ctx context.Context, group string, name string) (err error)
- func (c *VirtualMachineClient) RunCommand(ctx context.Context, group, vmName string, ...) (response *compute.VirtualMachineRunCommandResponse, err error)
- func (c *VirtualMachineClient) Start(ctx context.Context, group string, name string) (err error)
- func (c *VirtualMachineClient) Stop(ctx context.Context, group string, name string) (err error)
- func (c *VirtualMachineClient) Update(ctx context.Context, group string, vmName string, updateFunctor UpdateFunctor) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { Get(context.Context, string, string) (*[]compute.VirtualMachine, error) CreateOrUpdate(context.Context, string, string, *compute.VirtualMachine) (*compute.VirtualMachine, error) Delete(context.Context, string, string) error Query(context.Context, string, string) (*[]compute.VirtualMachine, error) Start(context.Context, string, string) error Stop(context.Context, string, string) error RunCommand(context.Context, string, string, *compute.VirtualMachineRunCommandRequest) (*compute.VirtualMachineRunCommandResponse, error) }
type UpdateFunctor ¶ added in v0.10.8
type UpdateFunctor interface {
Update(context.Context, *compute.VirtualMachine) (*compute.VirtualMachine, error)
}
type VirtualMachineClient ¶
type VirtualMachineClient struct { compute.BaseClient // contains filtered or unexported fields }
func NewVirtualMachineClient ¶
func NewVirtualMachineClient(cloudFQDN string, authorizer auth.Authorizer) (*VirtualMachineClient, error)
func (*VirtualMachineClient) CreateOrUpdate ¶
func (c *VirtualMachineClient) CreateOrUpdate(ctx context.Context, group, name string, compute *compute.VirtualMachine) (*compute.VirtualMachine, error)
CreateOrUpdate methods invokes create or update on the client
func (*VirtualMachineClient) DiskAttach ¶
func (*VirtualMachineClient) DiskDetach ¶
func (*VirtualMachineClient) Get ¶
func (c *VirtualMachineClient) Get(ctx context.Context, group, name string) (*[]compute.VirtualMachine, error)
Get methods invokes the client Get method
func (*VirtualMachineClient) GetByComputerName ¶ added in v0.10.5
func (c *VirtualMachineClient) GetByComputerName(ctx context.Context, group string, computerName string) (*[]compute.VirtualMachine, error)
Get the Virtual Machine by querying for the specified computer name
func (*VirtualMachineClient) NetworkInterfaceAdd ¶
func (*VirtualMachineClient) NetworkInterfaceRemove ¶
func (*VirtualMachineClient) Query ¶ added in v0.10.5
func (c *VirtualMachineClient) Query(ctx context.Context, group, query string) (*[]compute.VirtualMachine, error)
Query method invokes the client Get method and uses the provided query to filter the returned results
func (*VirtualMachineClient) Resize ¶
func (c *VirtualMachineClient) Resize(ctx context.Context, group string, vmName string, newSize compute.VirtualMachineSizeTypes, newCustomSize *compute.VirtualMachineCustomSize) (err error)
Resize the Virtual Machine
func (*VirtualMachineClient) RunCommand ¶ added in v0.10.11
func (c *VirtualMachineClient) RunCommand(ctx context.Context, group, vmName string, request *compute.VirtualMachineRunCommandRequest) (response *compute.VirtualMachineRunCommandResponse, err error)
func (*VirtualMachineClient) Update ¶ added in v0.10.8
func (c *VirtualMachineClient) Update(ctx context.Context, group string, vmName string, updateFunctor UpdateFunctor) (err error)
Update the VM with a retry
Click to show internal directories.
Click to hide internal directories.