  def ExportImage(
      self, gcs_output_folder: str, output_name: Optional[str] = None) -> None:
    """Export compute image to Google Cloud storage.

    Exported image is compressed and stored in .tar.gz format.

    Args:
      gcs_output_folder (str): Folder path of the exported image.
      output_name (str): Optional. Name of the output file. Name will be
          appended with .tar.gz. Default is [image_name].tar.gz.

    Raises:
      InvalidNameError: If exported image name is invalid.
    """

    if output_name:
      if not common.REGEX_DISK_NAME.match(output_name):
        raise errors.InvalidNameError(
            'Exported image name {0:s} does not comply with {1:s}'.format(
                output_name, common.REGEX_DISK_NAME.pattern),
            __name__)
      full_path = '{0:s}.tar.gz'.format(
          os.path.join(gcs_output_folder, output_name))
    else:
      full_path = '{0:s}.tar.gz'.format(
          os.path.join(gcs_output_folder, self.name))
    build_body = {
        'timeout': '86400s',
        'steps': [{
            'args': [
                '-source_image={0:s}'.format(self.name),
                '-destination_uri={0:s}'.format(full_path),
                '-client_id=api',
            ],
            'name': 'gcr.io/compute-image-tools/gce_vm_image_export:release',
            'env': []
        }],
        'tags': ['gce-daisy', 'gce-daisy-image-export']
    }
    cloud_build = build.GoogleCloudBuild(self.project_id)
    response = cloud_build.CreateBuild(build_body)
    cloud_build.BlockOperation(response)
    logger.info('Image {0:s} exported to {1:s}.'.format(self.name, full_path))
Export compute image to Google Cloud storage.

Exported image is compressed and stored in .tar.gz format.

Args:
gcs_output_folder (str): Folder path of the exported image.
output_name (str): Optional. Name of the output file. Name will be
appended with .tar.gz. Default is [image_name].tar.gz.

Raises:
InvalidNameError: If exported image name is invalid.
libcloudforensics/providers/gcp/internal/compute.py