Temporarily sets the state of an alarm. When the updated StateValue
differs from
the previous value, the action configured for the appropriate state is invoked. This is not a
permanent change. The next periodic alarm check (in about a minute) will set the alarm to its
actual state.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The descriptive name for the alarm. This name must be unique within the user’s AWS account. The maximum length is 255 characters. |
|
|
Required |
The value of the state. [Allowed values: |
|
|
Required |
The reason that this alarm is set to this specific state (in human-readable text format) |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Manually set the state of the alarm.
$cw = new AmazonCloudWatch(); $response = $cw->set_alarm_state('my-alarm', 'OK', 'Reason for manually modifying the state.'); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/cloudwatch.class.php | Toggle source view (9 lines) | View on GitHub