  def Snapshot(self,
               snapshot_name: Optional[str] = None,
               tags: Optional[Dict[str, str]] = None) -> 'AZComputeSnapshot':
    """Create a snapshot of the disk.

    Args:
      snapshot_name (str): Optional. A name for the snapshot. If none
          provided, one will be generated based on the disk's name.
      tags (Dict[str, str]): Optional. A dictionary of tags to add to the
          snapshot, for example {'TicketID': 'xxx'}.

    Returns:
      AZComputeSnapshot: A snapshot object.

    Raises:
      InvalidNameError: If the snapshot name does not comply with the RegEx.
      ResourceCreationError: If the snapshot could not be created.
    """

    if not snapshot_name:
      snapshot_name = self.name + '_snapshot'
      truncate_at = 80 - 1
      snapshot_name = snapshot_name[:truncate_at]
      if not common.REGEX_SNAPSHOT_NAME.match(snapshot_name):
        raise errors.InvalidNameError(
            'Snapshot name {0:s} does not comply with {1:s}'.format(
                snapshot_name, common.REGEX_SNAPSHOT_NAME.pattern), __name__)

    creation_data = {
        'location': self.region,
        'creation_data': {
            'sourceResourceId': self.resource_id,
            'create_option': models.DiskCreateOption.copy
        }
    }

    if tags:
      creation_data['tags'] = tags

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

    return AZComputeSnapshot(self.az_account,
                             snapshot.id,
                             snapshot.name,
                             snapshot.location,
                             self)
Create a snapshot of the disk.

Args:
snapshot_name (str): Optional. A name for the snapshot. If none
provided, one will be generated based on the disk's name.
tags (Dict[str, str]): Optional. A dictionary of tags to add to the
snapshot, for example {'TicketID': 'xxx'}.

Returns:
AZComputeSnapshot: A snapshot object.

Raises:
InvalidNameError: If the snapshot name does not comply with the RegEx.
ResourceCreationError: If the snapshot could not be created.
libcloudforensics/providers/azure/internal/compute.py