:doc:`Cloud9 <../../cloud9>` / Client / describe_environments

*********************
describe_environments
*********************



.. py:method:: Cloud9.Client.describe_environments(**kwargs)

  

  Gets information about Cloud9 development environments.

   

  .. warning::

     

    Cloud9 is no longer available to new customers. Existing customers of Cloud9 can continue to use the service as normal. `Learn more" <http://aws.amazon.com/blogs/devops/how-to-migrate-from-aws-cloud9-to-aws-ide-toolkits-or-aws-cloudshell/>`__

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments>`_  


  **Request Syntax**
  ::

    response = client.describe_environments(
        environmentIds=[
            'string',
        ]
    )
    
  :type environmentIds: list
  :param environmentIds: **[REQUIRED]** 

    The IDs of individual environments to get information about.

    

  
    - *(string) --* 

    

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

    
    ::

      {
          'environments': [
              {
                  'id': 'string',
                  'name': 'string',
                  'description': 'string',
                  'type': 'ssh'|'ec2',
                  'connectionType': 'CONNECT_SSH'|'CONNECT_SSM',
                  'arn': 'string',
                  'ownerArn': 'string',
                  'lifecycle': {
                      'status': 'CREATING'|'CREATED'|'CREATE_FAILED'|'DELETING'|'DELETE_FAILED',
                      'reason': 'string',
                      'failureResource': 'string'
                  },
                  'managedCredentialsStatus': 'ENABLED_ON_CREATE'|'ENABLED_BY_OWNER'|'DISABLED_BY_DEFAULT'|'DISABLED_BY_OWNER'|'DISABLED_BY_COLLABORATOR'|'PENDING_REMOVAL_BY_COLLABORATOR'|'PENDING_START_REMOVAL_BY_COLLABORATOR'|'PENDING_REMOVAL_BY_OWNER'|'PENDING_START_REMOVAL_BY_OWNER'|'FAILED_REMOVAL_BY_COLLABORATOR'|'FAILED_REMOVAL_BY_OWNER'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Information about the environments that are returned.

        
        

        - *(dict) --* 

          Information about an Cloud9 development environment.

          
          

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

            The ID of the environment.

            
          

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

            The name of the environment.

            
          

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

            The description for the environment.

            
          

          - **type** *(string) --* 

            The type of environment. Valid values include the following:

             

            
            * ``ec2``: An Amazon Elastic Compute Cloud (Amazon EC2) instance connects to the environment.
             
            * ``ssh``: Your own server connects to the environment.
            

            
          

          - **connectionType** *(string) --* 

            The connection type used for connecting to an Amazon EC2 environment. ``CONNECT_SSH`` is selected by default.

            
          

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

            The Amazon Resource Name (ARN) of the environment.

            
          

          - **ownerArn** *(string) --* 

            The Amazon Resource Name (ARN) of the environment owner.

            
          

          - **lifecycle** *(dict) --* 

            The state of the environment in its creation or deletion lifecycle.

            
            

            - **status** *(string) --* 

              The current creation or deletion lifecycle state of the environment.

               

              
              * ``CREATING``: The environment is in the process of being created.
               
              * ``CREATED``: The environment was successfully created.
               
              * ``CREATE_FAILED``: The environment failed to be created.
               
              * ``DELETING``: The environment is in the process of being deleted.
               
              * ``DELETE_FAILED``: The environment failed to delete.
              

              
            

            - **reason** *(string) --* 

              Any informational message about the lifecycle state of the environment.

              
            

            - **failureResource** *(string) --* 

              If the environment failed to delete, the Amazon Resource Name (ARN) of the related Amazon Web Services resource.

              
        
          

          - **managedCredentialsStatus** *(string) --* 

            Describes the status of Amazon Web Services managed temporary credentials for the Cloud9 environment. Available values are:

             

            
            * ``ENABLED_ON_CREATE``
             
            * ``ENABLED_BY_OWNER``
             
            * ``DISABLED_BY_DEFAULT``
             
            * ``DISABLED_BY_OWNER``
             
            * ``DISABLED_BY_COLLABORATOR``
             
            * ``PENDING_REMOVAL_BY_COLLABORATOR``
             
            * ``PENDING_REMOVAL_BY_OWNER``
             
            * ``FAILED_REMOVAL_BY_COLLABORATOR``
             
            * ``ENABLED_BY_OWNER``
             
            * ``DISABLED_BY_DEFAULT``
            

            
      
    
  
  **Exceptions**
  
  *   :py:class:`Cloud9.Client.exceptions.BadRequestException`

  
  *   :py:class:`Cloud9.Client.exceptions.ConflictException`

  
  *   :py:class:`Cloud9.Client.exceptions.NotFoundException`

  
  *   :py:class:`Cloud9.Client.exceptions.ForbiddenException`

  
  *   :py:class:`Cloud9.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`Cloud9.Client.exceptions.LimitExceededException`

  
  *   :py:class:`Cloud9.Client.exceptions.InternalServerErrorException`

  

  **Examples**

  
  ::

    response = client.describe_environments(
        environmentIds=[
            '8d9967e2f0624182b74e7690ad69ebEX',
            '349c86d4579e4e7298d500ff57a6b2EX',
        ],
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'environments': [
            {
                'name': 'my-demo-environment',
                'type': 'ec2',
                'arn': 'arn:aws:cloud9:us-east-2:123456789012:environment:8d9967e2f0624182b74e7690ad69ebEX',
                'description': 'This is my demonstration environment.',
                'id': '8d9967e2f0624182b74e7690ad69ebEX',
                'lifecycle': {
                    'status': 'CREATED',
                },
                'ownerArn': 'arn:aws:iam::123456789012:user/MyDemoUser',
            },
            {
                'name': 'another-demo-environment',
                'type': 'ssh',
                'arn': 'arn:aws:cloud9:us-east-2:123456789012:environment:349c86d4579e4e7298d500ff57a6b2EX',
                'description': '',
                'id': '349c86d4579e4e7298d500ff57a6b2EX',
                'lifecycle': {
                    'status': 'CREATED',
                },
                'ownerArn': 'arn:aws:sts::123456789012:assumed-role/AnotherDemoUser/AnotherDemoUser',
            },
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  