Sets the health status of an instance.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The identifier of the Amazon EC2 instance. [Constraints: The value must be between 1 and 16 characters, and must match the following regular expression pattern: |
|
|
Required |
The health status of the instance. “Healthy” means that the instance is healthy and should remain in service. “Unhealthy” means that the instance is unhealthy. Auto Scaling should terminate and replace it. [Constraints: The value must be between 1 and 32 characters, and must match the following regular expression pattern: |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Set the instance health for an autoscaling group.
// Instantiate the class $as = new AmazonAS(); $response = $as->set_instance_health('i-be038dd3', 'Unhealthy', array( 'ShouldRespectGracePeriod' => '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