:doc:`ElasticBeanstalk <../../elasticbeanstalk>` / Client / describe_environment_resources

******************************
describe_environment_resources
******************************



.. py:method:: ElasticBeanstalk.Client.describe_environment_resources(**kwargs)

  

  Returns AWS resources for this environment.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentResources>`_  


  **Request Syntax**
  ::

    response = client.describe_environment_resources(
        EnvironmentId='string',
        EnvironmentName='string'
    )
    
  :type EnvironmentId: string
  :param EnvironmentId: 

    The ID of the environment to retrieve AWS resource usage data.

     

    Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns ``MissingRequiredParameter`` error.

    

  
  :type EnvironmentName: string
  :param EnvironmentName: 

    The name of the environment to retrieve AWS resource usage data.

     

    Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns ``MissingRequiredParameter`` error.

    

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

    
    ::

      {
          'EnvironmentResources': {
              'EnvironmentName': 'string',
              'AutoScalingGroups': [
                  {
                      'Name': 'string'
                  },
              ],
              'Instances': [
                  {
                      'Id': 'string'
                  },
              ],
              'LaunchConfigurations': [
                  {
                      'Name': 'string'
                  },
              ],
              'LaunchTemplates': [
                  {
                      'Id': 'string'
                  },
              ],
              'LoadBalancers': [
                  {
                      'Name': 'string'
                  },
              ],
              'Triggers': [
                  {
                      'Name': 'string'
                  },
              ],
              'Queues': [
                  {
                      'Name': 'string',
                      'URL': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Result message containing a list of environment resource descriptions.

      
      

      - **EnvironmentResources** *(dict) --* 

        A list of  EnvironmentResourceDescription.

        
        

        - **EnvironmentName** *(string) --* 

          The name of the environment.

          
        

        - **AutoScalingGroups** *(list) --* 

          The ``AutoScalingGroups`` used by this environment.

          
          

          - *(dict) --* 

            Describes an Auto Scaling launch configuration.

            
            

            - **Name** *(string) --* 

              The name of the ``AutoScalingGroup`` .

              
        
      
        

        - **Instances** *(list) --* 

          The Amazon EC2 instances used by this environment.

          
          

          - *(dict) --* 

            The description of an Amazon EC2 instance.

            
            

            - **Id** *(string) --* 

              The ID of the Amazon EC2 instance.

              
        
      
        

        - **LaunchConfigurations** *(list) --* 

          The Auto Scaling launch configurations in use by this environment.

          
          

          - *(dict) --* 

            Describes an Auto Scaling launch configuration.

            
            

            - **Name** *(string) --* 

              The name of the launch configuration.

              
        
      
        

        - **LaunchTemplates** *(list) --* 

          The Amazon EC2 launch templates in use by this environment.

          
          

          - *(dict) --* 

            Describes an Amazon EC2 launch template.

            
            

            - **Id** *(string) --* 

              The ID of the launch template.

              
        
      
        

        - **LoadBalancers** *(list) --* 

          The LoadBalancers in use by this environment.

          
          

          - *(dict) --* 

            Describes a LoadBalancer.

            
            

            - **Name** *(string) --* 

              The name of the LoadBalancer.

              
        
      
        

        - **Triggers** *(list) --* 

          The ``AutoScaling`` triggers in use by this environment.

          
          

          - *(dict) --* 

            Describes a trigger.

            
            

            - **Name** *(string) --* 

              The name of the trigger.

              
        
      
        

        - **Queues** *(list) --* 

          The queues used by this environment.

          
          

          - *(dict) --* 

            Describes a queue.

            
            

            - **Name** *(string) --* 

              The name of the queue.

              
            

            - **URL** *(string) --* 

              The URL of the queue.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`ElasticBeanstalk.Client.exceptions.InsufficientPrivilegesException`

  

  **Examples**

  The following operation retrieves information about resources in an environment named my-env:
  ::

    response = client.describe_environment_resources(
        EnvironmentName='my-env',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'EnvironmentResources': {
            'AutoScalingGroups': [
                {
                    'Name': 'awseb-e-qu3fyyjyjs-stack-AWSEBAutoScalingGroup-QSB2ZO88SXZT',
                },
            ],
            'EnvironmentName': 'my-env',
            'Instances': [
                {
                    'Id': 'i-0c91c786',
                },
            ],
            'LaunchConfigurations': [
                {
                    'Name': 'awseb-e-qu3fyyjyjs-stack-AWSEBAutoScalingLaunchConfiguration-1UUVQIBC96TQ2',
                },
            ],
            'LoadBalancers': [
                {
                    'Name': 'awseb-e-q-AWSEBLoa-1EEPZ0K98BIF0',
                },
            ],
            'Queues': [
            ],
            'Triggers': [
            ],
        },
        'ResponseMetadata': {
            '...': '...',
        },
    }

  