Queries commands that you manually created or public commands provided by Alibaba Cloud.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:DescribeCommands |
get |
*Command
*Command
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| CommandId |
string |
No |
The command ID. |
c-sh02yh0932w**** |
| Name |
string |
No |
The name of the command. Fuzzy match is not supported. |
testName |
| Provider |
string |
Yes |
The provider of the public command. Valid values:
|
AlibabaCloud |
| Type |
string |
No |
The language type of the command. Valid values:
|
RunShellScript |
| PageNumber |
string |
No |
The page number. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
string |
No |
The number of entries per page for a paged query. Maximum value: 50. Default value: 10. |
10 |
| Tag |
array<object> |
No |
The tags of the command. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key of the command. The tag key must be 1 to 64 characters in length. Valid values of N: 1 to 20. |
TestKey |
| Value |
string |
No |
The tag value of the command. The tag value must be 1 to 64 characters in length. Valid values of N: 1 to 20. |
TestValue |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-aek2bti7cf7**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
20758A-585D-4A41-A9B2-28DA8F4F**** |
| TotalCount |
integer |
The total number of commands. |
10 |
| PageNumber |
integer |
The page number of the command list. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| Commands |
array<object> |
The commands. |
|
|
array<object> |
The command information struct. |
||
| CommandId |
string |
The command ID. |
c-gov1k1tqwi9**** |
| Tags |
array<object> |
The tags of the command. |
|
|
object |
The tag. |
||
| Key |
string |
The tag key of the command. |
TestKey |
| Value |
string |
The tag value of the command. |
TestValue |
| CreationTime |
string |
The time when the command was created. The time is displayed in UTC (Z) in the YYYY-MM-DDThh:mm:ssZ format. |
2023-01-05T06:38:53Z |
| Name |
string |
The command name. |
testName |
| Provider |
string |
The provider of the command. |
User |
| Type |
string |
The command type. |
RunShellScript |
| Timeout |
integer |
The timeout period. Unit: seconds. |
60 |
| Description |
string |
The command description. |
testDescription |
| WorkingDir |
string |
The execution path. |
/home |
| CommandContent |
string |
The command content. |
cat /etc/ssh/sshd_config |
| EnableParameter |
boolean |
Indicates whether custom parameters are enabled for the command. |
false |
| ParameterNames |
array |
The list of custom parameter names parsed from CommandContent when the command was created. The list is returned in the List format. If the custom parameter feature is not enabled, an empty list is returned. |
|
|
string |
The custom parameter. |
parameter1 |
|
| ParameterDefinitions |
array<object> |
The list of custom parameter details. |
|
|
object |
The custom parameter details struct. |
||
| Required |
boolean |
Indicates whether the custom parameter is required. Valid values:
Default value: false. |
false |
| Description |
string |
The description of the custom parameter. |
Cloud Assistant Agent installation package path |
| DefaultValue |
string |
The default value of the custom parameter. |
https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm |
| ParameterName |
string |
The name of the custom parameter. |
DownloadUrl |
| PossibleValues |
array |
The possible values of the enumeration-type custom parameter. |
|
|
string |
The value of the enumeration-type custom parameter. |
Linux |
|
| ResourceGroupId |
string |
The resource group ID. |
rg-aek2bti7cf7**** |
Examples
Success response
JSON format
{
"RequestId": "20758A-585D-4A41-A9B2-28DA8F4F****",
"TotalCount": 10,
"PageNumber": 1,
"PageSize": 10,
"Commands": [
{
"CommandId": "c-gov1k1tqwi9****",
"Tags": [
{
"Key": "TestKey",
"Value": "TestValue"
}
],
"CreationTime": "2023-01-05T06:38:53Z",
"Name": "testName",
"Provider": "User",
"Type": "RunShellScript",
"Timeout": 60,
"Description": "testDescription",
"WorkingDir": "/home",
"CommandContent": "cat /etc/ssh/sshd_config",
"EnableParameter": false,
"ParameterNames": [
"parameter1"
],
"ParameterDefinitions": [
{
"Required": false,
"Description": "Command Assistant Agent Installation Package Path",
"DefaultValue": "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm",
"ParameterName": "DownloadUrl",
"PossibleValues": [
"Linux"
]
}
],
"ResourceGroupId": "rg-aek2bti7cf7****"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.