IoT / Client / list_commands

list_commands#

IoT.Client.list_commands(**kwargs)#

List all commands in your account.

See also: AWS API Documentation

Request Syntax

response = client.list_commands(
    maxResults=123,
    nextToken='string',
    namespace='AWS-IoT'|'AWS-IoT-FleetWise',
    commandParameterName='string',
    sortOrder='ASCENDING'|'DESCENDING'
)
Parameters:
  • maxResults (integer) – 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.

  • nextToken (string) – To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

  • namespace (string) – The namespace of the command. By default, the API returns all commands that have been created for both AWS-IoT and AWS-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.

  • commandParameterName (string) – A filter that can be used to display the list of commands that have a specific command parameter name.

  • sortOrder (string) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'commands': [
        {
            'commandArn': 'string',
            'commandId': 'string',
            'displayName': 'string',
            'deprecated': True|False,
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1),
            'pendingDeletion': True|False
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • commands (list) –

      The list of commands.

      • (dict) –

        Summary information about a particular command resource.

        • commandArn (string) –

          The Amazon Resource Name (ARN) of the command.

        • commandId (string) –

          The unique identifier of the command.

        • displayName (string) –

          The display name of the command.

        • deprecated (boolean) –

          Indicates whether the command has been deprecated.

        • createdAt (datetime) –

          The timestamp, when the command was created.

        • lastUpdatedAt (datetime) –

          The timestamp, when the command was last updated.

        • pendingDeletion (boolean) –

          Indicates whether the command is pending deletion.

    • nextToken (string) –

      The token to use to get the next set of results, or null if there are no additional results.

Exceptions

  • IoT.Client.exceptions.ValidationException

  • IoT.Client.exceptions.ThrottlingException

  • IoT.Client.exceptions.InternalServerException