Returns the default image ID for a specified Alibaba Cloud Marketplace image commodity code.
When you update a stack or create a change set, a change in this function's return value triggers an update for any resource that references the function. For example, assume that the image ID for an image commodity code in the China (Hangzhou) region (cn-hangzhou) is m-1, and you use a template containing this function to create a stack. If the Alibaba Cloud Marketplace seller later replaces m-1 with m-2, the new image ID triggers an update to resources that reference it, such as ALIYUN::ECS::InstanceGroup.
Function declaration
-
JSON
{ "Fn::MarketplaceImage": "ImageProductCode" } -
YAML
-
Full syntax.
Fn::MarketplaceImage: ImageProductCode -
Short form.
!MarketplaceImage : <ImageProductCode>
-
Parameters
ImageProductCode: Required. String. The commodity code of an Alibaba Cloud Marketplace image, for example, cmjj02****.
For more information about how to find the commodity code of an Alibaba Cloud Marketplace image, see What is a commodity code.
Return value
String. The default image ID that corresponds to the specified Alibaba Cloud Marketplace image commodity code in the current region.
Examples
!MarketplaceImage cmjj02****
Return value: m-2zeeyr9nxxoo5gcg****.