:doc:`IoT <../../iot>` / Client / list_package_versions

*********************
list_package_versions
*********************



.. py:method:: IoT.Client.list_package_versions(**kwargs)

  

  Lists the software package versions associated to the account.

   

  Requires permission to access the `ListPackageVersions <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

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


  **Request Syntax**
  ::

    response = client.list_package_versions(
        packageName='string',
        status='DRAFT'|'PUBLISHED'|'DEPRECATED',
        maxResults=123,
        nextToken='string'
    )
    
  :type packageName: string
  :param packageName: **[REQUIRED]** 

    The name of the target software package.

    

  
  :type status: string
  :param status: 

    The status of the package version. For more information, see `Package version lifecycle <https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle>`__.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return at one time.

    

  
  :type nextToken: string
  :param nextToken: 

    The token for the next set of results.

    

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

    
    ::

      {
          'packageVersionSummaries': [
              {
                  'packageName': 'string',
                  'versionName': 'string',
                  'status': 'DRAFT'|'PUBLISHED'|'DEPRECATED',
                  'creationDate': datetime(2015, 1, 1),
                  'lastModifiedDate': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **packageVersionSummaries** *(list) --* 

        Lists the package versions associated to the package.

        
        

        - *(dict) --* 

          A summary of information about a package version.

          
          

          - **packageName** *(string) --* 

            The name of the associated software package.

            
          

          - **versionName** *(string) --* 

            The name of the target package version.

            
          

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

            The status of the package version. For more information, see `Package version lifecycle <https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle>`__.

            
          

          - **creationDate** *(datetime) --* 

            The date that the package version was created.

            
          

          - **lastModifiedDate** *(datetime) --* 

            The date that the package version was last updated.

            
      
    
      

      - **nextToken** *(string) --* 

        The token for the next set of results.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.ThrottlingException`

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

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

  