ElasticBeanstalk / Client / rebuild_environment

rebuild_environment#

ElasticBeanstalk.Client.rebuild_environment(**kwargs)#

Deletes and recreates all of the AWS resources (for example: the Auto Scaling group, load balancer, etc.) for a specified environment and forces a restart.

See also: AWS API Documentation

Request Syntax

response = client.rebuild_environment(
    EnvironmentId='string',
    EnvironmentName='string'
)
Parameters:
  • EnvironmentId (string) –

    The ID of the environment to rebuild.

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

  • EnvironmentName (string) –

    The name of the environment to rebuild.

    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

Exceptions

  • ElasticBeanstalk.Client.exceptions.InsufficientPrivilegesException

Examples

The following operation terminates and recreates the resources in an environment named my-env:

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

print(response)

Expected Output:

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