After creating cloud assistant commands, you can set the command name and description, clone commands, or delete unnecessary commands to guarantee a sufficient command quota.

Modify the name and description of a command

To set the command name and description in the ECS console, perform the following steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Cloud Assistant.
  3. Select a region.
  4. Move the mouse cursor to the command you want to edit, and click the icon that appears in the prompted window.
    • Command name: Input the new command name.
    • Command description: Input the new command description.
  5. Click OK.

You can also use the ECS API ModifyCommand to modify command information.

Clone a command

The clone command is equivalent to add a new version for an existing cloud assistant command. You can retain all the information of the cloned command as it was previously. Alternatively, you can set a new name, description, type, content, execution path, or timeout time for it. To clone a command in the ECS console, perform the following steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Cloud Assistant.
  3. Select a region.
  4. Find the cloud assistant command you want to clone, and from the Operation list, click Clone.
  5. In the Clone command dialogue box, complete the following optional steps:
    1. Enter a new Command name, such as HelloECS.
    2. Enter a new Command description, such as UserGuide.
    3. Click the icon to replace the command type from the drop-down list. For Windows instances, you can select Bat or Power Shell. For Linux instances, you can select Shell.
    4. Edit or paste 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 set to 3600. When a command you created cannot be executed for 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. After you confirm the modification, click Create.

Delete commands

Within an Alibaba Cloud region, you can create a maximum of 100 cloud assistant commands. We suggest that you regularly clean your commands to guarantee a sufficient command quota. To delete a command on the ECS console, perform the following steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Cloud Assistant.
  3. Select a region.
  4. Locate the cloud assistant command you want to delete:
    • To delete a single command, from the Operation list, select Delete.
    • To delete multiple commands, select the target instances, and click Delete command.

  5. In the Delete command dialogue box, click OK.

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