azure.mgmt.compute.v2018_09_30.models module

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, storage_account_id: str = None, image_reference=None, source_uri: str = None, source_resource_id: 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, creation_data, tags=None, sku=None, zones=None, os_type=None, hyper_vgeneration=None, disk_size_gb: int = None, encryption_settings_collection=None, disk_iops_read_write: int = None, disk_mbps_read_write: 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]) – Resource tags

  • sku (DiskSku) –

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

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

  • hyper_vgeneration (str or HyperVGeneration) – 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) – 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_mbps_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.DiskSku(*, name=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. Default value: “Standard” .

class azure.mgmt.compute.v2018_09_30.models.DiskUpdate(*, os_type=None, disk_size_gb: int = None, encryption_settings_collection=None, disk_iops_read_write: int = None, disk_mbps_read_write: int = None, tags=None, sku=None, **kwargs)[source]

Bases: msrest.serialization.Model

Disk update resource.

Parameters
  • 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_mbps_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.

  • tags (dict[str, str]) – Resource tags

  • sku (DiskSku) –

class azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection(*, enabled: bool, encryption_settings=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=None, key_encryption_key=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, 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.ImageDiskReference(*, id: str, lun: 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, 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, 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.Resource(*, location: str, tags=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]) – Resource tags

class azure.mgmt.compute.v2018_09_30.models.Snapshot(*, location: str, creation_data, tags=None, sku=None, os_type=None, hyper_vgeneration=None, disk_size_gb: int = None, encryption_settings_collection=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]) – Resource tags

  • sku (SnapshotSku) –

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

  • hyper_vgeneration (str or HyperVGeneration) – 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) – 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.SnapshotSku(*, name=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. Default value: “Standard” .

class azure.mgmt.compute.v2018_09_30.models.SnapshotUpdate(*, os_type=None, disk_size_gb: int = None, encryption_settings_collection=None, tags=None, sku=None, **kwargs)[source]

Bases: msrest.serialization.Model

Snapshot update resource.

Parameters
  • 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.

  • tags (dict[str, str]) – Resource tags

  • sku (SnapshotSku) –

class azure.mgmt.compute.v2018_09_30.models.SourceVault(*, id: 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

class azure.mgmt.compute.v2018_09_30.models.DiskPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Disk object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.compute.v2018_09_30.models.SnapshotPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Snapshot object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.compute.v2018_09_30.models.DiskStorageAccountTypes[source]

Bases: str, enum.Enum

An enumeration.

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.OperatingSystemTypes[source]

Bases: str, enum.Enum

An enumeration.

linux = 'Linux'
windows = 'Windows'
class azure.mgmt.compute.v2018_09_30.models.HyperVGeneration[source]

Bases: str, enum.Enum

An enumeration.

v1 = 'V1'
v2 = 'V2'
class azure.mgmt.compute.v2018_09_30.models.DiskCreateOption[source]

Bases: str, enum.Enum

An enumeration.

attach = 'Attach'
copy = 'Copy'
empty = 'Empty'
from_image = 'FromImage'
import_enum = 'Import'
restore = 'Restore'
upload = 'Upload'
class azure.mgmt.compute.v2018_09_30.models.DiskState[source]

Bases: str, enum.Enum

An enumeration.

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

Bases: str, enum.Enum

An enumeration.

premium_lrs = 'Premium_LRS'
standard_lrs = 'Standard_LRS'
standard_zrs = 'Standard_ZRS'
class azure.mgmt.compute.v2018_09_30.models.AccessLevel[source]

Bases: str, enum.Enum

An enumeration.

none = 'None'
read = 'Read'
write = 'Write'