interfaceclient

package
v1.29.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Overview

Package interfaceclient implements the client for network interfaces.

Index

Constants

View Source
const (
	// APIVersion is the API version for network.
	APIVersion = "2022-07-01"
	// AzureStackCloudAPIVersion is the API version for Azure Stack
	AzureStackCloudAPIVersion = "2018-11-01"

	// ComputeAPIVersion is the API version for compute. It is required to get VMSS network interface.
	ComputeAPIVersion = "2017-03-30"
	// AzureStackComputeAPIVersion is the API version for compute for Azure Stack. It is required to get VMSS network interface.
	AzureStackComputeAPIVersion = "2018-11-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 network interface client.

func New

func New(config *azclients.ClientConfig) *Client

New creates a new network interface client with ratelimiting.

func (*Client) CreateOrUpdate

func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters network.Interface) *retry.Error

CreateOrUpdate creates or updates a network.Interface.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) *retry.Error

Delete deletes a network interface by name.

func (*Client) Get

func (c *Client) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (network.Interface, *retry.Error)

Get gets a network.Interface.

func (*Client) GetVirtualMachineScaleSetNetworkInterface

func (c *Client) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (network.Interface, *retry.Error)

GetVirtualMachineScaleSetNetworkInterface gets a network.Interface of VMSS VM.

type Interface

type Interface interface {
	// Get gets a network.Interface.
	Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result network.Interface, rerr *retry.Error)

	// GetVirtualMachineScaleSetNetworkInterface gets a network.Interface of VMSS VM.
	GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result network.Interface, rerr *retry.Error)

	// CreateOrUpdate creates or updates a network.Interface.
	CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters network.Interface) *retry.Error

	// Delete deletes a network interface by name.
	Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) *retry.Error
}

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

Directories

Path Synopsis
Package mockinterfaceclient implements the mock client for network interfaces.
Package mockinterfaceclient implements the mock client for network interfaces.

Jump to

Keyboard shortcuts

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