SendRenderingInstanceCommands
Sends shell control instructions to a cloud application service instance. This operation supports both sync and asynchronous command responses. The sync scenario is not suitable for time-consuming commands. The maximum execution time cannot exceed 30 s. In an asynchronous scenario, you can call the GetRenderingInstanceCommandsStatus operation to query the execution status and result of a command.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vs:SendRenderingInstanceCommands |
none |
*Crs
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RenderingInstanceId |
string |
Yes |
The ID of the cloud application service instance. |
render-9f8c57355d224ad7beaf95e145f22111 |
| Commands |
string |
Yes |
A shell command string. Enter multiple commands separated by semicolons (;) or line feeds.
|
date;ls -l /tmp |
| Mode |
string |
No |
The response pattern for the command. Valid values:
|
Async |
| Timeout |
integer |
No |
The timeout period for command execution, in seconds. The value range depends on the Mode parameter:
|
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
BEA5625F-8FCF-48F4-851B-CA63946DA664 |
| Result |
string |
The result of the command response. |
Thu Jun 27 16:06:26 CST 2024 |
| CmdId |
string |
The unique ID of the command request. The ID is valid for one day by default. In asynchronous scenarios, if you need the result, query it promptly within the validity period, preferably before the command times out. |
cmd-81de027b66e442e99c1e0e09a16a0be5 |
Examples
Success response
JSON format
{
"RequestId": "BEA5625F-8FCF-48F4-851B-CA63946DA664",
"Result": "Thu Jun 27 16:06:26 CST 2024",
"CmdId": "cmd-81de027b66e442e99c1e0e09a16a0be5"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.