If you right-click an alarm in the Triggered Alarms section in the vSphere Client, there is an option to reset the alarm to green. This article provides information about resetting an alarm to green using the vSphere APIs/SDK.
Environment
VMware vSphere Web Services SDK 4.1
Resolution
To clear an event-based alarm, write the rule such that if an event (call it X) is received, it goes to Red, but if some event (call it counter-X) is received, it goes back to green. Then, to clear the Alarm, you just post a counter-event.
When com.customername.event.X occurs, an EventAlarmExpression is created that checks for this type and sets the state to Red.
You need to configure the Alarm so that:
If com.customername.event.X received, it goes to a Red state.
If com.customername.event.counter-X is received, it goes to a Green state.