All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::MarketPlace::Order

Last Updated:May 16, 2023

ALIYUN::MarketPlace::Order is used to purchase resources from Alibaba Cloud Marketplace.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

ProductCode

String

Yes

No

The product code of the resource.

None.

SkuCode

String

Yes

No

The SKU code of the resource.

None.

PricingCycle

String

No

No

The unit of the billing cycle of the resource.

This property is ignored when ChargeType is set to Postpaid. Valid values of PricingCycle when ChargeType is set to Prepaid: Month and Year.

Preference

Map

No

No

The custom parameter.

None.

ChargeType

String

No

No

The billing method of the resource.

Valid values:

  • Prepaid

  • Postpaid (default)

Duration

Number

No

No

The billing cycle of the resource.

Valid values: 1, 2, 3, 6, 12, and 24. Unit: month.

Default value: 1.

This property is used in combination with the PricingCycle property. The billing cycle of Alibaba Cloud Marketplace resources can be one month, one quarter, half a year, one year, or two years. If you leave PricingCycle empty, the resource is purchased only once.

Quantity

Number

No

No

The number of resources that you want to purchase.

Default value: 1.

Return values

Fn::GetAtt

OrderId: the order ID of the resource purchased from Alibaba Cloud Marketplace.

Examples

YAML format

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

JSON format

{
  "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"
        ]
      }
    }
  }
}