After creating cloud assistant commands, we recommend that you manage your command resources properly. This topic describes how to clone a command.
The clone command is equivalent to adding a new version to the cloud assistant command. You can retain all the information of the cloned command. You can also modify the name, description, type, content, execution path, or timeout of the command.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Locate the cloud assistant command to be cloned, and click Operation the list, click Clone.
- In the Clone command dialog box, you can complete the following optional steps:
- Enter a new Command name Such as HelloECS.
- Enter a new Command description Such as UserGuide.
- In Command type, select a command type from the drop-down list.
- For Windows instances, you can choose Bat or PowerShell.
- For Linux instances, Select Shell.
- Edit or paste a new Command content.
- Confirm the command Execution path.
- By default, Bat or PowerShell commands are stored in the directory where the cloud assistant client process is located. For example,C:\ProgramData\aliyun\assist\$(version).
- By default, Shell commands are stored in the /root Directory.
- Set the maximum number of commands in the instance Timeout, with unit of measurement in seconds. The default value is 60.
When a command cannot be run for some reason, the command times out, and the command process is forcibly terminated.
- After you confirm the modification, click Create.