azure.mgmt.compute.v2018_09_30.models module

class azure.mgmt.compute.v2018_09_30.models.AccessLevel(value)[source]

Bases: str, enum.Enum

An enumeration.

none = 'None'
read = 'Read'
write = 'Write'
class azure.mgmt.compute.v2018_09_30.models.AccessUri(**kwargs)[source]

Bases: msrest.serialization.Model

A disk access SAS uri.

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

Variables

access_sas (str) – A SAS uri for accessing a disk.

class azure.mgmt.compute.v2018_09_30.models.CreationData(*, create_option: Union[str, DiskCreateOption], storage_account_id: Optional[str] = None, image_reference: Optional[ImageDiskReference] = None, source_uri: Optional[str] = None, source_resource_id: Optional[str] = None, **kwargs)[source]

Bases: msrest.serialization.Model

Data used when creating a disk.

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

Parameters
  • create_option (str or DiskCreateOption) – Required. This enumerates the possible sources of a disk’s creation. Possible values include: “Empty”, “Attach”, “FromImage”, “Import”, “Copy”, “Restore”, “Upload”.

  • storage_account_id (str) – If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription.

  • image_reference (ImageDiskReference) – Disk source information.

  • source_uri (str) – If createOption is Import, this is the URI of a blob to be imported into a managed disk.

  • source_resource_id (str) – If createOption is Copy, this is the ARM id of the source snapshot or disk.

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

Bases: azure.mgmt.compute.v2018_09_30.models._models_py3.Resource

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.

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

Parameters
  • location (str) – Required. Resource location.

  • tags (dict[str, str]) – A set of tags. Resource tags.

  • sku (DiskSku) – The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.

  • zones (list[str]) – The Logical zone list for Disk.

  • os_type (str or OperatingSystemTypes) – The Operating System type. Possible values include: “Windows”, “Linux”.

  • hyper_v_generation (str or HyperVGeneration) – The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: “V1”, “V2”.

  • creation_data (CreationData) – Disk source information. CreationData information cannot be changed after the disk has been created.

  • disk_size_gb (int) – 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) – Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

  • disk_iops_read_write (long) – 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) – 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.

class azure.mgmt.compute.v2018_09_30.models.DiskCreateOption(value)[source]

Bases: str, enum.Enum

This enumerates the possible sources of a disk’s creation.

attach = 'Attach'
copy = 'Copy'
empty = 'Empty'
from_image = 'FromImage'
import_enum = 'Import'
restore = 'Restore'
upload = 'Upload'
class azure.mgmt.compute.v2018_09_30.models.DiskList(*, value: List[Disk], next_link: Optional[str] = None, **kwargs)[source]

Bases: msrest.serialization.Model

The List Disks operation response.

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

Parameters
  • value (list[Disk]) – Required. A list of disks.

  • next_link (str) – The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.

class azure.mgmt.compute.v2018_09_30.models.DiskSku(*, name: Optional[Union[str, DiskStorageAccountTypes]] = None, **kwargs)[source]

Bases: msrest.serialization.Model

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

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

Parameters

name (str or DiskStorageAccountTypes) – The sku name. Possible values include: “Standard_LRS”, “Premium_LRS”, “StandardSSD_LRS”, “UltraSSD_LRS”.

Variables

tier (str) – The sku tier.

class azure.mgmt.compute.v2018_09_30.models.DiskState(value)[source]

Bases: str, enum.Enum

The state of the disk.

active_sas = 'ActiveSAS'
active_upload = 'ActiveUpload'
attached = 'Attached'
ready_to_upload = 'ReadyToUpload'
reserved = 'Reserved'
unattached = 'Unattached'
class azure.mgmt.compute.v2018_09_30.models.DiskStorageAccountTypes(value)[source]

Bases: str, enum.Enum

The sku name.

premium_lrs = 'Premium_LRS'
standard_lrs = 'Standard_LRS'
standard_ssd_lrs = 'StandardSSD_LRS'
ultra_ssd_lrs = 'UltraSSD_LRS'
class azure.mgmt.compute.v2018_09_30.models.DiskUpdate(*, tags: Optional[Dict[str, str]] = None, sku: Optional[DiskSku] = None, os_type: Optional[Union[str, OperatingSystemTypes]] = None, disk_size_gb: Optional[int] = None, encryption_settings_collection: Optional[EncryptionSettingsCollection] = None, disk_iops_read_write: Optional[int] = None, disk_m_bps_read_write: Optional[int] = None, **kwargs)[source]

Bases: msrest.serialization.Model

Disk update resource.

Parameters
  • tags (dict[str, str]) – A set of tags. Resource tags.

  • sku (DiskSku) – The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.

  • os_type (str or OperatingSystemTypes) – the Operating System type. Possible values include: “Windows”, “Linux”.

  • disk_size_gb (int) – 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) – Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

  • disk_iops_read_write (long) – 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) – 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.

class azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection(*, enabled: bool, encryption_settings: Optional[List[EncryptionSettingsElement]] = None, **kwargs)[source]

Bases: msrest.serialization.Model

Encryption settings for disk or snapshot.

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

Parameters
  • enabled (bool) – Required. Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.

  • encryption_settings (list[EncryptionSettingsElement]) – A collection of encryption settings, one for each disk volume.

class azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsElement(*, disk_encryption_key: Optional[KeyVaultAndSecretReference] = None, key_encryption_key: Optional[KeyVaultAndKeyReference] = None, **kwargs)[source]

Bases: msrest.serialization.Model

Encryption settings for one disk volume.

Parameters
  • disk_encryption_key (KeyVaultAndSecretReference) – Key Vault Secret Url and vault id of the disk encryption key.

  • key_encryption_key (KeyVaultAndKeyReference) – Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.

class azure.mgmt.compute.v2018_09_30.models.GrantAccessData(*, access: Union[str, AccessLevel], duration_in_seconds: int, **kwargs)[source]

Bases: msrest.serialization.Model

Data used for requesting a SAS.

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

Parameters
  • access (str or AccessLevel) – Required. Possible values include: “None”, “Read”, “Write”.

  • duration_in_seconds (int) – Required. Time duration in seconds until the SAS access expires.

class azure.mgmt.compute.v2018_09_30.models.HyperVGeneration(value)[source]

Bases: str, enum.Enum

The hypervisor generation of the Virtual Machine. Applicable to OS disks only.

v1 = 'V1'
v2 = 'V2'
class azure.mgmt.compute.v2018_09_30.models.ImageDiskReference(*, id: str, lun: Optional[int] = None, **kwargs)[source]

Bases: msrest.serialization.Model

The source image used for creating the disk.

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

Parameters
  • id (str) – Required. A relative uri containing either a Platform Image Repository or user image reference.

  • lun (int) – If the disk is created from an image’s data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.

class azure.mgmt.compute.v2018_09_30.models.KeyVaultAndKeyReference(*, source_vault: azure.mgmt.compute.v2018_09_30.models._models_py3.SourceVault, key_url: str, **kwargs)[source]

Bases: msrest.serialization.Model

Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey.

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

Parameters
  • source_vault (SourceVault) – Required. Resource id of the KeyVault containing the key or secret.

  • key_url (str) – Required. Url pointing to a key or secret in KeyVault.

class azure.mgmt.compute.v2018_09_30.models.KeyVaultAndSecretReference(*, source_vault: azure.mgmt.compute.v2018_09_30.models._models_py3.SourceVault, secret_url: str, **kwargs)[source]

Bases: msrest.serialization.Model

Key Vault Secret Url and vault id of the encryption key.

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

Parameters
  • source_vault (SourceVault) – Required. Resource id of the KeyVault containing the key or secret.

  • secret_url (str) – Required. Url pointing to a key or secret in KeyVault.

class azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes(value)[source]

Bases: str, enum.Enum

The Operating System type.

linux = 'Linux'
windows = 'Windows'
class azure.mgmt.compute.v2018_09_30.models.Resource(*, location: str, tags: Optional[Dict[str, str]] = None, **kwargs)[source]

Bases: msrest.serialization.Model

The Resource model definition.

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.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

Parameters
  • location (str) – Required. Resource location.

  • tags (dict[str, str]) – A set of tags. Resource tags.

class azure.mgmt.compute.v2018_09_30.models.Snapshot(*, location: str, tags: Optional[Dict[str, str]] = None, sku: Optional[SnapshotSku] = None, os_type: Optional[Union[str, OperatingSystemTypes]] = None, hyper_v_generation: Optional[Union[str, HyperVGeneration]] = None, creation_data: Optional[CreationData] = None, disk_size_gb: Optional[int] = None, encryption_settings_collection: Optional[EncryptionSettingsCollection] = None, **kwargs)[source]

Bases: azure.mgmt.compute.v2018_09_30.models._models_py3.Resource

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

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • managed_by (str) – Unused. Always Null.

  • time_created (datetime) – The time when the disk was created.

  • provisioning_state (str) – The disk provisioning state.

Parameters
  • location (str) – Required. Resource location.

  • tags (dict[str, str]) – A set of tags. Resource tags.

  • sku (SnapshotSku) – The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.

  • os_type (str or OperatingSystemTypes) – The Operating System type. Possible values include: “Windows”, “Linux”.

  • hyper_v_generation (str or HyperVGeneration) – The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: “V1”, “V2”.

  • creation_data (CreationData) – Disk source information. CreationData information cannot be changed after the disk has been created.

  • disk_size_gb (int) – 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) – Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

class azure.mgmt.compute.v2018_09_30.models.SnapshotList(*, value: List[Snapshot], next_link: Optional[str] = None, **kwargs)[source]

Bases: msrest.serialization.Model

The List Snapshots operation response.

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

Parameters
  • value (list[Snapshot]) – Required. A list of snapshots.

  • next_link (str) – The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.

class azure.mgmt.compute.v2018_09_30.models.SnapshotSku(*, name: Optional[Union[str, SnapshotStorageAccountTypes]] = None, **kwargs)[source]

Bases: msrest.serialization.Model

The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.

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

Parameters

name (str or SnapshotStorageAccountTypes) – The sku name. Possible values include: “Standard_LRS”, “Premium_LRS”, “Standard_ZRS”.

Variables

tier (str) – The sku tier.

class azure.mgmt.compute.v2018_09_30.models.SnapshotStorageAccountTypes(value)[source]

Bases: str, enum.Enum

The sku name.

premium_lrs = 'Premium_LRS'
standard_lrs = 'Standard_LRS'
standard_zrs = 'Standard_ZRS'
class azure.mgmt.compute.v2018_09_30.models.SnapshotUpdate(*, tags: Optional[Dict[str, str]] = None, sku: Optional[SnapshotSku] = None, os_type: Optional[Union[str, OperatingSystemTypes]] = None, disk_size_gb: Optional[int] = None, encryption_settings_collection: Optional[EncryptionSettingsCollection] = None, **kwargs)[source]

Bases: msrest.serialization.Model

Snapshot update resource.

Parameters
  • tags (dict[str, str]) – A set of tags. Resource tags.

  • sku (SnapshotSku) – The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.

  • os_type (str or OperatingSystemTypes) – the Operating System type. Possible values include: “Windows”, “Linux”.

  • disk_size_gb (int) – 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) – Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

class azure.mgmt.compute.v2018_09_30.models.SourceVault(*, id: Optional[str] = None, **kwargs)[source]

Bases: msrest.serialization.Model

The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}.

Parameters

id (str) – Resource Id.