:doc:`Proton <../../proton>` / Client / list_deployments

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



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

  

  List deployments. You can filter the result list by environment, service, or a single service instance.

  

  .. 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/proton-2020-07-20/ListDeployments>`_  


  **Request Syntax**
  ::

    response = client.list_deployments(
        componentName='string',
        environmentName='string',
        maxResults=123,
        nextToken='string',
        serviceInstanceName='string',
        serviceName='string'
    )
    
  :type componentName: string
  :param componentName: 

    The name of a component for result list filtering. Proton returns deployments associated with that component.

    

  
  :type environmentName: string
  :param environmentName: 

    The name of an environment for result list filtering. Proton returns deployments associated with the environment.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of deployments to list.

    

  
  :type nextToken: string
  :param nextToken: 

    A token that indicates the location of the next deployment in the array of deployment, after the list of deployment that was previously requested.

    

  
  :type serviceInstanceName: string
  :param serviceInstanceName: 

    The name of a service instance for result list filtering. Proton returns the deployments associated with the service instance.

    

  
  :type serviceName: string
  :param serviceName: 

    The name of a service for result list filtering. Proton returns deployments associated with service instances of the service.

    

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

    
    ::

      {
          'deployments': [
              {
                  'arn': 'string',
                  'completedAt': datetime(2015, 1, 1),
                  'componentName': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'deploymentStatus': 'IN_PROGRESS'|'FAILED'|'SUCCEEDED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'CANCELLING'|'CANCELLED',
                  'environmentName': 'string',
                  'id': 'string',
                  'lastAttemptedDeploymentId': 'string',
                  'lastModifiedAt': datetime(2015, 1, 1),
                  'lastSucceededDeploymentId': 'string',
                  'serviceInstanceName': 'string',
                  'serviceName': 'string',
                  'targetArn': 'string',
                  'targetResourceCreatedAt': datetime(2015, 1, 1),
                  'targetResourceType': 'ENVIRONMENT'|'SERVICE_PIPELINE'|'SERVICE_INSTANCE'|'COMPONENT'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        An array of deployment with summary data.

        
        

        - *(dict) --* 

          Summary data of the deployment.

          
          

          - **arn** *(string) --* 

            The Amazon Resource Name (ARN) of the deployment.

            
          

          - **completedAt** *(datetime) --* 

            The date and time the deployment was completed.

            
          

          - **componentName** *(string) --* 

            The name of the component associated with the deployment.

            
          

          - **createdAt** *(datetime) --* 

            The date and time the deployment was created.

            
          

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

            The current status of the deployment.

            
          

          - **environmentName** *(string) --* 

            The name of the environment associated with the deployment.

            
          

          - **id** *(string) --* 

            The ID of the deployment.

            
          

          - **lastAttemptedDeploymentId** *(string) --* 

            The ID of the last attempted deployment.

            
          

          - **lastModifiedAt** *(datetime) --* 

            The date and time the deployment was last modified.

            
          

          - **lastSucceededDeploymentId** *(string) --* 

            The ID of the last successful deployment.

            
          

          - **serviceInstanceName** *(string) --* 

            The name of the service instance associated with the deployment.

            
          

          - **serviceName** *(string) --* 

            The name of the service associated with the deployment.

            
          

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

            The Amazon Resource Name (ARN) of the target of the deployment.

            
          

          - **targetResourceCreatedAt** *(datetime) --* 

            The date and time the target resource was created.

            
          

          - **targetResourceType** *(string) --* 

            The resource type of the deployment target. It can be an environment, service, service instance, or component.

            
      
    
      

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

        A token that indicates the location of the next deployment in the array of deployment, after the current requested list of deployment.

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

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

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

  
  *   :py:class:`Proton.Client.exceptions.ResourceNotFoundException`

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

  