Terminates the specified instance. Optionally, the desired group size can be adjusted.
This call simply registers a termination request. The termination of the instance cannot happen immediately.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The ID of the Amazon EC2 instance to be terminated. [Constraints: The value must be between 1 and 16 characters, and must match the following regular expression pattern: |
|
|
Required |
Specifies whether (true) or not (false) terminating this instance should also decrement the size of the |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Terminates the specified instance. Optionally, the desired group size can be adjusted.
// Instantiate the class $as = new AmazonAS(); $response = $as->terminate_instance_in_auto_scaling_group('i-be038dd3', 'false'); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/as.class.php | Toggle source view (8 lines) | View on GitHub