Runs a Command Assistant command for one or more simple application servers.
Operation description
-
The simple application servers for which you want to call the operation must meet the following conditions. If a simple application server cannot meet the conditions, you must call this operation again.
-
The simple application servers are in the
Runningstate. You can call the ListInstances operation to query the status of simple application servers. -
Cloud Assistant Agent is installed on the simple application servers. For more information, see InstallCloudAssistant.
-
If you run a PowerShell command, make sure that the PowerShell module is configured for the simple application servers.
-
-
The command may fail to be run due to the abnormal states of simple application servers, network exceptions, or exceptions in Cloud Assistant Agent. If the command fails to be run, no execution information is generated.
-
If you enable the custom parameter feature when you create a command, you must set the
Parametersparameter to specify custom parameters when you run the command. -
When you call this operation, you can select only one common command or a custom command that you have created.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:InvokeCommand |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call the ListRegions operation to query the most recent region list. |
cn-hangzhou |
| CommandId |
string |
Yes |
The command ID. You can call the DescribeCommands operation to query all available command IDs. |
c-sh02yh0932w**** |
| Parameters |
object |
No |
The key-value pairs of custom parameters to specify when the custom parameter feature is enabled.
|
{"delayed_insert_timeout":"600","max_length_for_sort_data":"2048"} |
| Username |
string |
No |
The name of the user who runs the command in a simple application server. The username cannot exceed 255 characters in length.
You can change the user to run the command only for Linux simple application servers. |
test |
| InstanceIds |
string |
Yes |
The IDs of the simple application servers. The value can be a JSON array that consists of up to 50 IDs of simple application servers. Separate multiple IDs with commas (,). |
["2ad1ae67295445f598017499dc****", "2ad1ae67295445f598017123dc****"] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
20758A-585D-4A41-A9B2-28DA8F4F**** |
| InvokeId |
string |
The execution ID of the command. |
t-bj02prjhw1n**** |
Examples
Success response
JSON format
{
"RequestId": "20758A-585D-4A41-A9B2-28DA8F4F****",
"InvokeId": "t-bj02prjhw1n****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.