ltm rule command POLICY controlsΒΆ

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



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

SYNOPSIS
       POLICY::controls ('acceleration'        |
				 'asm'		       |
				 'avr'		       |
				 'caching'	       |
				 'classification'      |
				 'compression'	       |
				 'forwarding'	       |
				 'l7dos'	       |
				 'request-adaptation'  |
				 'response-adaptation' |
				 'server-ssl'	       |
				 'persistence')?

DESCRIPTION
       Returns details about the policy controls for the policies associated
       with the virtual server that the iRule is enabled on. Policy controls
       are typically virtual server profiles or features which can be enabled,
       disabled or modified per iRule execution via policies.

       As of v11.4 the following controls are available:
	acceleration	    - Application Acceleration Manager (AAM)
	asm		    - Application Security Manager
	avr		    - Application Visibility and Reporting
	caching 	    - HTTP caching
	classification	    - HTTP classification for Policy Enforcement
       Manager (PEM)
	compression	    - HTTP compression
	forwarding	    - pool, node, SNAT selection
	l7dos		    - Layer 7 Denial of Service profile
	request-adaptation  - request adaptation
	response-adaptation - response adaptation
	server-ssl	    - Server SSL As of v12.0
	persistence	    - Persistence mode

       Syntax

       POLICY::controls

	    * Returns a list of policy control(s) attached to the virtual server.
	      These are typically virtual server profiles or features which can
	      be enabled, disabled or modified per iRule execution via
	      policies.

       POLICY::controls [ acceleration | asm | avr | caching | classification
       | compression | forwarding | l7dos | request-adaptation | response-
       adaptation | server-ssl | persistence]

	    * Returns 1 or 0 depending on whether the given control is enabled in
	      the selected policy

RETURN VALUE
VALID DURING
EXAMPLES
	# Log the policy controls for this virtual server
	when HTTP_REQUEST {

		# Log the policy controls enabled on this virtual server
		log local0. "\[POLICY::controls\]: [POLICY::controls]"

		# Loop through each possible control type and log whether it is enabledor not (1 for enabled, 0 for not enabled)
		foreach control {acceleration asm avr caching classification compression forwarding l7dos request-adaptation response-adaptation server-ssl} {
			log local0. "\[POLICY::controls $control\]: [POLICY::controls $control]"
		}
	}

	# /var/log/ltm output:
	: [POLICY::controls]: forwarding compression server-ssl
	: [POLICY::controls acceleration]: 0
	: [POLICY::controls asm]: 0
	: [POLICY::controls avr]: 0
	: [POLICY::controls caching]: 0
	: [POLICY::controls classification]: 0
	: [POLICY::controls compression]: 1
	: [POLICY::controls forwarding]: 1
	: [POLICY::controls l7dos]: 0
	: [POLICY::controls request-adaptation]: 0
	: [POLICY::controls response-adaptation]: 0
	: [POLICY::controls server-ssl]: 1

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



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