ListCommands
List all commands in your account.
Request Syntax
GET /commands?commandParameterName=commandParameterName
&maxResults=maxResults
&namespace=namespace
&nextToken=nextToken
&sortOrder=sortOrder
HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- commandParameterName
-
A filter that can be used to display the list of commands that have a specific command parameter name.
Length Constraints: Minimum length of 1. Maximum length of 192.
Pattern:
^[.$a-zA-Z0-9_-]+$
- maxResults
-
The maximum number of results to return in this operation. By default, the API returns up to a maximum of 25 results. You can override this default value to return up to a maximum of 100 results for this operation.
Valid Range: Minimum value of 1. Maximum value of 100.
- namespace
-
The namespace of the command. By default, the API returns all commands that have been created for both
AWS-IoT
andAWS-IoT-FleetWise
namespaces. You can override this default value if you want to return all commands that have been created only for a specific namespace.Valid Values:
AWS-IoT | AWS-IoT-FleetWise
- nextToken
-
To retrieve the next set of results, the
nextToken
value from a previous response; otherwisenull
to receive the first set of results. - sortOrder
-
Specify whether to list the commands that you have created in the ascending or descending order. By default, the API returns all commands in the descending order based on the time that they were created.
Valid Values:
ASCENDING | DESCENDING
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"commands": [
{
"commandArn": "string",
"commandId": "string",
"createdAt": number,
"deprecated": boolean,
"displayName": "string",
"lastUpdatedAt": number,
"pendingDeletion": boolean
}
],
"nextToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- commands
-
The list of commands.
Type: Array of CommandSummary objects
- nextToken
-
The token to use to get the next set of results, or
null
if there are no additional results.Type: String
Errors
- InternalServerException
-
Internal error from the service that indicates an unexpected error or that the service is unavailable.
HTTP Status Code: 500
- ThrottlingException
-
The rate exceeds the limit.
HTTP Status Code: 400
- ValidationException
-
The request is not valid.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: