Disk Class

Disk resource.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Inheritance
azure.mgmt.compute.v2018_09_30.models._models_py3.Resource
Disk

Constructor

Disk(*, location: str, tags: Optional[Dict[str, str]] = None, sku: Optional[azure.mgmt.compute.v2018_09_30.models._models_py3.DiskSku] = None, zones: Optional[List[str]] = None, os_type: Optional[Union[str, azure.mgmt.compute.v2018_09_30.models._compute_management_client_enums.OperatingSystemTypes]] = None, hyper_v_generation: Optional[Union[str, azure.mgmt.compute.v2018_09_30.models._compute_management_client_enums.HyperVGeneration]] = None, creation_data: Optional[azure.mgmt.compute.v2018_09_30.models._models_py3.CreationData] = None, disk_size_gb: Optional[int] = None, encryption_settings_collection: Optional[azure.mgmt.compute.v2018_09_30.models._models_py3.EncryptionSettingsCollection] = None, disk_iops_read_write: Optional[int] = None, disk_m_bps_read_write: Optional[int] = None, **kwargs)

Parameters

location
str
Required

Required. Resource location.

tags
dict[str, str]
Required

A set of tags. Resource tags.

sku
DiskSku
Required

The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.

zones
list[str]
Required

The Logical zone list for Disk.

os_type
str or OperatingSystemTypes
Required

The Operating System type. Possible values include: "Windows", "Linux".

hyper_v_generation
str or HyperVGeneration
Required

The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: "V1", "V2".

creation_data
CreationData
Required

Disk source information. CreationData information cannot be changed after the disk has been created.

disk_size_gb
int
Required

If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.

encryption_settings_collection
EncryptionSettingsCollection
Required

Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

disk_iops_read_write
<xref:long>
Required

The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.

disk_m_bps_read_write
int
Required

The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.

Variables

id
str

Resource Id.

name
str

Resource name.

type
str

Resource type.

managed_by
str

A relative URI containing the ID of the VM that has the disk attached.

time_created
datetime

The time when the disk was created.

provisioning_state
str

The disk provisioning state.

disk_state
str or DiskState

The state of the disk. Possible values include: "Unattached", "Attached", "Reserved", "ActiveSAS", "ReadyToUpload", "ActiveUpload".