Tous les produits
Search
Centre de documentation

CloudOps Orchestration Service:ACS-ECS-BulkyStartInstances

Dernière mise à jour :Aug 11, 2026

Nom du modèle

ACS-ECS-BulkyStartInstances

Exécuter maintenant

Description du modèle

Démarre plusieurs instances Elastic Compute Service (ECS) par lot. Ce modèle convient aux déploiements d'applications et aux configurations de haute disponibilité. Spécifiez l'ID de région (regionId) et les instances cibles (targets). Après l'exécution, le modèle renvoie les ID des instances démarrées pour vérification.

Type de modèle

Automatisé

Propriétaire

Alibaba Cloud

Paramètres d'entrée

|
**Paramètre**
|
**Description**
|
**Type**
|
**Obligatoire**
|
**Valeur par défaut**
|
**Limite**
| | --- | --- | --- | --- | --- | --- | |
targets
|
Instance cible
|
Json
|
Oui
| | | |
regionId
|
ID de la région.
|
String
|
Non
|
{{ ACS::RegionId }}
| | |
rateControl
|
Taux de concurrence d'exécution des tâches
|
Json
|
Non
|
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}
| | |
OOSAssumeRole
|
Rôle RAM endossé par CloudOps Orchestration Service (OOS).
|
String
|
Non
|
""
| |

Paramètres de sortie

|
**Paramètre**
|
**Description**
|
**Type**
| | --- | --- | --- | |
instanceIds
| |
List
|

Politique requise pour exécuter le modèle

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

Détails

Pour plus d'informations, consultez le fichier ACS-ECS-BulkyStartInstances.yml sur GitHub.

Contenu du modèle

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