The ALIYUN::MarketPlace::Order type is used to buy marketplace resources.

Syntax

{
    "Type" : "ALIYUN::MarketPlace::Order",
    "Properties" : {
         "ProductCode" : String,
         "SkuCode" : String,
         "PricingCycle" : String,
         "Preference" : Map,
         "ChargeType" : String,
         "Duration" : Integer,
         "Quantity" : Integer
    }
}

Properties

Name Type Required Description Constraint
ProductCode string Yes Product code of the marketplace resource N/A
SkuCode string Yes SKU code of the marketplace resource N/A
PricingCycle string No Unit of the payment cycle This parameter is ignored if ChargeType is Postpaid. If ChargeType is Prepaid, this parameter can be set to Month or Year.
Preference map No Custom parameters N/A
ChargeType string No Method of payment Value options: Prepaid and Postpaid. Default value: Prepaid.
Duration number No Payment duration Value options: 1, 2, 3, 6, 12, and 24. The default value is 1. This parameter is used with PricingCycle. Marketplace resources support the following payment cycles: one month, one quarter, half a year, one year, and two years. If PricingCycle is not specified, the resource is bought only once.
Quantity number No Resource purchase quantity The default value is 1.

Response value

Fn::GetAtt

OrderId: ID of the marketplace resource purchase order.

Example

{
  "ROSTemplateFormatVersion" : "2015-09-01",
  "Resources" : {
    "MarketOrder": {
      "Type": "ALIYUN::MarketPlace::Order",
      "Properties": {
        "ProductCode":"cmapi011900",
        "SkuCode":"postpay",
        "Duration":"1",
        "PricingCycle": "Year",
        "Quantity": 1,
        "ChargeType": "Prepaid",
        "Preference": {"my_email": "1111@aliyun.com"}
      }
    }
  },
  "Outputs" : {
    "OderId": {
      "Value": {
        "Fn::GetAtt": [
          "MarketOrder",
          "OrderId"
        ]
      }
    }
  }
}