ltm rule command POLICY namesΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



POLICY::names
       Returns details about the policy names for the virtual server the iRule
       is enabled on.

SYNOPSIS
       POLICY::names (active | matched | unmatched)

DESCRIPTION
       iRule command which returns details about the policy names for the
       virtual server the iRule is enabled on.

       Syntax

       POLICY::names active

	    * Returns list of policy name(s) attached to the virtual server

       POLICY::names matched

	    * Returns a list of policy name(s) that had policy rules executed

       POLICY::names unmatched

	    * Returns a list of policy name(s) attached to the virtual server
	      that had no policy rules executed

RETURN VALUE
VALID DURING
EXAMPLES
	# Log the policy names for this virtual server
	when HTTP_REQUEST {
		log local0. "Enabled on this VS: \[POLICY::names active\]: [POLICY::names active]"
		log local0. "Matched: \[POLICY::names matched\]: [POLICY::names matched]"
		log local0. "Not matched: \[POLICY::names unmatched\]: [POLICY::names unmatched]"
	}

	# /var/log/ltm output:
	: Enabled on this VS: [POLICY::names active]: /Common/uri_to_pool_policy /Common/serverssl_policy /Common/unmatched_policy
	: Matched: [POLICY::names matched]: /Common/serverssl_policy /Common/uri_to_pool_policy
	: Not matched: [POLICY::names unmatched]: /Common/unmatched_policy

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-11.4.0 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)