Retrieves all alarms for a single metric. Specify a statistic, period, or unit to filter the set of alarms further.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Required |
The name of the metric. |
|
|
|
Required |
The namespace of the metric. [Constraints: The value must be between 1 and 255 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
Describe all alarms for a specific metric.
$cw = new AmazonCloudWatch();
$response = $cw->describe_alarms_for_metric('CPUUtilization', 'AWS/EC2', array(
'Statistic' => 'Average',
'Period' => 1800,
'Unit' => 'Seconds'
));
// Success?
var_dump($response->isOK());
Result:
bool(true)
Related Methods
Source
Method defined in services/cloudwatch.class.php | Toggle source view (17 lines) | View on GitHub

