:doc:`CodeDeploy <../../codedeploy>` / Client / list_deployment_targets

***********************
list_deployment_targets
***********************



.. py:method:: CodeDeploy.Client.list_deployment_targets(**kwargs)

  

  Returns an array of target IDs that are associated a deployment.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentTargets>`_  


  **Request Syntax**
  ::

    response = client.list_deployment_targets(
        deploymentId='string',
        nextToken='string',
        targetFilters={
            'string': [
                'string',
            ]
        }
    )
    
  :type deploymentId: string
  :param deploymentId: **[REQUIRED]** 

    The unique ID of a deployment.

    

  
  :type nextToken: string
  :param nextToken: 

    A token identifier returned from the previous ``ListDeploymentTargets`` call. It can be used to return the next set of deployment targets in the list.

    

  
  :type targetFilters: dict
  :param targetFilters: 

    A key used to filter the returned targets. The two valid values are:

     

    
    * ``TargetStatus`` - A ``TargetStatus`` filter string can be ``Failed``, ``InProgress``, ``Pending``, ``Ready``, ``Skipped``, ``Succeeded``, or ``Unknown``.
     
    * ``ServerInstanceLabel`` - A ``ServerInstanceLabel`` filter string can be ``Blue`` or ``Green``.
    

    

  
    - *(string) --* 

    
      - *(list) --* 

      
        - *(string) --* 

        
    


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

    
    ::

      {
          'targetIds': [
              'string',
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **targetIds** *(list) --* 

        The unique IDs of deployment targets.

        
        

        - *(string) --* 
    
      

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

        If a large amount of information is returned, a token identifier is also returned. It can be used in a subsequent ``ListDeploymentTargets`` call to return the next set of deployment targets in the list.

        
  
  **Exceptions**
  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentIdRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentDoesNotExistException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentNotStartedException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidNextTokenException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidDeploymentIdException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidInstanceStatusException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidInstanceTypeException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidDeploymentInstanceTypeException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidTargetFilterNameException`

  