After creating cloud assistant commands, we recommend that you manage your command resources properly. This topic describes how to clone a command.

Background information

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.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.
  3. In the top navigation bar, select a region.
  4. Locate the cloud assistant command to be cloned, and click Operation the list, click Clone.
  5. In the Clone command dialog box, you can complete the following optional steps:
    1. Enter a new Command name Such as HelloECS.
    2. Enter a new Command description Such as UserGuide.
    3. 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.
    4. Edit or paste a new Command content.
    5. 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.
    6. 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.

  6. After you confirm the modification, click Create.