Documentation ¶
Overview ¶
Package vmclient implements the client for VirtualMachines.
Index ¶
- Constants
- type Client
- func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, ...) *retry.Error
- func (c *Client) Delete(ctx context.Context, resourceGroupName string, VMName string) *retry.Error
- func (c *Client) Get(ctx context.Context, resourceGroupName string, VMName string, ...) (compute.VirtualMachine, *retry.Error)
- func (c *Client) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error)
- func (c *Client) ListVmssFlexVMsWithOnlyInstanceView(ctx context.Context, vmssFlexID string) ([]compute.VirtualMachine, *retry.Error)
- func (c *Client) ListVmssFlexVMsWithoutInstanceView(ctx context.Context, vmssFlexID string) ([]compute.VirtualMachine, *retry.Error)
- func (c *Client) Update(ctx context.Context, resourceGroupName string, VMName string, ...) *retry.Error
- func (c *Client) UpdateAsync(ctx context.Context, resourceGroupName string, VMName string, ...) (*azure.Future, *retry.Error)
- func (c *Client) WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) *retry.Error
- type Interface
- type VirtualMachineListResultPage
- func (page *VirtualMachineListResultPage) Next() error
- func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page VirtualMachineListResultPage) NotDone() bool
- func (page VirtualMachineListResultPage) Response() compute.VirtualMachineListResult
- func (page VirtualMachineListResultPage) Values() []compute.VirtualMachine
Constants ¶
const ( // APIVersion is the API version for VirtualMachine. APIVersion = "2020-12-01" // AzureStackCloudAPIVersion is the API version for Azure Stack AzureStackCloudAPIVersion = "2017-12-01" // AzureStackCloudName is the cloud name of Azure Stack AzureStackCloudName = "AZURESTACKCLOUD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // ARM throttling configures. RetryAfterReader time.Time RetryAfterWriter time.Time // contains filtered or unexported fields }
Client implements VirtualMachine client Interface.
func New ¶
func New(config *azclients.ClientConfig) *Client
New creates a new VirtualMachine client with ratelimiting.
func (*Client) CreateOrUpdate ¶
func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error
CreateOrUpdate creates or updates a VirtualMachine.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error)
Get gets a VirtualMachine.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error)
List gets a list of VirtualMachine in the resourceGroupName.
func (*Client) ListVmssFlexVMsWithOnlyInstanceView ¶ added in v1.25.0
func (c *Client) ListVmssFlexVMsWithOnlyInstanceView(ctx context.Context, vmssFlexID string) ([]compute.VirtualMachine, *retry.Error)
ListVmssFlexVMsWithOnlyInstanceView gets a list of VirtualMachine in the VMSS Flex with only InstanceView.
func (*Client) ListVmssFlexVMsWithoutInstanceView ¶ added in v1.25.0
func (c *Client) ListVmssFlexVMsWithoutInstanceView(ctx context.Context, vmssFlexID string) ([]compute.VirtualMachine, *retry.Error)
ListVmssFlexVMsWithoutInstanceView gets a list of VirtualMachine in the VMSS Flex without InstanceView.
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error
Update updates a VirtualMachine.
type Interface ¶
type Interface interface { // Get gets a VirtualMachine. Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error) // List gets a list of VirtualMachines in the resourceGroupName. List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error) // ListVmssFlexVMsWithoutInstanceView gets a list of VirtualMachine in the VMSS Flex without InstanceView. ListVmssFlexVMsWithoutInstanceView(ctx context.Context, vmssFlexID string) ([]compute.VirtualMachine, *retry.Error) // ListVmssFlexVMsWithOnlyInstanceView gets a list of VirtualMachine in the VMSS Flex with only InstanceView. ListVmssFlexVMsWithOnlyInstanceView(ctx context.Context, vmssFlexID string) ([]compute.VirtualMachine, *retry.Error) // CreateOrUpdate creates or updates a VirtualMachine. CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error // Update updates a VirtualMachine. Update(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error // UpdateAsync updates a VirtualMachine asynchronously UpdateAsync(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate, source string) (*azure.Future, *retry.Error) // WaitForUpdateResult waits for the response of the update request WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) *retry.Error // Delete deletes a VirtualMachine. Delete(ctx context.Context, resourceGroupName string, VMName string) *retry.Error }
Interface is the client interface for VirtualMachines. Don't forget to run "hack/update-mock-clients.sh" command to generate the mock client.
type VirtualMachineListResultPage ¶
type VirtualMachineListResultPage struct {
// contains filtered or unexported fields
}
VirtualMachineListResultPage contains a page of VirtualMachine values.
func (*VirtualMachineListResultPage) Next ¶
func (page *VirtualMachineListResultPage) Next() error
Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (*VirtualMachineListResultPage) NextWithContext ¶
func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.
func (VirtualMachineListResultPage) NotDone ¶
func (page VirtualMachineListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (VirtualMachineListResultPage) Response ¶
func (page VirtualMachineListResultPage) Response() compute.VirtualMachineListResult
Response returns the raw server response from the last page request.
func (VirtualMachineListResultPage) Values ¶
func (page VirtualMachineListResultPage) Values() []compute.VirtualMachine
Values returns the slice of values for the current page or nil if there are no values.
Directories ¶
Path | Synopsis |
---|---|
Package mockvmclient implements the mock client for VirtualMachines.
|
Package mockvmclient implements the mock client for VirtualMachines. |