:doc:`Panorama <../../panorama>` / Client / list_devices

************
list_devices
************



.. py:method:: Panorama.Client.list_devices(**kwargs)

  

  Returns a list of devices.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/panorama-2019-07-24/ListDevices>`_  


  **Request Syntax**
  ::

    response = client.list_devices(
        DeviceAggregatedStatusFilter='ERROR'|'AWAITING_PROVISIONING'|'PENDING'|'FAILED'|'DELETING'|'ONLINE'|'OFFLINE'|'LEASE_EXPIRED'|'UPDATE_NEEDED'|'REBOOTING',
        MaxResults=123,
        NameFilter='string',
        NextToken='string',
        SortBy='DEVICE_ID'|'CREATED_TIME'|'NAME'|'DEVICE_AGGREGATED_STATUS',
        SortOrder='ASCENDING'|'DESCENDING'
    )
    
  :type DeviceAggregatedStatusFilter: string
  :param DeviceAggregatedStatusFilter: 

    Filter based on a device's status.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of devices to return in one page of results.

    

  
  :type NameFilter: string
  :param NameFilter: 

    Filter based on device's name. Prefixes supported.

    

  
  :type NextToken: string
  :param NextToken: 

    Specify the pagination token from a previous request to retrieve the next page of results.

    

  
  :type SortBy: string
  :param SortBy: 

    The target column to be sorted on. Default column sort is CREATED_TIME.

    

  
  :type SortOrder: string
  :param SortOrder: 

    The sorting order for the returned list. SortOrder is DESCENDING by default based on CREATED_TIME. Otherwise, SortOrder is ASCENDING.

    

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

    
    ::

      {
          'Devices': [
              {
                  'Brand': 'AWS_PANORAMA'|'LENOVO',
                  'CreatedTime': datetime(2015, 1, 1),
                  'CurrentSoftware': 'string',
                  'Description': 'string',
                  'DeviceAggregatedStatus': 'ERROR'|'AWAITING_PROVISIONING'|'PENDING'|'FAILED'|'DELETING'|'ONLINE'|'OFFLINE'|'LEASE_EXPIRED'|'UPDATE_NEEDED'|'REBOOTING',
                  'DeviceId': 'string',
                  'LastUpdatedTime': datetime(2015, 1, 1),
                  'LatestDeviceJob': {
                      'ImageVersion': 'string',
                      'JobType': 'OTA'|'REBOOT',
                      'Status': 'PENDING'|'IN_PROGRESS'|'VERIFYING'|'REBOOTING'|'DOWNLOADING'|'COMPLETED'|'FAILED'
                  },
                  'LeaseExpirationTime': datetime(2015, 1, 1),
                  'Name': 'string',
                  'ProvisioningStatus': 'AWAITING_PROVISIONING'|'PENDING'|'SUCCEEDED'|'FAILED'|'ERROR'|'DELETING',
                  'Tags': {
                      'string': 'string'
                  },
                  'Type': 'PANORAMA_APPLIANCE_DEVELOPER_KIT'|'PANORAMA_APPLIANCE'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Devices** *(list) --* 

        A list of devices.

        
        

        - *(dict) --* 

          A device.

          
          

          - **Brand** *(string) --* 

            The device's maker.

            
          

          - **CreatedTime** *(datetime) --* 

            When the device was created.

            
          

          - **CurrentSoftware** *(string) --* 

            A device's current software.

            
          

          - **Description** *(string) --* 

            A description for the device.

            
          

          - **DeviceAggregatedStatus** *(string) --* 

            A device's aggregated status. Including the device's connection status, provisioning status, and lease status.

            
          

          - **DeviceId** *(string) --* 

            The device's ID.

            
          

          - **LastUpdatedTime** *(datetime) --* 

            When the device was updated.

            
          

          - **LatestDeviceJob** *(dict) --* 

            A device's latest job. Includes the target image version, and the update job status.

            
            

            - **ImageVersion** *(string) --* 

              The target version of the device software.

              
            

            - **JobType** *(string) --* 

              The job's type.

              
            

            - **Status** *(string) --* 

              Status of the latest device job.

              
        
          

          - **LeaseExpirationTime** *(datetime) --* 

            The device's lease expiration time.

            
          

          - **Name** *(string) --* 

            The device's name.

            
          

          - **ProvisioningStatus** *(string) --* 

            The device's provisioning status.

            
          

          - **Tags** *(dict) --* 

            The device's tags.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **Type** *(string) --* 

            The device's type.

            
      
    
      

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

        A pagination token that's included if more results are available.

        
  
  **Exceptions**
  
  *   :py:class:`Panorama.Client.exceptions.ConflictException`

  
  *   :py:class:`Panorama.Client.exceptions.ValidationException`

  
  *   :py:class:`Panorama.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Panorama.Client.exceptions.InternalServerException`

  