pem iruleΒΆ

pem irule(1)						BIG-IP TMSH Manual					      pem irule(1)

NAME
       irule - Configures an PEM iRule for traffic management system configuration.

MODULE
       pem

SYNTAX
       Configure the irule component within the pem module using the syntax shown in the following sections.

   CREATE/MODIFY
	create irule [name]
	edit irule [name]
	modify irule [ [ [name] | [glob] | [regex] ] ... ]

       Note: When using tmsh, you can only create pem iRule using the editor, which starts when you use the create or edit
       commands. You cannot create an pem iRule directly on the command line. The vim editor applies the autoindent and
       smartindent options. You can toggle on/off paste mode using the F12 key.

       Note: You can also edit user metadata associated with a pem iRule. See the example section for more information.

   DISPLAY
	list irule
	list irule [ [ [name] | [glob] | [regex] ] ... ]
	show running-config irule
	show running-config irule [ [ [name] | [glob] | [regex] ] ... ]
	  options:
	    all-properties
	    non-default-properties

	show irule
	show irule [ [ [name] | [glob] | [regex] ] ... ]
	  options:
	    (default | exa | gig | kil | meg | peta | raw | tera | yotta | zetta)
	    field-fmt

   DELETE
	delete irule [name]

DESCRIPTION
       You can apply pem iRules as an action when the traffic matches the filter criteria defined in pem policy rule. The syntax
       that you use to write pem iRules is based on the Tools Command Language (Tcl) programming standard. Thus, you can use many
       of the standard Tcl commands, plus a robust set of extensions that the BIG-IP(r) policy enforcement management system
       provides to help you customize the actions you want to apply to the traffic.

       You cannot edit the system iRules that come with the BIG-IP system. However, you can open a system iRule in the editor and
       use it as a template to create a new rule.

       To create a new pem iRule using a system rule as a template:

       1. Enter the command sequence edit irule [system rule name].
	    tmsh opens the system rule in an editor.

       2. Change the name of the rule in the editor.
       3. Edit the rule and exit the editor.
	    tmsh checks for syntax errors, and if there are none, it saves the new rule.

       For more information about iRules(r), see http://devcentral.f5.com/.

EXAMPLES
       list irule

       Displays all iRules.

       delete irule my_irule

       Deletes the pem iRule named my_irule.

	create irule my_irule {
	    priority 1
	    when PEM_POLICY {
	    }
	}

       Creates a pem iRule named my_irule with priority 1.

	modify rule my_irule {
	    when RULE_INIT {}
	    metadata replace-all-with {
		my_meta {
		    persist false
		    value "hello"
		}
		my_meta2 {
		    persist false
		    value "hello 2"
		}
	    }
	}

       Modifies an existing pem iRule named my_irule by adding a new metadata and modifying an existing metadata.

       The metadata attribute is the user defined key/value pair. Metadata has the following format:

	metadata
	    [add | delete | modify] {
		[metadata_name] {
		    value [ "value content" ]
		    persist [ true | false ]
		}
	    }

	modify irule my_irule {
	    when RULE_INIT {}
	    metadata delete { my_meta }
	}

       Deletes a metadata from a pem iRule.

OPTIONS
       glob Displays the items that match the glob expression. See help glob for a description of glob expression syntax.

       name Specifies a unique name for the component. This option is required for the create, delete, and modify commands.

       regex
	    Displays the items that match the regular expression. The regular expression must be preceded by an at sign (@[regular
	    expression]) to indicate that the identifier is a regular expression. See help regex for a description of regular
	    expression syntax.

       metadata
	    Specifies the user-defined key/value pair associated with the rule. See the example section for usage format.

SEE ALSO
       create, delete, edit, glob, list, modify, regex, show, tmsh

COPYRIGHT
       No part of this program may be reproduced or transmitted in any form or by any means, electronic or mechanical, including
       photocopying, recording, or information storage and retrieval systems, for any purpose other than the purchaser's personal
       use, without the express written permission of F5 Networks, Inc.

       F5 Networks and BIG-IP (c) Copyright 2008-2010, 2012-2013, 2015-2016. All rights reserved.

BIG-IP							    2016-03-14						      pem irule(1)