The content of this article is about how to reasonably manage your own command resources after creating cloud assistant commands. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Management Commands
After you create a cloud assistant command, it is recommended that you manage your command resources reasonably. You can re-modify the command name and description, clone the command, or delete no longer needed commands to ensure that the command quota does not exceed the usage limit.
Modify the command name and description
The steps to modify the command name and description on the ECS management console are as follows:
Log in to the ECS management console.
In the left navigation bar, select Cloud Assistant.
Select a region.
Move the mouse to the command that needs to be modified, and then click the icon that appears. In the pop-up window:
Command name: fill in the new command name.
Command description: Fill in the new command description.
Click OK to complete the modification.
You can also use ECS API ModifyCommand to modify command information.
Clone command
The clone command is equivalent to adding a new version of a cloud assistant command. You can completely retain all the information of the cloned command, or modify the command's name, description, type, content, execution path, or timeout. The steps to clone the command on the ECS management console are as follows:
Log in to the ECS management console.
In the left navigation bar, click Cloud Assistant.
Select a region.
Find the cloud assistant command that needs to be cloned, and click Clone in the operation list on the right.
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.
Click the icon and change the command type in the drop-down list. You can choose Bat or Power Shell for Windows instances, while you need to choose Shell for Linux instances.
Edit or paste new command content.
Determine the execution path of the command. By default, Bat or PowerShell commands are in the directory where the cloud assistant client process is located, for example, C:\ProgramData\aliyun\assist\$(version). Shell commands are in the /root directory by default.
Set the maximum timeout length of the command in the instance, in seconds, and the default is 3600. Timeouts occur when a command you create cannot be run for some reason. After timeout, the command process will be forcibly terminated.
After confirming the modification, click OK.
Delete command
You can create up to 100 cloud assistant commands in one Alibaba Cloud region. It is recommended that you clean up commands regularly to ensure sufficient command usage. The steps to delete commands on the ECS management console are as follows:
Log in to the ECS management console.
In the left navigation bar, click Cloud Assistant.
Select a region.
Find the cloud assistant command that needs to be deleted:
Delete a command: Click Delete in the operation list on the right.
Delete multiple commands: Select the target instance and click Delete command.
In the Delete command dialog box, click Confirm deletion.
You can also use the ECS API DeleteCommand to delete the command.
The above is the detailed content of How to reasonably manage your own command resources after creating a cloud assistant command. For more information, please follow other related articles on the PHP Chinese website!