All Products
Search
Document Center

Simple Application Server:DescribeCommands

Last Updated:Apr 17, 2024

Queries the commands that you created or the common commands that Alibaba Cloud provides.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
CommandIdstringNo

The command ID.

c-sh02yh0932w****
NamestringNo

The command name. Fuzzy match is not supported.

testName
ProviderstringYes

The provider of the common command. Take note of the following items:

  • If you set this parameter to AlibabaCloud, all the common commands provided by Alibaba Cloud are queried.
  • If you set this parameter to User, all the custom commands created by you are queried.
AlibabaCloud
TypestringNo

The language type of the command. Valid values:

  • RunBatScript: batch command, applicable to Windows instances
  • RunPowerShellScript: PowerShell command, applicable to Windows instances
  • RunShellScript: shell command, applicable to Linux instances
RunShellScript
PageNumberstringNo

The page number.

Pages start from 1.

Default value: 1.

1
PageSizestringNo

The number of entries per page.

Maximum value: 50.

Default value: 10.

10
Tagobject []No

The tags of the command.

KeystringNo

The key of tag N to be added to the command. Valid values of N: 1 to 20.

TestKey
ValuestringNo

The value of tag N to be added to the command. Valid values of N: 1 to 20.

TestValue

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F****
TotalCountinteger

The total number of commands.

10
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
Commandsobject []

The commands.

CommandIdstring

The command ID.

c-gov1k1tqwi9****
Tagsobject []

The tags of the command.

Keystring

The key of tag N to be added to the command. Valid values of N: 1 to 20.

TestKey
Valuestring

The value of tag N to be added to the command. Valid values of N: 1 to 20.

TestValue
CreationTimestring

The time when the command was created.

2023-01-05T06:38:53Z
Namestring

The name of the command.

testName
Providerstring

The provider of the command.

User
Typestring

The command type.

RunShellScript
Timeoutlong

The timeout period.

60
Descriptionstring

The command description.

testDescription
WorkingDirstring

The working directory of the command.

/home
CommandContentstring

The command content.

cat /etc/ssh/sshd_config
EnableParameterboolean

Indicates whether the custom parameter feature was enabled for the command.

false
ParameterNamesarray

The list of custom parameter names that are parsed from the command specified when the command was being created. If the custom parameter feature is not enabled, an empty list is returned.

string

The custom parameter name.

parameter1
ParameterDefinitionsobject []

The custom parameters.

Requiredboolean

Indicates whether the custom parameter is required. Valid values:

  • true
  • false

Default value: false.

false
Descriptionstring

The description of the custom parameter.

Command Assistant Agent Installation Package Path
DefaultValuestring

The default value of the custom parameter.

https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm
ParameterNamestring

The name of the custom parameter.

DownloadUrl
PossibleValuesarray

The valid values of the custom parameter of the enumeration type.

string

The valid value of the custom parameter of the enumeration type.

Linux

Examples

Sample success responses

JSONformat

{
  "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"
          ]
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-20The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tag
Output ParametersThe response structure of the API has changed.