You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Batch operations on instances
Creating tasks for batch instance operations
Copy page
Download PDF
Creating tasks for batch instance operations
You can create a task for batch instance operations to perform the same operation on multiple ECS instances at the same time. The operations include command delivery, file downloading, instance operations, and attribute modification.​
  • Command delivery: Execute relevant commands inside the instance by delivering scripts. For example, you can execute a specific command to view the IP address.​
  • File downloading: Download multiple target files at the same time to the specified instance.​
  • Instance operations: Perform O&M operations on instances, including starting, stopping, and restarting instances, and changing the operating system.​
  • Attribute modification: Modify the attributes of instances, including the instance names, hostnames, and descriptions.​
Prerequisites​
You have completed preparations.​
Procedure ​
  1. Log in to the ECS console.​
  1. In the left-side navigation pane, click "Maintenance & Monitoring > Orchestration".​
  1. In the top menu bar, select the region where your business is located.​
  1. On the "CloudOps Orchestration" page, click the "Common tasks" tab.​
  1. Click the "Create task" button, refer to the table below, and select the task type and instances.​
  • ​
    Run command
    Download a file
    Instance actions
    Attribute modification
    ​
    tip​
    • The instances must be in the Running status.​
    ​
    Parameter​​
    Description​
    Sample value​
    Select task type​
    ​
    ​
    Type​
    Select the type of O&M command that you want to execute.​
    Run command​
    Command type​
    Select the type of O&M command that you want to execute. Valid values: Linux Shell, Python, Windows Bat, and Windows PowerShell.​
    Linux Shell​
    Command contents​
    Enter a specific command according to your business requirements. This way, an O&M task is created to execute the command you enter.​
    -​
    Execute path​
    Enter the command execution path.​
    • For Linux instances, the default path is "/home".​
    • For Windows instances, the default path is "C:/Windows/System32".​
    /home​
    Execute user​
    Specify a user that exists in an instance to execute commands to reduce security risks.​
    • The default user to execute commands is root in Linux.​
    • The default user to execute commands is system in Windows.​
    root​
    Select instances​
    ​
    ​
    Select instances​
    Determine target (ECS) instances that meet the batch execution requirements using information such as instance name/ID, running status, and cloud assistant installation status, supporting the selection of multiple instances.​
    tip​
    • You can select up to 500 ECS instances.​
    -​
    ​
    ​
  1. Refer to the table below, configure concurrency control and related information.​
  • ​
    Parameter​​
    Description​
    Sample value​
    Concurrency control​
    ​
    ​
    Concurrency rate​
    • Specify the number of concurrent executions for a batch instance task, which refers to the maximum number of instances that can undergo operations or receive requests at the same time. For example, if you have 50 instances and set this parameter to 10, the task will be executed in 5 batches, and commands will be sent to 10 instances simultaneously in each batch.​
    • Value range: 1-100.​
    10​
    Maximum error count​
    Specifies the maximum number or percent of errors allowed when executing a batch instance task within a specific operation or range.​
    • Error count: Generally applies to scenarios where the error count needs attention, and the value range is 0-100.​
    • If the error count is set to 0, no errors are allowed. That is, if an error occurs even once while performing a task, the entire task will stop (fail).​
    • If the error count is set to 100, a maximum of 100 errors is allowed. That is, as long as the number of errors during the execution of a task does not exceed 100, the task will succeed, but if errors exceed 100 before the task is completed, the entire task will stop (fail).​
    tip​
    The next step is allowed to proceed only when the actual number of failures across all batches of the task is less than or equal to the maximum number of errors you specify.​
    • Percent: Applicable to scenarios where the impact of errors on the entire task needs attention. Value range: 0-100%.​
    • If the maximum error percent is set to 0%, no errors are allowed. That is, if an error occurs even once while performing a task, the entire task will stop (fail).​
    • If the maximum error percent is set to 100%, the task will succeed regardless of the number of errors.​
    tip​
    The next step is allowed to proceed only when the actual failure rate (percentage of failed instances) across all batches of the task is less than or equal to the maximum error rate (percentage) you specify.​
    Error quantity: 1​
    ​
    Relevant Information​
    ​
    ​
    Project​
    You can add the cloud assistant to the project and manage it uniformly by project dimension, which helps maintain resource independence and ensure data security. For more information about projects, see Project management.​
    default​
    Tag​
    A tag is a key-value pair used to identify resources. Tags help you categorize resources based on different dimensions, such as purpose, owner, or environment. This allows you to search and aggregate your resources. For more information about tags, see Tag management.​
    Key1:Value1​
    ​
  1. Click "Create".​
  1. After you confirm that the configuration information is correct, click the "Confirm" button to start task execution.​
The selected task is executed on the selected instances, which has a wide-ranging impact. Confirm that all information is correct before you submit the request.​
Related documents​
You can also perform the following actions on the Instances page:​
Last updated: 2026.06.18 17:49:52