Product Documentation

transform policy

Sep 12, 2016

The following operations can be performed on "transform policy":

add | rm | set | unset | show | stat | rename

add transform policy

Creates a URL Transformation policy, which specifies the requests and responses to be transformed by the associated profile.

Synopsys

add transform policy <name> <rule> <profileName> [-comment <string>] [-logAction <string>]

Arguments

name

Name for the URL Transformation policy.

Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the URL Transformation policy is added.

The following requirement applies only to the NetScaler CLI:

If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, ?my transform policy? or ?my transform policy).

rule

Expression, or name of a named expression, against which to evaluate traffic. Can be written in either default or classic syntax. Maximum length of a string literal in the expression is 255 characters. A longer string can be split into smaller strings of up to 255 characters each, and the smaller strings concatenated with the + operator. For example, you can create a 500-character string as follows: '"<string of 255 characters>" + "<string of 245 characters>"'

The following requirements apply only to the NetScaler CLI:

* If the expression includes blank spaces, the entire expression must be enclosed in double quotation marks.

* If the expression itself includes double quotation marks, you must escape the quotations by using the \\ character.

* Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.

profileName

Name of the URL Transformation profile to use to transform requests and responses that match the policy.

comment

Any comments to preserve information about this URL Transformation policy.

logAction

Log server to use to log connections that match this policy.

rm transform policy

Removes the specified URL Transformation policy.

Synopsys

rm transform policy <name>

Arguments

name

Name of the policy to remove.

Example

rm transform policy trans_pol

set transform policy

Modifies the specified parameters of a URL Transformation policy.

Synopsys

set transform policy <name> [-rule <expression>] [-profileName <string>] [-comment <string>] [-logAction <string>]

Arguments

name

Name of the policy to modify.

rule

Expression, or name of a named expression, against which to evaluate traffic. Can be written in either default or classic syntax. Maximum length of a string literal in the expression is 255 characters. A longer string can be split into smaller strings of up to 255 characters each, and the smaller strings concatenated with the + operator. For example, you can create a 500-character string as follows: '"<string of 255 characters>" + "<string of 245 characters>"'

The following requirements apply only to the NetScaler CLI:

* If the expression includes blank spaces, the entire expression must be enclosed in double quotation marks.

* If the expression itself includes double quotation marks, you must escape the quotations by using the \\ character.

* Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.

profileName

Name of the URL Transformation profile to use to transform requests and responses that match the policy.

comment

Any comments to preserve information about this URL Transformation policy.

logAction

Log server to use to log connections that match this policy.

Example

set transform policy pol9 -rule "HTTP.REQ.HEADER(\\\\"header\\\\").CONTAINS(\\\\"qh2\\\\")"

unset transform policy

Removes the settings of an existing URL Transformation policy. Attributes for which a default value is available revert to their default values. See the set transform policy command for a description of the parameters..Refer to the set transform policy command for meanings of the arguments.

Synopsys

unset transform policy <name> [-comment] [-logAction]

Example

unset transform policy pol9 -undefAction

show transform policy

Displays the current settings for the specified URL Transformation policy. If no policy name is specified, displays a list of all URL Transformation policies currently configured on the NetScaler appliance.

Synopsys

show transform policy [<name>]

Arguments

name

Name of the URL Transformation policy.

Outputs

stateflag

rule

Expression, or name of a named expression, against which to evaluate traffic. Can be written in either default or classic syntax. Maximum length of a string literal in the expression is 255 characters. A longer string can be split into smaller strings of up to 255 characters each, and the smaller strings concatenated with the + operator. For example, you can create a 500-character string as follows: '"<string of 255 characters>" + "<string of 245 characters>"'

The following requirements apply only to the NetScaler CLI:

* If the expression includes blank spaces, the entire expression must be enclosed in double quotation marks.

* If the expression itself includes double quotation marks, you must escape the quotations by using the \\ character.

* Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.

profileName

Name of the URL Transformation profile to use to transform requests and responses that match the policy.

priority

Specifies the priority of the policy.

hits

Number of hits.

activePolicy

Indicates whether policy is bound or not.

boundTo

Location where policy is bound

gotoPriorityExpression

Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.

labelType

Type of policy label invocation.

labelName

Name of the label to invoke if the current policy rule evaluates to TRUE.

comment

Any comments to preserve information about this URL Transformation policy.

logAction

Log server to use to log connections that match this policy.

bindPolicyType

isDefault

A value of true is returned if it is a default transform policy.

vserverType

devno

count

stat transform policy

Displays statistics for the specified URL Transformation policy. If no policy name is specified, displays abbreviated statistics for all URL Transformation policies currently configured on the NetScaler appliance.

Synopsys

stat transform policy [<name>] [-detail] [-fullValues] [-ntimes <positive_integer>] [-logFile <input_filename>] [-clearstats ( basic | full )]

Arguments

name

Name of the policy.

detail

Specifies detailed output (including more statistics). The output can be quite voluminous. Without this argument, the output will show only a summary.

fullValues

Specifies that numbers and strings should be displayed in their full form. Without this option, long strings are shortened and large numbers are abbreviated

ntimes

The number of times, in intervals of seven seconds, the statistics should be displayed.

Default value: 1

Minimum value: 0

logFile

The name of the log file to be used as input.

clearstats

Clear the statsistics / counters

Possible values: basic, full

Outputs

count

devno

stateflag

Outputs

Policy hits (Hits)

Number of hits on the policy

Policy undef hits (Undefhits)

Number of undef hits on the policy

Example

stat transform policy

rename transform policy

Renames a URL Transformation policy.

Synopsys

rename transform policy <name>@ <newName>@

Arguments

name

Existing name of the policy.

newName

New name for the policy. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters.

The following requirement applies only to the NetScaler CLI:

If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, ?my transform policy? or ?my transform policy).

Example

rename transform policy oldname newname