Change irule to policy.

I would like to use a policy instead of an irule, but have never created one. Can anyone help with the steps to create a policy for the following irule?

when HTTP_RESPONSE {

if { !([ HTTP::header exists "X-Frame-Options“ ])} { HTTP::header insert "X-Frame-Options" "SAMEORIGIN" }

}