全部产品
Search
文档中心

CloudOps Orchestration Service:ACS-ECS-BulkyStartInstances

更新时间:Dec 21, 2025

Nama Template

ACS-ECS-BulkyStartInstances

Eksekusi Sekarang

Deskripsi Template

Menjalankan beberapa instans Elastic Compute Service (ECS) sekaligus dalam satu batch. Template ini berguna untuk skenario yang memerlukan pemulihan atau penerapan aplikasi secara massal, serta konfigurasi ketersediaan tinggi. Anda harus menyediakan ID wilayah (regionId) dan menentukan instans target (targets). Setelah dieksekusi, template ini akan mengembalikan ID instans yang telah dijalankan, yang dapat digunakan untuk memverifikasi statusnya.

Tipe Template

Otomatis

Pemilik

Alibaba Cloud

Parameter Input

Parameter

Deskripsi

Tipe

Diperlukan

Nilai Default

Batasan

targets

Target instance

Json

Ya

regionId

ID wilayah.

String

Tidak

{{ ACS::RegionId }}

rateControl

Konkurensi eksekusi tugas

Json

Tidak

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

OOSAssumeRole

Peran RAM yang diasumsikan oleh CloudOps Orchestration Service (OOS).

String

Tidak

""

Parameter Output

Parameter

Deskripsi

Tipe

instanceIds

List

Kebijakan yang diperlukan untuk mengeksekusi template

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

Rincian

Untuk informasi lebih lanjut, lihat ACS-ECS-BulkyStartInstances.yml di GitHub.

Konten Template

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