It's not exactly what I am after :-)
What I need is to create a datastore usage alarm for a particular datastore. The script you have creates an alarm for the host. I'm not sure how to change the script so it creates a datastore usage alarm for the datastore.
Vickie