All Products
Search
Document Center

CloudOps Orchestration Service:ACS-ECS-BulkyStartInstances

Last Updated:Dec 23, 2025

Template name

ACS-ECS-BulkyStartInstances

Execute Now

Template description

Starts multiple Elastic Compute Service (ECS) instances in a batch. This template is useful for scenarios that require you to start multiple instances at once, such as for application deployments and high availability setups. You must provide the region ID (regionId) and specify the target instances (targets). After the template is executed, it returns the IDs of the started instances, which you can use to verify that the instances were started correctly.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Type

Required

Default value

Limit

targets

Target instance

Json

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

rateControl

Task execution concurrency

Json

No

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

The RAM role that is assumed by CloudOps Orchestration Service (OOS).

String

No

""

Output parameters

Parameter

Description

Type

instanceIds

List

Policy that is required to execute the template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:DescribeInstances",
                "ecs:StartInstance"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oos:GetApplicationGroup"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

For more information, see ACS-ECS-BulkyStartInstances.yml at GitHub.

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: 'Bulky starts the ECS instances, applicable to scenarios that require managing and starting multiple ECS instances simultaneously, such as application deployment and high-availability scenarios. During configuration, users need to provide the following required parameter information: Region ID (regionId), which specifies the region of the ECS instances to be started, and Target Instances (targets), which defines the specific ECS instances to be operated on. Upon execution, the template will return a list of the started instance IDs, enabling users to verify the status of the instance start operations.'
  zh-cn: 'Starts multiple ECS instances in a batch, applicable to scenarios that require managing and starting multiple ECS instances at the same time, such as application deployment and high availability scenarios. During the configuration process, you must provide the following required parameter information: Region ID (regionId) to specify the region of the instances to be started, and target instances (targets) to define the specific ECS instances to operate on. After execution, the template returns a list of all started instance IDs, making it easy to verify the startup status of the instances.'
  name-en: Bulky Start Instances
  name-zh-cn: Start Multiple Instances in a Batch
  categories:
    - instance_manage
    - application_manage
    - computenest
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
      zh-cn: Region ID
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  targets:
    Type: Json
    Label:
      en: TargetInstance
      zh-cn: Target Instance
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
  rateControl:
    Label:
      en: RateControl
      zh-cn: Task Execution Concurrency Rate
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: RAM Role Assumed by OOS
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
  Description:
    en: Views the ECS instances
    zh-cn: Get ECS Instances
  Action: ACS::SelectTargets
  Properties:
    ResourceType: ALIYUN::ECS::Instance
    RegionId: '{{ regionId }}'
    Filters:
      - '{{ targets }}'
- Name: startInstance
  Action: ACS::ECS::StartInstance
  Description:
    en: Starts the ECS instances
    zh-cn: Start Instances
  Properties:
    regionId: '{{ regionId }}'
    instanceId: '{{ ACS::TaskLoopItem }}'
  Loop:
    RateControl: '{{ rateControl }}'
    Items: '{{ getInstance.Instances.Instance[].InstanceId }}'
Outputs:
  instanceIds:
    Type: List
    Value: '{{ getInstance.Instances.Instance[].InstanceId }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: Select Instances
            en: Select Ecs Instances
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Advanced Options
            en: Control Options