After creating cloud assistant commands, you can set a name and description for a command, clone commands, and delete commands you no longer require.

Modify the name and description of a command

To create or modify the name and description of a cloud assistant command, follow these steps:

  1. Hover your mouse over the target command and click the icon that appears. Then, edit the following information as required:
    • Script Name: Enter a new command name.
    • Script Description: Enter a new command description.
  2. Click OK.

Clone a command

The clone command is equivalent to adding a new version of an existing cloud assistant command. You can retain all the information of the original cloned command, or set a new name, description, type, content, execution path, or timeout time for it. To clone a command, follow these steps:

  1. Find the target cloud assistant command. In the Actions column, click Clone.
  2. In the Clone Script dialog box, complete the following configurations as required:
    1. Enter a new Script Name.
    2. Enter a new Script Description.
    3. Select a script type from the Script Type drop-down list. For Windows instances, you can select Bat or PowerShell. For Linux instances, you can only select Shell.
    4. Enter or paste the new command content.
    5. Determine a new command Execution Path. The default execution path for Bat or PowerShell commands is the directory where the cloud assistant client is installed, such as C:\ProgramData\aliyun\assist\$(version). The default execution path for Shell commands is the /root directory.
    6. Configure the timeout time, in seconds for the command. The default value is 3600. If a command you created cannot be executed within the amount of time set by this parameter, the command times out. When the timeout time of the command expires, the command process will be forcibly terminated.
    7. Confirm your modification settings and then click Create.

Delete commands

Within each Alibaba Cloud region, you can have a maximum of 100 cloud assistant commands. We suggest that you regularly review your commands to check if any commands are unnecessary and can be deleted. To delete a command in the ECS console, perform the following steps:

  1. Depending on your requirements, perform the following actions:
    • To delete a single command, click Delete in the Actions column.
    • To delete multiple commands, select the target instances and then click Delete Script.

  2. In the Delete Script dialog box, click OK.

You can also use the DeleteCommand API action to delete commands.