LDAP Query iRule

Has anyone setup a simple iRule that sends the incoming request to one of 2 pools based on an Active Directory Group Membership. The syntax below is obviously not correct but represents the essence of what I’m looking for.

If {memberOF=CN=,DC=} { pool HTTPS_pool_1 } else { pool HTTPS_pool_2 } }

When using the APM module, you can use the ‘AD Query’ and ‘Pool Assignment’ agents in the Virtual Policy Editor (VPE) to achieve this.