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

************************
request_environment_info
************************



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

  

  Initiates a request to compile the specified type of information of the deployed environment.

   

  Setting the ``InfoType`` to ``tail`` compiles the last lines from the application server log files of every Amazon EC2 instance in your environment.

   

  Setting the ``InfoType`` to ``bundle`` compresses the application server log files for every Amazon EC2 instance into a ``.zip`` file. Legacy and .NET containers do not support bundle logs.

   

  Use  RetrieveEnvironmentInfo to obtain the set of logs.

   

  Related Topics

   

  
  *  RetrieveEnvironmentInfo
  

  

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


  **Request Syntax**
  ::

    response = client.request_environment_info(
        EnvironmentId='string',
        EnvironmentName='string',
        InfoType='tail'|'bundle'
    )
    
  :type EnvironmentId: string
  :param EnvironmentId: 

    The ID of the environment of the requested data.

     

    If no such environment is found, ``RequestEnvironmentInfo`` returns an ``InvalidParameterValue`` error.

     

    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 of the requested data.

     

    If no such environment is found, ``RequestEnvironmentInfo`` returns an ``InvalidParameterValue`` error.

     

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

    

  
  :type InfoType: string
  :param InfoType: **[REQUIRED]** 

    The type of information to request.

    

  
  
  :returns: None

  **Examples**

  The following operation requests logs from an environment named my-env:
  ::

    response = client.request_environment_info(
        EnvironmentName='my-env',
        InfoType='tail',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  