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.v2020_12_01.models._models_py3.Resource
Disk

Constructor

Disk(*, location: str, tags: Optional[Dict[str, str]] = None, sku: Optional[azure.mgmt.compute.v2020_12_01.models._models_py3.DiskSku] = None, zones: Optional[List[str]] = None, extended_location: Optional[azure.mgmt.compute.v2020_12_01.models._models_py3.ExtendedLocation] = None, os_type: Optional[Union[str, azure.mgmt.compute.v2020_12_01.models._compute_management_client_enums.OperatingSystemTypes]] = None, hyper_v_generation: Optional[Union[str, azure.mgmt.compute.v2020_12_01.models._compute_management_client_enums.HyperVGeneration]] = None, purchase_plan: Optional[azure.mgmt.compute.v2020_12_01.models._models_py3.PurchasePlan] = None, creation_data: Optional[azure.mgmt.compute.v2020_12_01.models._models_py3.CreationData] = None, disk_size_gb: Optional[int] = None, encryption_settings_collection: Optional[azure.mgmt.compute.v2020_12_01.models._models_py3.EncryptionSettingsCollection] = None, disk_iops_read_write: Optional[int] = None, disk_m_bps_read_write: Optional[int] = None, disk_iops_read_only: Optional[int] = None, disk_m_bps_read_only: Optional[int] = None, encryption: Optional[azure.mgmt.compute.v2020_12_01.models._models_py3.Encryption] = None, max_shares: Optional[int] = None, network_access_policy: Optional[Union[str, azure.mgmt.compute.v2020_12_01.models._compute_management_client_enums.NetworkAccessPolicy]] = None, disk_access_id: Optional[str] = None, tier: Optional[str] = None, bursting_enabled: Optional[bool] = None, supports_hibernation: Optional[bool] = None, security_profile: Optional[azure.mgmt.compute.v2020_12_01.models._models_py3.DiskSecurityProfile] = 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, UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS.

zones
list[str]
Required

The Logical zone list for Disk.

extended_location
ExtendedLocation
Required

The extended location where the disk will be created. Extended location cannot be changed.

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".

purchase_plan
PurchasePlan
Required

Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}.

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 disk 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
<xref:long>
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.

disk_iops_read_only
<xref:long>
Required

The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.

disk_m_bps_read_only
<xref:long>
Required

The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.

encryption
Encryption
Required

Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.

max_shares
int
Required

The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.

network_access_policy
str or NetworkAccessPolicy
Required

Policy for accessing the disk via network. Possible values include: "AllowAll", "AllowPrivate", "DenyAll".

disk_access_id
str
Required

ARM id of the DiskAccess resource for using private endpoints on disks.

tier
str
Required

Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.

bursting_enabled
bool
Required

Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.

supports_hibernation
bool
Required

Indicates the OS on a disk supports hibernation.

security_profile
DiskSecurityProfile
Required

Contains the security related information for the resource.

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.

managed_by_extended
list[str]

List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.

time_created
datetime

The time when the disk was created.

disk_size_bytes
<xref:long>

The size of the disk in bytes. This field is read only.

unique_id
str

Unique Guid identifying the resource.

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".

share_info
list[ShareInfoElement]

Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.

property_updates_in_progress
PropertyUpdatesInProgress

Properties of the disk for which update is pending.