How to use Alicloud marketplace image as source_image


I am starting to use packer to build some images in alicloud, I have everything working in both Debian and Ubuntu as alicloud provide public images that I can use, something like this:

source_image = “ubuntu_20_04_x64_20G_alibase_20220331.vhd”

The problem with both SUSE and RHEL is that the images are only available in the marketplace and do not have full vhd image names, only IDs and these do cannot be found if I use them in the packer file. e.g. redhat_8 = “m-uf6d2kp5yb3fuq6if7qd”

Can anyone explain how I would go about using the market place images as a source_image in my packer file?