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

*****************
list_environments
*****************



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

  

  List environments with detail data summaries.

  

  .. 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/ListEnvironments>`_  


  **Request Syntax**
  ::

    response = client.list_environments(
        environmentTemplates=[
            {
                'majorVersion': 'string',
                'templateName': 'string'
            },
        ],
        maxResults=123,
        nextToken='string'
    )
    
  :type environmentTemplates: list
  :param environmentTemplates: 

    An array of the versions of the environment template.

    

  
    - *(dict) --* 

      A search filter for environment templates.

      

    
      - **majorVersion** *(string) --* **[REQUIRED]** 

        Include ``majorVersion`` to filter search for a major version.

        

      
      - **templateName** *(string) --* **[REQUIRED]** 

        Include ``templateName`` to filter search for a template name.

        

      
    

  :type maxResults: integer
  :param maxResults: 

    The maximum number of environments to list.

    

  
  :type nextToken: string
  :param nextToken: 

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

    

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

    
    ::

      {
          'environments': [
              {
                  'arn': 'string',
                  'componentRoleArn': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'deploymentStatus': 'IN_PROGRESS'|'FAILED'|'SUCCEEDED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'CANCELLING'|'CANCELLED',
                  'deploymentStatusMessage': 'string',
                  'description': 'string',
                  'environmentAccountConnectionId': 'string',
                  'environmentAccountId': 'string',
                  'lastAttemptedDeploymentId': 'string',
                  'lastDeploymentAttemptedAt': datetime(2015, 1, 1),
                  'lastDeploymentSucceededAt': datetime(2015, 1, 1),
                  'lastSucceededDeploymentId': 'string',
                  'name': 'string',
                  'protonServiceRoleArn': 'string',
                  'provisioning': 'CUSTOMER_MANAGED',
                  'templateMajorVersion': 'string',
                  'templateMinorVersion': 'string',
                  'templateName': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **environments** *(list) --* 

        An array of environment detail data summaries.

        
        

        - *(dict) --* 

          Summary data of an Proton environment resource. An Proton environment is a set of resources shared across Proton services.

          
          

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

            The Amazon Resource Name (ARN) of the environment.

            
          

          - **componentRoleArn** *(string) --* 

            The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined components in this environment. It determines the scope of infrastructure that a component can provision.

             

            The environment must have a ``componentRoleArn`` to allow directly defined components to be associated with the environment.

             

            For more information about components, see `Proton components <https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html>`__ in the *Proton User Guide*.

            
          

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

            The time when the environment was created.

            
          

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

            The environment deployment status.

            
          

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

            An environment deployment status message.

            
          

          - **description** *(string) --* 

            The description of the environment.

            
          

          - **environmentAccountConnectionId** *(string) --* 

            The ID of the environment account connection that the environment is associated with.

            
          

          - **environmentAccountId** *(string) --* 

            The ID of the environment account that the environment infrastructure resources are provisioned in.

            
          

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

            The ID of the last attempted deployment of this environment.

            
          

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

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

            
          

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

            The time when the environment was last deployed successfully.

            
          

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

            The ID of the last successful deployment of this environment.

            
          

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

            The name of the environment.

            
          

          - **protonServiceRoleArn** *(string) --* 

            The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.

            
          

          - **provisioning** *(string) --* 

            When included, indicates that the environment template is for customer provisioned and managed infrastructure.

            
          

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

            The major version of the environment template.

            
          

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

            The minor version of the environment template.

            
          

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

            The name of the environment template.

            
      
    
      

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

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

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

  