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:
- 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.
- 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:
- Find the target cloud assistant command. In the Actions column, click Clone.
- In the Clone Script dialog box, complete the following configurations as required:
- Enter a new Script Name.
- Enter a new Script Description.
- 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.
- Enter or paste the new command content.
- 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
- 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.
- Confirm your modification settings and then click Create.
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:
- 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.
- In the Delete Script dialog box, click OK.
You can also use the DeleteCommand API action to delete commands.