terminate_environment ( $opt )

Terminates the specified environment.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • EnvironmentId - string - Optional - The ID of the environment to terminate. 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 - Optional - The name of the environment to terminate. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.
  • TerminateResources - boolean - Optional - Indicates whether the associated AWS resources should shut down when the environment is terminated: true: (default) The user AWS resources (for example, the Auto Scaling group, LoadBalancer, etc.) are terminated along with the environment. false: The environment is removed from the AWS Elastic Beanstalk but the AWS resources continue to operate.
    • true: The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.
    • false: AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.
    For more information, see the AWS Elastic Beanstalk User Guide. Default: true Valid Values: true | false
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Terminate an environment.

// Instantiate the class
$bean = new AmazonElasticBeanstalk();

$response = $bean->terminate_environment(array(
	'EnvironmentName' => 'my-environment',
	'TerminateResources' => 'true',
));

// Success?
var_dump($response->isOK());

Related Methods

Source

Method defined in services/elasticbeanstalk.class.php | Toggle source view (6 lines) | View on GitHub

public function terminate_environment($opt = null)
{
    if (!$opt) $opt = array();
            
    return $this->authenticate('TerminateEnvironment', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback