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

******************
restart_app_server
******************



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

  

  Causes the environment to restart the application container server running on each Amazon EC2 instance.

  

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


  **Request Syntax**
  ::

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

    The ID of the environment to restart the server for.

     

    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 restart the server for.

     

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

    

  
  
  :returns: None

  **Examples**

  The following operation restarts application servers on all instances in an environment named my-env:
  ::

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

  
  Expected Output:
  ::

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

  