You can create and run a script simultaneously by clicking Execute Now. This feature does not consume your script quota.

Prerequisites

  • The target ECS instances are in the Running state.
  • You can keep a maximum of 100 Cloud Assistant scripts within an Alibaba Cloud region. The quota of scripts may increase with your ECS usage.
    Note You can also call the DescribeAccountAttributes operation with the AttributeName.N parameter set to max-axt-command-count to query the maximum number of Cloud Assistant scripts that you can retain within a region.
  • You can run Cloud Assistant scripts up to 5,000 times within a region each day. The 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 you can run Cloud Assistant scripts within a region each day.

Background information

Note the following issues when you use the immediate script execution feature:

  • A script cannot exceed 16 KB in size after being encoded in Base64.
  • A maximum of 20 custom parameters can be specified in a Cloud Assistant script.
  • You can specify up to 50 instances in one script execution.

Procedure

  1. Log on to the ECS console and navigate to the Cloud Assistant page.
  2. In the top navigation bar, select a region.
  3. Click Create or Run Script and configure parameters.
    1. Set Script Type.
      • Linux instances: shell.
      • Windows instances: bat or PowerShell.
    2. Edit the existing content or paste new content in the Script field.
      For more information about shell script examples, see View instance configurations.
    3. Determine whether to turn on Use Parameters.
      If you turn on Use Parameters, you can specify custom parameters in the {{key}} format in the Script field.
    4. Enter a script name in the Script Name field.
    5. Enter a script description in the Script Description field.
    6. Enter an execution path in the Execution Path field.
      • The default execution path of shell scripts is the /home directory of the root user.
      • The default execution path of bat and PowerShell scripts is the directory where the Cloud Assistant client is installed, such as C:\ProgramData\aliyun\assist\$(version).
    7. Set the allowed longest timeout period for Timeout. Default value: 60 seconds.
    8. Click Execute Now.
      Cloud Assistant - Execute Now

What to do next

View the execution result of a script