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

*************************
list_deployment_instances
*************************



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

  

  .. note::

    

    The newer ``BatchGetDeploymentTargets`` should be used instead because it works with all compute types. ``ListDeploymentInstances`` throws an exception if it is used with a compute platform other than EC2/On-premises or Lambda.

    

   

  Lists the instance for a deployment associated with the user or Amazon Web Services account.

  

  .. danger::

        This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.


  

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


  **Request Syntax**
  ::

    response = client.list_deployment_instances(
        deploymentId='string',
        nextToken='string',
        instanceStatusFilter=[
            'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
        ],
        instanceTypeFilter=[
            'Blue'|'Green',
        ]
    )
    
  :type deploymentId: string
  :param deploymentId: **[REQUIRED]** 

    The unique ID of a deployment.

    

  
  :type nextToken: string
  :param nextToken: 

    An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.

    

  
  :type instanceStatusFilter: list
  :param instanceStatusFilter: 

    A subset of instances to list by status:

     

    
    * ``Pending``: Include those instances with pending deployments.
     
    * ``InProgress``: Include those instances where deployments are still in progress.
     
    * ``Succeeded``: Include those instances with successful deployments.
     
    * ``Failed``: Include those instances with failed deployments.
     
    * ``Skipped``: Include those instances with skipped deployments.
     
    * ``Unknown``: Include those instances with deployments in an unknown state.
    

    

  
    - *(string) --* 

    

  :type instanceTypeFilter: list
  :param instanceTypeFilter: 

    The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.

    

  
    - *(string) --* 

    

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

    
    ::

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

    

    - *(dict) --* 

      Represents the output of a ``ListDeploymentInstances`` operation.

      
      

      - **instancesList** *(list) --* 

        A list of instance IDs.

        
        

        - *(string) --* 
    
      

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

        If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment instances call to return the next set of deployment instances 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`

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

  