I am new to boto and trying to get all the metrics that have alarms. Can some one please guide me how to do that? Here is what I am trying to do. I can get all the metrics in the following way.

```
import boto.ec2.cloudwatch
conn = boto.ec2.cloudwatch.connect_to_region('ap-southeast-1')
metrics = conn.list_metrics()
for metric in metrics:
   print metric.name, metric.namespace

```

I know that there is a function "describe\_alarms\_for\_metric" that returns the alarms for a metric. However it is not working for me and gives me an empty list. Here is what I am trying.

```
for metric in metrics:
    print conn.describe_alarms_for_metric(metric.name, metric.namespace)

```

I can also see the list of all alarms using "describe\_alarms" but I dont know which alarm is for what metric.

```
alarms = conn.describe_alarms()
for alarm in alarms:
    print alarm

```