:doc:`GreengrassV2 <../../greengrassv2>` / Client / list_deployments

****************
list_deployments
****************



.. py:method:: GreengrassV2.Client.list_deployments(**kwargs)

  

  Retrieves a paginated list of deployments.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrassv2-2020-11-30/ListDeployments>`_  


  **Request Syntax**
  ::

    response = client.list_deployments(
        targetArn='string',
        historyFilter='ALL'|'LATEST_ONLY',
        parentTargetArn='string',
        maxResults=123,
        nextToken='string'
    )
    
  :type targetArn: string
  :param targetArn: 

    The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the target IoT thing or thing group.

    

  
  :type historyFilter: string
  :param historyFilter: 

    The filter for the list of deployments. Choose one of the following options:

     

    
    * ``ALL`` – The list includes all deployments.
     
    * ``LATEST_ONLY`` – The list includes only the latest revision of each deployment.
    

     

    Default: ``LATEST_ONLY``

    

  
  :type parentTargetArn: string
  :param parentTargetArn: 

    The parent deployment's target `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ within a subdeployment.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to be returned per paginated request.

     

    Default: ``50``

    

  
  :type nextToken: string
  :param nextToken: 

    The token to be used for the next set of paginated results.

    

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

    
    ::

      {
          'deployments': [
              {
                  'targetArn': 'string',
                  'revisionId': 'string',
                  'deploymentId': 'string',
                  'deploymentName': 'string',
                  'creationTimestamp': datetime(2015, 1, 1),
                  'deploymentStatus': 'ACTIVE'|'COMPLETED'|'CANCELED'|'FAILED'|'INACTIVE',
                  'isLatestForTarget': True|False,
                  'parentTargetArn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **deployments** *(list) --* 

        A list that summarizes each deployment.

        
        

        - *(dict) --* 

          Contains information about a deployment.

          
          

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

            The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the target IoT thing or thing group. When creating a subdeployment, the targetARN can only be a thing group.

            
          

          - **revisionId** *(string) --* 

            The revision number of the deployment.

            
          

          - **deploymentId** *(string) --* 

            The ID of the deployment.

            
          

          - **deploymentName** *(string) --* 

            The name of the deployment.

            
          

          - **creationTimestamp** *(datetime) --* 

            The time at which the deployment was created, expressed in ISO 8601 format.

            
          

          - **deploymentStatus** *(string) --* 

            The status of the deployment.

            
          

          - **isLatestForTarget** *(boolean) --* 

            Whether or not the deployment is the latest revision for its target.

            
          

          - **parentTargetArn** *(string) --* 

            The parent deployment's target `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ within a subdeployment.

            
      
    
      

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

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

        
  
  **Exceptions**
  
  *   :py:class:`GreengrassV2.Client.exceptions.ValidationException`

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

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

  
  *   :py:class:`GreengrassV2.Client.exceptions.ThrottlingException`

  