Wiki: iRules API




An iRule event triggered when an HTTP request matches an HTTP class. You can use the HTTP__class command to extract the matching class name.


  if{ [HTTP::class] eq $myClass } {
    pool http

Related Information

Available Commands:
  • ASM::disable - Disables plugin processing on the connection.
  • ASM::enable - Enables plugin processing on the connection.
  • clone - Causes the system to clone traffic to the specified pool or pool member regardless of monitor status.
  • forward - Sets the connection to forward IP packets.
  • HTTP::class - Returns or sets the HTTP class selected by the HTTP selector.
  • HTTP::redirect - Redirects an HTTP request or response to the specified URL.
  • HTTP::uri - Returns or sets the URI part of the HTTP request.
  • imid - Returns an i-mode identifier string.
  • IP::idle_timeout - Returns or sets the idle timeout value.
  • ip_ttl - Returns the TTL of the latest IP packet received.
  • lasthop - Sets the lasthop of an IP connection.
  • listen - Sets up a related ephemeral listener to allow an incoming related connection to be established.
  • LSN::address - Set or override translation address.
  • LSN::disable - Disable LSN translation.
  • LSN::inbound - Disable inbound connections to translation address/port.
  • LSN::persistence - Set translation selection mode and persistence timeout.
  • LSN::persistence-entry - Create or lookup translation address.
  • LSN::pool - Specify LSN pool for current connection.
  • LSN::port - Set or override translation port.
  • nexthop - Sets the nexthop of an IP connection.
  • node - Sends the packet directly to the identified server node.
  • peer - Causes the specified iRule commands to be evaluated under the peer’s (opposite) context.
  • persist - Causes the system to use the named persistence type to persist the connection.
  • pool - Causes the system to load balance traffic to the specified pool or pool member regardless of monitor status.
  • session - Utilizes the persistence table to store arbitrary information based on the same keys as persistence.
  • SSL::cert - Returns X509 SSL certificate data.

Sample Code:
  • Log Http Class Selection - This iRule logs details of an HTTP request when the request is parsed and when the request matches or does not match an HTTP class filterset.

  • Introduced: BIGIP-9.2.0