:doc:`IoT <../../iot>` / Paginator / ListCommandExecutions

*********************
ListCommandExecutions
*********************



.. py:class:: IoT.Paginator.ListCommandExecutions

  ::

    
    paginator = client.get_paginator('list_command_executions')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`IoT.Client.list_command_executions`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/ListCommandExecutions>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          namespace='AWS-IoT'|'AWS-IoT-FleetWise',
          status='CREATED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'REJECTED'|'TIMED_OUT',
          sortOrder='ASCENDING'|'DESCENDING',
          startedTimeFilter={
              'after': 'string',
              'before': 'string'
          },
          completedTimeFilter={
              'after': 'string',
              'before': 'string'
          },
          targetArn='string',
          commandArn='string',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type namespace: string
    :param namespace: 

      The namespace of the command.

      

    
    :type status: string
    :param status: 

      List all command executions for the device that have a particular status. For example, you can filter the list to display only command executions that have failed or timed out.

      

    
    :type sortOrder: string
    :param sortOrder: 

      Specify whether to list the command executions that were created in the ascending or descending order. By default, the API returns all commands in the descending order based on the start time or completion time of the executions, that are determined by the ``startTimeFilter`` and ``completeTimeFilter`` parameters.

      

    
    :type startedTimeFilter: dict
    :param startedTimeFilter: 

      List all command executions that started any time before or after the date and time that you specify. The date and time uses the format ``yyyy-MM-dd'T'HH:mm``.

      

    
      - **after** *(string) --* 

        Filter to display command executions that started or completed only after a particular date and time.

        

      
      - **before** *(string) --* 

        Filter to display command executions that started or completed only before a particular date and time.

        

      
    
    :type completedTimeFilter: dict
    :param completedTimeFilter: 

      List all command executions that completed any time before or after the date and time that you specify. The date and time uses the format ``yyyy-MM-dd'T'HH:mm``.

      

    
      - **after** *(string) --* 

        Filter to display command executions that started or completed only after a particular date and time.

        

      
      - **before** *(string) --* 

        Filter to display command executions that started or completed only before a particular date and time.

        

      
    
    :type targetArn: string
    :param targetArn: 

      The Amazon Resource Number (ARN) of the target device. You can use this information to list all command executions for a particular device.

      

    
    :type commandArn: string
    :param commandArn: 

      The Amazon Resource Number (ARN) of the command. You can use this information to list all command executions for a particular command.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax**

      
      ::

        {
            'commandExecutions': [
                {
                    'commandArn': 'string',
                    'executionId': 'string',
                    'targetArn': 'string',
                    'status': 'CREATED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'REJECTED'|'TIMED_OUT',
                    'createdAt': datetime(2015, 1, 1),
                    'startedAt': datetime(2015, 1, 1),
                    'completedAt': datetime(2015, 1, 1)
                },
            ],
            'NextToken': 'string'
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **commandExecutions** *(list) --* 

          The list of command executions.

          
          

          - *(dict) --* 

            Summary information about a particular command execution.

            
            

            - **commandArn** *(string) --* 

              The Amazon Resource Name (ARN) of the command execution.

              
            

            - **executionId** *(string) --* 

              The unique identifier of the command execution.

              
            

            - **targetArn** *(string) --* 

              The Amazon Resource Name (ARN) of the target device for which the command is being executed.

              
            

            - **status** *(string) --* 

              The status of the command executions.

              
            

            - **createdAt** *(datetime) --* 

              The date and time at which the command execution was created for the target device.

              
            

            - **startedAt** *(datetime) --* 

              The date and time at which the command started executing on the target device.

              
            

            - **completedAt** *(datetime) --* 

              The date and time at which the command completed executing on the target device.

              
        
      
        

        - **NextToken** *(string) --* 

          A token to resume pagination.

          
    