You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Cloud assistant
DescribeCommands - Queries command lists
Copy page
Download PDF
DescribeCommands - Queries command lists
Call the DescribeCommands operation to query the command list.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: DescribeCommands​
The action that you want to perform. Value: DescribeCommands.​
​
Version string required Sample value: 2020-04-01​
The version of the API. Valid value: 2020-04-01.​
​
TagFilters.N.Key string[] Optional Sample value: TagFilters.1.Key=k1​
The specified tag key when querying resources based on tags.​
  • Argument - N: specifies the serial number of the tag key. Valid range: 1–10.​
  • Separate multiple tag keys with ampersands (&).​
  • Tag keys must be unique.​
​
ProjectName string Optional Sample value: default​
The project to which the resource belongs. A resource can only belong to one project.​
​
Provider string Optional Sample value: Volcengine​
Used to query all commands of different types. Value:​
  • Volcengine: Queries all public commands provided by Volcano Engine.​
  • By default, when no value is provided, all custom commands manually created by the user are queried.​
​
CommandId string Optional Sample value: cmd-hz012yr52****​
The command ID.​
​
Name string Optional Sample value: updateAgent​
The command name.​
​
Type string Optional Sample value: Shell​
The command type. Value:​
  • Shell: The command to be queried is of the Shell type.​
  • Python: The command to be queried is of the Python type.​
​
Order string Optional Sample value: created_at​
The sorting method for the returned commands. Value:​
  • created_at: Sorted by creation time in descending order.​
  • name: Sorted by command name in alphabetical order.​
tip​
  • Public commands: Sorted by name by default.​
  • Custom commands: Sorted by created_at by default. You can sort by the name column (in alphabetical order) or the creation time column.​
​
ContentEncoding string Optional Sample value: Base64​
Specifies whether the command content is Base64-encoded. Value:​
  • PlainText: The command content is not Base64 encoded.​
  • Base64: The command content is Base64 encoded.​
​
PageNumber integer Optional Sample value: 1​
The current page number.​
  • Starting value: 1.​
  • Default value: 1​
​
PageSize integer Optional Sample value: 10​
The number of entries returned on each page in a pagination query.​
  • Value range: 1~100.​
  • Default value: 10.​
​
TagFilters.N.Values.N string[] Optional Sample value: TagFilters.1.Values.1=v1&TagFilters.1.Values.2=v2​
The specified tag value when querying resources based on tags.​
  • The first N: specifies the serial number of the tag key. Value range: 1–10.​
  • The second N: specifies the serial number of the tag value. Value range: 1–3. You can query up to three tag values of the same tag key.​
  • Separate multiple key values with ampersands (&).​
tip​
  • To pass in this parameter, pass in TagFilters.N.Key first.​
  • If you do not pass in this parameter, all tag values under the same tag key are queried.​
  • If you specify an empty string, you query tags with an empty tag value.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to the response structure.​
PageSize integer Sample value: 1​
The number of commands returned per page.​
​
PageNumber integer Sample value: 10​
The page number of the command list.​
​
TotalCount integer Sample value: 4​
The total number of commands.​
​
Commands object[] Sample value: --​
Information about commands that meet the criteria.​
Name string Sample value: Install Cloud Monitor Agent​
The command name.​
​
CommandId string Sample value: cmd-hz012yr52****​
The command ID.​
​
CreatedAt string Sample value: 2023-06-07T06:58:05Z​
Creation time.​
​
UpdatedAt string Sample value: 2023-06-07T06:58:05Z​
Update time.​
​
Type string Sample value: Shell​
The command type.​
​
Timeout integer Sample value: 60​
The timeout period.​
​
WorkingDir string Sample value: /home​
The command execution path.​
​
Username string Sample value: root​
The user executing the command.​
​
Description string Sample value: This is a command description.​
The description of the command.​
​
Provider string Sample value: VolcanoEngine​
The provider of the public command. Value: Volcengine.​
tip​
  • Volcengine: The provider is VolcanoEngine.​
  • For custom commands, the returned value of the parameter is empty.​
​
CommandContent string Sample value: IyEvYmluL2Jhc2****c3N3b3JkfX0iIHwgY2hwYXNzd2Q=​
The content after Base64 and URL encoding.​
tip​
The returned command content is encoded in the format specified by the ContentEncoding request parameter.​
​
EnableParameter boolean Sample value: false​
Indicates whether the command enables the custom parameter feature. Value:​
  • false: Not enabled.​
  • true: Enabled.​
​
ParameterDefinitions object[] Sample value: --​
The list of the custom parameters with detailed information (JSON format).​
Name string Sample value: Param​
The custom parameter name.​
​
Type string Sample value: String​
The custom parameter type. Value:​
  • String: Indicates that the custom parameter is of the String (string) type.​
  • Digit: Indicates that the custom parameter is of the Digit (number) type.​
​
Required boolean Sample value: true​
Indicates whether the parameter is required. Value:​
  • true: Required.​
  • false: Not required.​
​
DefaultValue string Sample value: DefaultValue​
The default value of the custom parameter.​
​
MinLength integer Sample value: 1​
The minimum length of the custom parameter value (string).​
​
MaxLength integer Sample value: 50​
The maximum length of the custom parameter value (string).​
​
MinValue string Sample value: 10​
The minimum value (number) of the custom parameter.​
​
MaxValue string Sample value: 100​
The maximum value (number) of the custom parameter.​
​
DecimalPrecision integer Sample value: 2​
The number of decimal places allowed for the custom parameter value (number).​
​
​
Name string Sample value: Param​
The custom parameter name.​
​
Type string Sample value: String​
The custom parameter type. Value:​
  • String: Indicates that the custom parameter is of the String (string) type.​
  • Digit: Indicates that the custom parameter is of the Digit (number) type.​
​
Required boolean Sample value: true​
Indicates whether the parameter is required. Value:​
  • true: Required.​
  • false: Not required.​
​
DefaultValue string Sample value: DefaultValue​
The default value of the custom parameter.​
​
MinLength integer Sample value: 1​
The minimum length of the custom parameter value (string).​
​
MaxLength integer Sample value: 50​
The maximum length of the custom parameter value (string).​
​
MinValue string Sample value: 10​
The minimum value (number) of the custom parameter.​
​
MaxValue string Sample value: 100​
The maximum value (number) of the custom parameter.​
​
DecimalPrecision integer Sample value: 2​
The number of decimal places allowed for the custom parameter value (number).​
​
​
InvocationTimes integer Sample value: 10​
The number of times the command is invoked.​
tip​
The number of times a public command is invoked is not returned.​
​
ProjectName string Sample value: default​
The associated project.​
​
Tags object[] Sample value: --​
The tag.​
Key string Sample value: Key1​
The tag name.​
​
Value string Sample value: Value1​
The tag value.​
​
​
​
Name string Sample value: Install Cloud Monitor Agent​
The command name.​
​
CommandId string Sample value: cmd-hz012yr52****​
The command ID.​
​
CreatedAt string Sample value: 2023-06-07T06:58:05Z​
Creation time.​
​
UpdatedAt string Sample value: 2023-06-07T06:58:05Z​
Update time.​
​
Type string Sample value: Shell​
The command type.​
​
Timeout integer Sample value: 60​
The timeout period.​
​
WorkingDir string Sample value: /home​
The command execution path.​
​
Username string Sample value: root​
The user executing the command.​
​
Description string Sample value: This is a command description.​
The description of the command.​
​
Provider string Sample value: VolcanoEngine​
The provider of the public command. Value: Volcengine.​
tip​
  • Volcengine: The provider is VolcanoEngine.​
  • For custom commands, the returned value of the parameter is empty.​
​
CommandContent string Sample value: IyEvYmluL2Jhc2****c3N3b3JkfX0iIHwgY2hwYXNzd2Q=​
The content after Base64 and URL encoding.​
tip​
The returned command content is encoded in the format specified by the ContentEncoding request parameter.​
​
EnableParameter boolean Sample value: false​
Indicates whether the command enables the custom parameter feature. Value:​
  • false: Not enabled.​
  • true: Enabled.​
​
ParameterDefinitions object[] Sample value: --​
The list of the custom parameters with detailed information (JSON format).​
Name string Sample value: Param​
The custom parameter name.​
​
Type string Sample value: String​
The custom parameter type. Value:​
  • String: Indicates that the custom parameter is of the String (string) type.​
  • Digit: Indicates that the custom parameter is of the Digit (number) type.​
​
Required boolean Sample value: true​
Indicates whether the parameter is required. Value:​
  • true: Required.​
  • false: Not required.​
​
DefaultValue string Sample value: DefaultValue​
The default value of the custom parameter.​
​
MinLength integer Sample value: 1​
The minimum length of the custom parameter value (string).​
​
MaxLength integer Sample value: 50​
The maximum length of the custom parameter value (string).​
​
MinValue string Sample value: 10​
The minimum value (number) of the custom parameter.​
​
MaxValue string Sample value: 100​
The maximum value (number) of the custom parameter.​
​
DecimalPrecision integer Sample value: 2​
The number of decimal places allowed for the custom parameter value (number).​
​
​
Name string Sample value: Param​
The custom parameter name.​
​
Type string Sample value: String​
The custom parameter type. Value:​
  • String: Indicates that the custom parameter is of the String (string) type.​
  • Digit: Indicates that the custom parameter is of the Digit (number) type.​
​
Required boolean Sample value: true​
Indicates whether the parameter is required. Value:​
  • true: Required.​
  • false: Not required.​
​
DefaultValue string Sample value: DefaultValue​
The default value of the custom parameter.​
​
MinLength integer Sample value: 1​
The minimum length of the custom parameter value (string).​
​
MaxLength integer Sample value: 50​
The maximum length of the custom parameter value (string).​
​
MinValue string Sample value: 10​
The minimum value (number) of the custom parameter.​
​
MaxValue string Sample value: 100​
The maximum value (number) of the custom parameter.​
​
DecimalPrecision integer Sample value: 2​
The number of decimal places allowed for the custom parameter value (number).​
​
​
InvocationTimes integer Sample value: 10​
The number of times the command is invoked.​
tip​
The number of times a public command is invoked is not returned.​
​
ProjectName string Sample value: default​
The associated project.​
​
Tags object[] Sample value: --​
The tag.​
Key string Sample value: Key1​
The tag name.​
​
Value string Sample value: Value1​
The tag value.​
​
​
​
​
​
Sample request​
​
GET /?Action= DescribeCommands&Version=2020-04-01 HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
Service: ecs​
​
Sample response​
​
{​
"ResponseMetadata":{​
"RequestId":"2023082515303301022514515207C4****",​
"Action":"DescribeCommands",​
"Version":"2020-04-01",​
"Service":"ecs",​
"Region":"cn-beijing"​
},​
"Result":{​
"pageNumber": 1,​
"pageSize": 10,​
"totalCount": 19,​
"commands": [​
{​
"name": "demo",​
"commandId": "cmd-ycms****",​
"createdAt": "2023-08-30T08:42:56Z",​
"updatedAt": "2023-08-30T08:42:56Z",​
"type": "Shell",​
"timeout": 60,​
"workingDir": "/home",​
"username": "root",​
"description": "",​
"provider": "",​
"commandContent": "***",​
"enableParameter": false,​
"parameterDefinitions": [],​
"invocationTimes": 0​
}]​
}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
MissingParameter.AccountId​
The required parameter AccountId is not supplied.​
The user ID cannot be empty.​
400​
InvalidType.Malformed​
The specified Type is malformed.​
The specified command type is invalid.​
400​
InvalidOrder.Malformed​
The specified Order is malformed.​
The specified sorting method is invalid.​
400​
LimitExceeded.TagFilterKeys​
You've reached the limit on the number of TagFilter Keys that you can set.​
The upper limit of the number of tag filter keys is reached.​
400​
MissingParameter.TagKey​
The required parameter TagFiltersKey is not supplied.​
The tag filter key is required.​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
The specified tag key is invalid.​
400​
InvalidTagValue.Malformed​
The specified TagValue is malformed.​
The specified tag value is invalid.​
409​
InvalidTagFilterKey.Conflict​
The specified TagFilterKey already exists.​
The specified tag filter key already exists.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
​
​
Last updated: 2026.06.18 17:48:26