All Products
Search
Document Center

Resource Orchestration Service:Automatically activate Alibaba Cloud services

Last Updated:Feb 28, 2026

Resource Orchestration Service (ROS) lets you activate one or more Alibaba Cloud services through a stack template. Define an ALIYUN::ROS::AutoEnableService resource in your template and let the stack handle activation, instead of manually enabling each service in its own console.

Prerequisites

Before you begin, make sure that you have:

  • An Alibaba Cloud account with access to the ROS console

  • An understanding of the billing method of each cloud service to activate

Supported services

The ServiceName parameter in ALIYUN::ROS::AutoEnableService accepts a specific set of values. Each value maps to a cloud service. For the full list, see ALIYUN::ROS::AutoEnableService.

Activate a single service

This example activates Simple Log Service (SLS). To activate a different service, change the Default value under ServiceName to the target service code, such as OSS for Object Storage Service.

  1. Log on to the ROS console.

  2. In the navigation pane on the left, click Stacks.

  3. In the top menu bar, select a region for the stack from the region drop-down list. For example, select China (Hangzhou).

  4. On the Stacks page, click Create Stack. In the Specify Template section, click Select an Existing Template.

    Note
    • If you select Create a New Template or ROS Infrastructure Composer, you are redirected to the corresponding page.

  5. In the Select Template step, select Select an Existing Template in the Specify Template section. Set Template Import Method to Enter Template Content, paste the following YAML template into the Template Content code editor, and then click Next.

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ServiceName:
        Type: String
        Default: SLS
    Resources:
      AutoEnableService:
        Type: ALIYUN::ROS::AutoEnableService
        Properties:
          ServiceName:
            Ref: ServiceName
    
  6. In the Configure Parameters step, specify Stack Name.

  7. Click Create.

After the stack is created, log on to the Simple Log Service console and confirm that the service is available.

Activate multiple services

This example activates Simple Log Service and Object Storage Service (OSS). The ServiceName parameter holds a JSON array of service codes. The template iterates over them using built-in functions.

  1. Log on to the ROS console.

  2. In the navigation pane on the left, click Stacks.

  3. In the top menu bar, select a region for the stack from the region drop-down list. For example, select China (Hangzhou).

  4. On the Stacks page, click Create Stack. In the Specify Template section, click Select an Existing Template.

    Note
    • If you select Create a New Template or ROS Infrastructure Composer, you are redirected to the corresponding page.

  5. In the Select Template step, select Select an Existing Template in the Specify Template section, set Template Import Method to Enter Template Content, paste the following YAML template into the Template Content code editor, and then click Next.

    The following table describes the template functions used in this example.

    FunctionPurpose
    Fn::LengthReturns the number of items in the ServiceName array. Count uses this value to create one AutoEnableService resource per service.
    ALIYUN::IndexA pseudo parameter that resolves to the current iteration index (0, 1, 2, ...).
    Fn::SelectPicks the service code at the current index from the ServiceName array.

    For details on all template functions, see Functions.

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ServiceName:
        Type: Json
        Default:
          - SLS
          - OSS
    Resources:
      AutoEnableService:
        Type: ALIYUN::ROS::AutoEnableService
        Properties:
          ServiceName:
            Fn::Select:
              - Ref: ALIYUN::Index
              - Ref: ServiceName
        Count:
          Fn::Length:
            Ref: ServiceName
    
  6. In the Configure Parameters step, specify Stack Name.

  7. Click Create.

After the stack is created, log on to each service console and confirm that the services are available: