vmssvmclient

package
v1.27.21 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Overview

Package vmssvmclient implements the client for VirtualMachineScaleSetVM.

Index

Constants

View Source
const (
	// APIVersion is the API version for VMSS.
	APIVersion = "2022-03-01"
	// AzureStackCloudAPIVersion is the API version for Azure Stack
	AzureStackCloudAPIVersion = "2019-07-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 VMSS client Interface.

func New

func New(config *azclients.ClientConfig) *Client

New creates a new vmssVM client with ratelimiting.

func (*Client) Get

func (c *Client) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand compute.InstanceViewTypes) (compute.VirtualMachineScaleSetVM, *retry.Error)

Get gets a VirtualMachineScaleSetVM.

func (*Client) List

func (c *Client) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, expand string) ([]compute.VirtualMachineScaleSetVM, *retry.Error)

List gets a list of VirtualMachineScaleSetVMs in the virtualMachineScaleSet.

func (*Client) Update

func (c *Client) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) (*compute.VirtualMachineScaleSetVM, *retry.Error)

Update updates a VirtualMachineScaleSetVM.

func (*Client) UpdateAsync added in v1.0.16

func (c *Client) UpdateAsync(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) (*azure.Future, *retry.Error)

UpdateAsync updates a VirtualMachineScaleSetVM asynchronously

func (*Client) UpdateVMs

func (c *Client) UpdateVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string, batchSize int) *retry.Error

UpdateVMs updates a list of VirtualMachineScaleSetVM from map[instanceID]compute.VirtualMachineScaleSetVM. If the batch size > 0, it will send sync requests concurrently in batches, or it will send sync requests in sequence. No matter what the batch size is, it will process the async requests concurrently in one single batch.

func (*Client) WaitForUpdateResult added in v1.0.16

func (c *Client) WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) (*compute.VirtualMachineScaleSetVM, *retry.Error)

WaitForUpdateResult waits for the response of the update request

type Interface

type Interface interface {
	// Get gets a VirtualMachineScaleSetVM.
	Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand compute.InstanceViewTypes) (compute.VirtualMachineScaleSetVM, *retry.Error)

	// List gets a list of VirtualMachineScaleSetVMs in the virtualMachineScaleSet.
	List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, expand string) ([]compute.VirtualMachineScaleSetVM, *retry.Error)

	// Update updates a VirtualMachineScaleSetVM.
	Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) (*compute.VirtualMachineScaleSetVM, *retry.Error)

	// UpdateAsync updates a VirtualMachineScaleSetVM asynchronously
	UpdateAsync(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.VirtualMachineScaleSetVM, 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) (*compute.VirtualMachineScaleSetVM, *retry.Error)

	// UpdateVMs updates a list of VirtualMachineScaleSetVM from map[instanceID]compute.VirtualMachineScaleSetVM.
	UpdateVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string, batchSize int) *retry.Error
}

Interface is the client interface for VirtualMachineScaleSetVM. Don't forget to run "hack/update-mock-clients.sh" command to generate the mock client.

type VirtualMachineScaleSetVMListResultPage

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

VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.

func (*VirtualMachineScaleSetVMListResultPage) Next

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 (*VirtualMachineScaleSetVMListResultPage) NextWithContext

func (page *VirtualMachineScaleSetVMListResultPage) 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 (VirtualMachineScaleSetVMListResultPage) NotDone

NotDone returns true if the page enumeration should be started or is not yet complete.

func (VirtualMachineScaleSetVMListResultPage) Response

Response returns the raw server response from the last page request.

func (VirtualMachineScaleSetVMListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

Directories

Path Synopsis
Package mockvmssvmclient implements the mock client for VirtualMachineScaleSetVM.
Package mockvmssvmclient implements the mock client for VirtualMachineScaleSetVM.

Jump to

Keyboard shortcuts

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