cspolicy
Properties
| Name | Data Type | Permissions | Description |
|---|---|---|---|
| policyname | <String> | Read-write | Name for the content switching policy. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Cannot be changed after a policy is created. The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my policy" or 'my policy'). Minimum length = 1 |
| rule | <String> | Read-write | Expression, or name of a named expression, against which traffic is evaluated. The following requirements apply only to the Citrix ADC CLI: * If the expression includes one or more spaces, enclose the entire expression in double quotation marks. * If the expression itself includes double quotation marks, 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. |
| action | <String> | Read-write | Content switching action that names the target load balancing virtual server to which the traffic is switched. |
| logaction | <String> | Read-write | The log action associated with the content switching policy. |
| newname | <String> | Read-write | The new name of the content switching policy. Minimum length = 1 |
| vstype | <Integer> | Read-only | Virtual server type. |
| hits | <Integer> | Read-only | Total number of hits. |
| labelname | <String> | Read-only | Name of the label invoked. |
| labeltype | <String> | Read-only | The invocation type. Possible values = reqvserver, resvserver, policylabel |
| priority | <Integer> | Read-only | priority of bound policy. |
| activepolicy | <Boolean> | Read-only | Indicates whether policy is bound or not. |
| boundto | <String> | Read-only | Location where policy is bound. Minimum length = 1 |
| _nextgenapiresource | <String> | Read-only | . |
| __count | <Double> | Read-only | count parameter |
Operations
- ADD
- DELETE
- UPDATE
- UNSET
- GET (ALL)
- GET
- COUNT
- RENAME
-
Getting warnings in response: NITRO allows you to get warnings in an operation by specifying the 'warning' query parameter as 'yes'. For example, to get warnings while connecting to the NetScaler appliance, the URL is as follows:http:// <netscaler-ip-address> /nitro/v1/config/login?warning=yesIf any, the warnings are displayed in the response payload with the HTTP code '209 X-NITRO-WARNING'.
-
Authenticated access for individual NITRO operations: NITRO allows you to logon to the NetScaler appliance to perform individual operations. You can use this option instead of creating a NITRO session (using the login object) and then using that session to perform all operations,To do this, you must specify the username and password in the request header of the NITRO request as follows:X-NITRO-USER: <username>X-NITRO-PASS: <password>Note: In such cases, make sure that the request header DOES not include the following:Cookie:NITRO_AUTH_TOKEN= <tokenvalue>
*Note: * Mandatory parameters are marked in red and placeholder content is marked in green
add
{"cspolicy":{
<b>"policyname":<String_value>,
</b><b>"rule":<String_value>,
</b>"action":<String_value>,
"logaction":<String_value>
}}
delete
update
{"cspolicy":{
<b>"policyname":<String_value>,
</b>"rule":<String_value>,
"action":<String_value>,
"logaction":<String_value>
}}
unset
{"cspolicy":{
<b>"policyname":<String_value>,
</b>"logaction":true
}}
rename
{"cspolicy":{
<b>"policyname":<String_value>,
</b><b>"newname":<String_value>
</b>}}
get (all)
{ "cspolicy": [ {
"policyname":<String_value>,
"rule":<String_value>,
"action":<String_value>,
"vstype":<Integer_value>,
"hits":<Integer_value>,
"labelname":<String_value>,
"labeltype":<String_value>,
"target":<String_value>,
"priority":<Integer_value>,
"activepolicy":<Boolean_value>,
"logaction":<String_value>,
"boundto":<String_value>,
"_nextgenapiresource":<String_value>
}]}
get
{ "cspolicy": [ {
"policyname":<String_value>,
"rule":<String_value>,
"action":<String_value>,
"vstype":<Integer_value>,
"hits":<Integer_value>,
"labelname":<String_value>,
"labeltype":<String_value>,
"target":<String_value>,
"priority":<Integer_value>,
"activepolicy":<Boolean_value>,
"logaction":<String_value>,
"boundto":<String_value>,
"_nextgenapiresource":<String_value>
}]}
count
{ "cspolicy": [ { "__count": "#no"} ] }