  def CreateDiskFromSnapshot(
      self,
      snapshot: 'AZComputeSnapshot',
      region: Optional[str] = None,
      disk_name: Optional[str] = None,
      disk_name_prefix: Optional[str] = None,
      disk_type: str = 'Standard_LRS') -> 'AZComputeDisk':
    """Create a new disk based on a Snapshot.

    Args:
      snapshot (AZComputeSnapshot): Snapshot to use.
      region (str): Optional. The region in which to create the disk. If not
          provided, the disk will be created in the default_region associated to
          the AZAccount object.
      disk_name (str): Optional. String to use as new disk name.
      disk_name_prefix (str): Optional. String to prefix the disk name with.
      disk_type (str): Optional. The sku name for the disk to create. Can be
          Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. The
          default value is Standard_LRS.

    Returns:
      AZComputeDisk: Azure Compute Disk.

    Raises:
      ResourceCreationError: If the disk could not be created.
    """

    if not disk_name:
      disk_name = common.GenerateDiskName(snapshot,
                                          disk_name_prefix=disk_name_prefix)

    if not region:
      region = self.az_account.default_region

    creation_data = {
        'location': region,
        'creation_data': {
            'sourceResourceId': snapshot.resource_id,
            'create_option': models.DiskCreateOption.copy
        },
        'sku': {'name': disk_type}
    }

    try:
      logger.info('Creating disk: {0:s}'.format(disk_name))
      request = self.compute_client.disks.begin_create_or_update(
          self.az_account.default_resource_group_name,
          disk_name,
          creation_data)
      while not request.done():
        sleep(5)  # Wait 5 seconds before checking disk status again
      disk = request.result()
      logger.info('Disk {0:s} successfully created'.format(disk_name))
    except azure_exceptions.CloudError as exception:
      raise errors.ResourceCreationError(
          'Could not create disk from snapshot {0:s}: {1!s}'.format(
              snapshot.resource_id, exception), __name__) from exception

    return AZComputeDisk(self.az_account,
                         disk.id,
                         disk.name,
                         disk.location,
                         disk.zones)
Create a new disk based on a Snapshot.

Args:
snapshot (AZComputeSnapshot): Snapshot to use.
region (str): Optional. The region in which to create the disk. If not
provided, the disk will be created in the default_region associated to
the AZAccount object.
disk_name (str): Optional. String to use as new disk name.
disk_name_prefix (str): Optional. String to prefix the disk name with.
disk_type (str): Optional. The sku name for the disk to create. Can be
Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. The
default value is Standard_LRS.

Returns:
AZComputeDisk: Azure Compute Disk.

Raises:
ResourceCreationError: If the disk could not be created.
libcloudforensics/providers/azure/internal/compute.py