All Products
Search
Document Center

Compute Nest:Billing Configuration Binding for Alibaba Cloud Marketplace Software and Resources

Last Updated:Feb 26, 2026

This topic describes how to bind billing configurations for Compute Nest services and their associated resources before publishing them to Alibaba Cloud Marketplace.

Background information

When users purchase a Compute Nest service from Alibaba Cloud Marketplace, they acquire both the software and its required cloud resources.

  • To align the software usage period with the usage period of its associated resources or hardware, define the resource billing type in your template. For example, if users purchase a subscription-based Compute Nest service, the resources created with the service instance must also use the subscription billing method. The same principle applies to pay-as-you-go billing. To achieve this, configure billing type binding in your template.

  • Software supports auto-renewal. To synchronize resource auto-renewal with software auto-renewal, configure auto-renewal binding between the software and its resources.

  • If you do not want to display billing type information on the service instance interface, add a hidden setting in your template.

Create a service

Create a service that binds the lifecycles of resources and software.

  1. Log on to the Compute Nest console.

  2. In the left-side navigation pane, click My Services. On the Created Services tab of the My Services page, click Create Service.

  3. On the Create Service page, configure service information.

    This section lists only parameters that require special configuration. For other parameters, see Create a private service or Create a fully managed service.

    When defining your template, add the following parameters to the Parameters and Metadata sections. For the full template, see Sample template.

    Parameters:
      PayType:
        AssociationProperty: ChargeType
      PayPeriodUnit:
        AssociationProperty: PayPeriodUnit
      PayPeriod:
        AssociationProperty: PayPeriod
      AutoRenew:
        AssociationProperty: AutoRenew
    Metadata:
      ALIYUN::ROS::Interface:
        MapOrderParameterToMarket: true
        Hidden:   
          - PayType
          - PayPeriodUnit
          - PayPeriod
          - AutoRenew
        HiddenSaleConfig: true
    • In the Parameters section, add the corresponding AssociationProperty for each billing parameter, such as ChargeType, PayPeriodUnit, PayPeriod, or AutoRenew.

      Note

      AutoRenew is optional. To link software auto-renewal with resource auto-renewal, set AssociationProperty: AutoRenew. Also, in the Resources section, reference this parameter for the resource's renewal property.

    • In the Metadata section, add ALIYUN::ROS::Interface and set the MapOrderParameterToMarket field to true.

    • (Optional) Hide billing-related parameters in the template.

      • In the Metadata section, add the Hidden property and list the parameters to hide.

      • In the Metadata section, add the HiddenSaleConfig parameter and set its value to true.

  4. Click Create Service.

  5. Test the service.

    After saving the service, test it to confirm it works correctly. For more information, see Test a service.

  6. Publish the service.

    After the service passes the test, submit the service for review. After the review is passed, publish the service. For more information, see Publish a service.

List the service on Alibaba Cloud Marketplace

After publishing the service in the Compute Nest console, list it on Alibaba Cloud Marketplace. For instructions, see Publish a service as an Alibaba Cloud Marketplace product.

Verify that resource billing matches software billing on Alibaba Cloud Marketplace

  1. Go to the product page.

    • Find the product in Alibaba Cloud Marketplace:

      1. Go to the Alibaba Cloud Marketplace home page.

      2. To search for the product that you want to purchase, click Search.

      3. Find the product and click it.

    • Open the Alibaba Cloud Marketplace product link that you received from the service provider.

  2. On the product page, select purchase options and click Buy Now.

  3. On the Confirm Order page, review product details and configure cloud resources.

    • After binding (that is, after setting MapOrderParameterToMarket: true), the resource billing type follows the software billing type. The resource auto-renewal toggle follows the software auto-renewal toggle.

      To hide these grayed-out fields from users, set the Hidden parameter.

Sample template

The complete sample template is shown below.

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AutoRenew:
    Type: Boolean
    Label:
      en: AutoRenew
      zh-cn: AutoRenew
    AssociationProperty: AutoRenew
  PayType:
    Type: String
    Label:
      en: ECS Instance Charge Type
      zh-cn: Billing Method
    AssociationProperty: ChargeType
    AssociationPropertyMetadata:
      LocaleKey: InstanceChargeType
    Default: PostPaid
    AllowedValues:
      - PostPaid
      - PrePaid
  PayPeriodUnit:
    Type: String
    Label:
      en: Pay Period Unit
      zh-cn: Subscription Duration Unit
    AssociationProperty: PayPeriodUnit
    AssociationPropertyMetadata:
      Visible:
        Condition:
          Fn::Not:
            Fn::Equals:
              - ${PayType}
              - PostPaid
    Default: Month
    AllowedValues:
      - Month
      - Year
  PayPeriod:
    Type: Number
    Label:
      en: Period
      zh-cn: Subscription Duration
    AssociationProperty: PayPeriod
    AssociationPropertyMetadata:
      Visible:
        Condition:
          Fn::Not:
            Fn::Equals:
              - ${PayType}
              - PostPaid
    Default: 1
    AllowedValues:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      - 9
  ……
Resources:
  EcsInstanceGroup:
    Type: ALIYUN::ECS::InstanceGroup
    Properties:
      AutoRenew:
        Ref: AutoRenew
      InstanceChargeType:
        Ref: PayType
      PeriodUnit:
        Ref: PayPeriodUnit
      Period:
        Ref: PayPeriod
      ……
  ……
Metadata:
  ALIYUN::ROS::Interface:
    MapOrderParameterToMarket: true
    Hidden:   
      - ChargeType
      - PeriodUnit
      - Period
      - AutoRenew
    HiddenSaleConfig: true