virtualmachinedisk

package
v68.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 3 Imported by: 381

Documentation

Overview

Package virtualmachinedisk provides a client for Virtual Machine Disks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDataDiskParameters

type CreateDataDiskParameters struct {
	XMLName             xml.Name        `xml:"http://schemas.microsoft.com/windowsazure DataVirtualHardDisk"`
	HostCaching         HostCachingType `xml:",omitempty"`
	DiskLabel           string          `xml:",omitempty"`
	DiskName            string          `xml:",omitempty"`
	Lun                 int             `xml:",omitempty"`
	LogicalDiskSizeInGB int             `xml:",omitempty"`
	MediaLink           string
	SourceMediaLink     string `xml:",omitempty"`
}

CreateDataDiskParameters represents a data disk

https://msdn.microsoft.com/en-us/library/azure/jj157188.aspx

type CreateDiskParameters

type CreateDiskParameters struct {
	XMLName   xml.Name            `xml:"http://schemas.microsoft.com/windowsazure Disk"`
	OS        OperatingSystemType `xml:",omitempty"`
	Label     string
	MediaLink string `xml:",omitempty"`
	Name      string
}

CreateDiskParameters represents a disk

https://msdn.microsoft.com/en-us/library/azure/jj157188.aspx

type DataDiskResponse

type DataDiskResponse struct {
	XMLName             xml.Name `xml:"http://schemas.microsoft.com/windowsazure DataVirtualHardDisk"`
	HostCaching         HostCachingType
	DiskLabel           string
	DiskName            string
	Lun                 int
	LogicalDiskSizeInGB int
	MediaLink           string
}

DataDiskResponse represents a data disk

https://msdn.microsoft.com/en-us/library/azure/jj157188.aspx

type DiskClient

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

DiskClient is used to perform operations on Azure Disks

func NewClient

func NewClient(client management.Client) DiskClient

NewClient is used to instantiate a new DiskClient from an Azure client

func (DiskClient) AddDataDisk

func (c DiskClient) AddDataDisk(
	service string,
	deployment string,
	role string,
	params CreateDataDiskParameters) (management.OperationID, error)

AddDataDisk adds a data disk to a Virtual Machine

https://msdn.microsoft.com/en-us/library/azure/jj157199.aspx

func (DiskClient) AddDisk

AddDisk adds an operating system disk or data disk to the user image repository

https://msdn.microsoft.com/en-us/library/azure/jj157178.aspx

func (DiskClient) DeleteDataDisk

func (c DiskClient) DeleteDataDisk(
	service string,
	deployment string,
	role string,
	lun int,
	deleteVHD bool) (management.OperationID, error)

DeleteDataDisk removes the specified data disk from a Virtual Machine

https://msdn.microsoft.com/en-us/library/azure/jj157179.aspx

func (DiskClient) DeleteDisk

func (c DiskClient) DeleteDisk(name string, deleteVHD bool) error

DeleteDisk deletes the specified data or operating system disk from the image repository that is associated with the specified subscription

https://msdn.microsoft.com/en-us/library/azure/jj157200.aspx

func (DiskClient) GetDataDisk

func (c DiskClient) GetDataDisk(
	service string,
	deployment string,
	role string,
	lun int) (DataDiskResponse, error)

GetDataDisk retrieves the specified data disk from a Virtual Machine

https://msdn.microsoft.com/en-us/library/azure/jj157180.aspx

func (DiskClient) GetDisk

func (c DiskClient) GetDisk(name string) (DiskResponse, error)

GetDisk retrieves information about the specified disk

https://msdn.microsoft.com/en-us/library/azure/dn775053.aspx

func (DiskClient) ListDisks

func (c DiskClient) ListDisks() (ListDiskResponse, error)

ListDisks retrieves a list of the disks in the image repository that is associated with the specified subscription

https://msdn.microsoft.com/en-us/library/azure/jj157176.aspx

func (DiskClient) UpdateDataDisk

func (c DiskClient) UpdateDataDisk(
	service string,
	deployment string,
	role string,
	lun int,
	params UpdateDataDiskParameters) (management.OperationID, error)

UpdateDataDisk updates the configuration of the specified data disk that is attached to the specified Virtual Machine

https://msdn.microsoft.com/en-us/library/azure/jj157190.aspx

func (DiskClient) UpdateDisk

func (c DiskClient) UpdateDisk(
	name string,
	params UpdateDiskParameters) (management.OperationID, error)

UpdateDisk updates the label of an existing disk in the image repository that is associated with the specified subscription

https://msdn.microsoft.com/en-us/library/azure/jj157205.aspx

type DiskResponse

type DiskResponse struct {
	XMLName             xml.Name `xml:"http://schemas.microsoft.com/windowsazure Disk"`
	AffinityGroup       string
	AttachedTo          Resource
	IsCorrupted         bool
	OS                  OperatingSystemType
	Location            string
	LogicalDiskSizeInGB int
	MediaLink           string
	Name                string
	SourceImageName     string
	CreatedTime         string
	IOType              IOType
}

DiskResponse represents a disk

https://msdn.microsoft.com/en-us/library/azure/jj157188.aspx

type HostCachingType

type HostCachingType string

HostCachingType represents a host caching type

const (
	HostCachingTypeNone      HostCachingType = "None"
	HostCachingTypeReadOnly  HostCachingType = "ReadOnly"
	HostCachingTypeReadWrite HostCachingType = "ReadWrite"
)

These constants represent the valid host caching types

type IOType

type IOType string

IOType represents an IO type

const (
	IOTypeProvisioned IOType = "Provisioned"
	IOTypeStandard    IOType = "Standard"
)

These constants represent the possible IO types

type ListDiskResponse

type ListDiskResponse struct {
	XMLName xml.Name `xml:"http://schemas.microsoft.com/windowsazure Disks"`
	Disk    []DiskResponse
}

ListDiskResponse represents a disk

https://msdn.microsoft.com/en-us/library/azure/jj157188.aspx

type OperatingSystemType

type OperatingSystemType string

OperatingSystemType represents an operating system type

const (
	OperatingSystemTypeNull    OperatingSystemType = "NULL"
	OperatingSystemTypeLinux   OperatingSystemType = "Linux"
	OperatingSystemTypeWindows OperatingSystemType = "Windows"
)

These constants represent the valid operating system types

type Resource

type Resource struct {
	XMLName           xml.Name `xml:"http://schemas.microsoft.com/windowsazure AttachedTo"`
	DeploymentName    string
	HostedServiceName string
	RoleName          string
}

Resource describes the resource details a disk is currently attached to

type UpdateDataDiskParameters

type UpdateDataDiskParameters struct {
	XMLName     xml.Name        `xml:"http://schemas.microsoft.com/windowsazure DataVirtualHardDisk"`
	HostCaching HostCachingType `xml:",omitempty"`
	DiskName    string
	Lun         int
	MediaLink   string
}

UpdateDataDiskParameters represents a data disk

https://msdn.microsoft.com/en-us/library/azure/jj157188.aspx

type UpdateDiskParameters

type UpdateDiskParameters struct {
	XMLName         xml.Name `xml:"http://schemas.microsoft.com/windowsazure Disk"`
	Label           string   `xml:",omitempty"`
	Name            string
	ResizedSizeInGB int `xml:",omitempty"`
}

UpdateDiskParameters represents a disk

https://msdn.microsoft.com/en-us/library/azure/jj157188.aspx

Jump to

Keyboard shortcuts

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