In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to use CreateCommand to create a new cloud assistant command. I hope you will learn a lot after reading this article. Let's discuss it together.
CreateCommand
Description
You can create the following types of commands:
Bat script (RunBatScript) applicable to Windows instance
PowerShell script (RunPowerShellScript) applicable to Windows instance
Shell script (RunShellScript) applicable to Linux instance
You can set the maximum timeout when the command executes in the ECS instance by specifying the parameter TimeOut. After the command timeout, the cloud helper client will forcibly terminate the command process, that is, cancel the PID of the command.
For a single execution, after the timeout, the command's execution status (InvokeRecordStatus) for the specified ECS instance becomes Failed (execution failure).
For periodic execution:
The timeout for periodic execution is valid for each execution record.
After an execution timeout, the status of the execution record (InvokeRecordStatus) becomes the execution failure (Failed).
The timeout of the last execution does not affect the next execution.
You can specify the execution path for the command by specifying the parameter WorkingDir. For Linux instances, the default is under the administrator root user's home directory, specifically / root directory. For Windows instances, the default is the directory where the cloud helper client process resides, for example, C:\ ProgramData\ aliyun\ assist\ $(version).
You can create up to 100 cloud assistant commands in a region.
Request parameter
Return parameters
Example
Request example
Https://ecs.aliyuncs.com/?Action=CreateCommand&RegionId=cn-hangzhou&Name=Test&Type=RunShellScript&CommandContent=ZWNobyAxMjM=&
Normal return example
XML format
E69EF3CC-94CD-42E7-8926-F133B86387C0 c-7d2a745b412b4601b2d47f6a768d3a14
JSON format
{"RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0", "CommandId": "c-7d2a745b412b4601b2d47f6a768d3a14"}
Exception return example
XML format
E69EF3CC-94CD-42E7-8926-F133B86387C0 ecs.aliyuncs.com MissingParameter.Name The input parameter "Name" that is mandatory for processing this request is not supplied.
JSON format
{"RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0", "HostId": "ecs.aliyuncs.com"Code": "MissingParameter.Name"Message": "The input parameter" Name "that is mandatory for processing this request is not supplied."}
Error code
The following are the error codes specific to this API. For more error codes, please visit the API error Center.
After reading this article, I believe you have a certain understanding of the method of using CreateCommand to create a new cloud assistant command. If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.