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

**********************
list_service_instances
**********************



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

  

  List service instances with summary data. This action lists service instances of all services in the 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/proton-2020-07-20/ListServiceInstances>`_  


  **Request Syntax**
  ::

    response = client.list_service_instances(
        filters=[
            {
                'key': 'name'|'deploymentStatus'|'templateName'|'serviceName'|'deployedTemplateVersionStatus'|'environmentName'|'lastDeploymentAttemptedAtBefore'|'lastDeploymentAttemptedAtAfter'|'createdAtBefore'|'createdAtAfter',
                'value': 'string'
            },
        ],
        maxResults=123,
        nextToken='string',
        serviceName='string',
        sortBy='name'|'deploymentStatus'|'templateName'|'serviceName'|'environmentName'|'lastDeploymentAttemptedAt'|'createdAt',
        sortOrder='ASCENDING'|'DESCENDING'
    )
    
  :type filters: list
  :param filters: 

    An array of filtering criteria that scope down the result list. By default, all service instances in the Amazon Web Services account are returned.

    

  
    - *(dict) --* 

      A filtering criterion to scope down the result list of the  ListServiceInstances action.

      

    
      - **key** *(string) --* 

        The name of a filtering criterion.

        

      
      - **value** *(string) --* 

        A value to filter by.

         

        With the date/time keys ( ``*At{Before,After}``), the value is a valid `RFC 3339 <https://datatracker.ietf.org/doc/html/rfc3339.html>`__ string with no UTC offset and with an optional fractional precision (for example, ``1985-04-12T23:20:50.52Z``).

        

      
    

  :type maxResults: integer
  :param maxResults: 

    The maximum number of service instances to list.

    

  
  :type nextToken: string
  :param nextToken: 

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

    

  
  :type serviceName: string
  :param serviceName: 

    The name of the service that the service instance belongs to.

    

  
  :type sortBy: string
  :param sortBy: 

    The field that the result list is sorted by.

     

    When you choose to sort by ``serviceName``, service instances within each service are sorted by service instance name.

     

    Default: ``serviceName``

    

  
  :type sortOrder: string
  :param sortOrder: 

    Result list sort order.

     

    Default: ``ASCENDING``

    

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

    
    ::

      {
          'nextToken': 'string',
          'serviceInstances': [
              {
                  'arn': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'deploymentStatus': 'IN_PROGRESS'|'FAILED'|'SUCCEEDED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'CANCELLING'|'CANCELLED',
                  'deploymentStatusMessage': 'string',
                  'environmentName': 'string',
                  'lastAttemptedDeploymentId': 'string',
                  'lastDeploymentAttemptedAt': datetime(2015, 1, 1),
                  'lastDeploymentSucceededAt': datetime(2015, 1, 1),
                  'lastSucceededDeploymentId': 'string',
                  'name': 'string',
                  'serviceName': 'string',
                  'templateMajorVersion': 'string',
                  'templateMinorVersion': 'string',
                  'templateName': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

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

        
      

      - **serviceInstances** *(list) --* 

        An array of service instances with summary data.

        
        

        - *(dict) --* 

          Summary data of an Proton service instance resource.

          
          

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

            The Amazon Resource Name (ARN) of the service instance.

            
          

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

            The time when the service instance was created.

            
          

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

            The service instance deployment status.

            
          

          - **deploymentStatusMessage** *(string) --* 

            A service instance deployment status message.

            
          

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

            The name of the environment that the service instance was deployed into.

            
          

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

            The ID of the last attempted deployment of this service instance.

            
          

          - **lastDeploymentAttemptedAt** *(datetime) --* 

            The time when a deployment of the service was last attempted.

            
          

          - **lastDeploymentSucceededAt** *(datetime) --* 

            The time when the service was last deployed successfully.

            
          

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

            The ID of the last successful deployment of this service instance.

            
          

          - **name** *(string) --* 

            The name of the service instance.

            
          

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

            The name of the service that the service instance belongs to.

            
          

          - **templateMajorVersion** *(string) --* 

            The service instance template major version.

            
          

          - **templateMinorVersion** *(string) --* 

            The service instance template minor version.

            
          

          - **templateName** *(string) --* 

            The name of the service template.

            
      
    
  
  **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`

  