After you create a Cloud Assistant command, you can run it on one or more ECS instances. The execution status and results of this command on the instances do not affect each other.


The instances on which you want to run a Cloud Assistant command meet the following requirements:
  • The instances are in the Running (Running) state.
  • The instances are installed with the Cloud Assistant client. For more information, see Install the Cloud Assistant client.

Background information

  • You can run a command on a maximum of 50 instances at a time by calling an API operation.
  • If you select more than 50 instances to run a command in the ECS console, the system automatically runs the command on the instances in batches.
  • You can run Cloud Assistant commands up to 5,000 times within a region per day. This quota may increase with your ECS usage.
    Note You can also call the DescribeAccountAttributes operation with the AttributeName.N parameter set to max-axt-invocation-daily to query the maximum number of times that you can run Cloud Assistant commands within in a region per day.

Procedure in the console

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.
  3. In the top navigation bar, select a region.
  4. Find the command that you want to run and click Create Task in the Actions column.
  5. In the Create Task panel, configure the parameters.
    1. Optional:Click View to check the command.
      If the command is incorrect, modify the command before you run it.
    2. In the Command Parameters fields, enter values for the custom parameters specified in the command.
      No format limits apply to the data types of values for the custom parameters. If the current task does not require values for these fields, you can leave the fields empty.
      Note If you did not select Use Parameters when you create the command, the Command Parameters fields are not displayed in the Create Task panel.
    3. In the Select Instances section, select one or more instances.
      If you have multiple instances, you can enter instance IDs or names to search for instances, and select tags or client status as filter conditions from the drop-down list to narrow down the searching results.
    Check the command information before you execute the command
  6. Click Create Task.

Procedure by using CLI

  1. Optional:Check the status of the instances on which you want to run a command. If the instances are not in the Running (Running) state, call the StartInstance operation to start the instances.
    aliyun ecs StartInstance --InstanceId i-bp1g6zv0ce8og******p
  2. Optional:Call the DescribeCloudAssistantStatus operation to check whether the Cloud Assistant client is installed on the instances.
    If the value of CloudAssistantStatus is true in the response, the Cloud Assistant client is installed on the instances. Otherwise, call the InstallCloudAssistant operation to install the Cloud Assistant client on the instances.
  3. Call the InvokeCommand operation to run a created Cloud Assistant command on the instances and obtain the InvokeId response parameter.
    aliyun ecs InvokeCommand --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p --InstanceId.2 i-bp1g6zv0ce8og******p --CommandId your-command-id --Timed false --output cols=InvokeId
    You can specify the execution cycles of recurring tasks by setting Timed to true and specifying the Frequency parameter. For example, 0 */20 * * * * indicates that the execution cycle is 20 minutes. For more information about cron expressions, see Cron expression.

What to do next

Query execution results and fix common problems