-
-
-
-
-
-
-
ns-variable
-
-
-
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
ns-variable
The following operations can be performed on “ns-variable”:
unset | set | rm | show | add |
unset ns variable
Use this command to remove ns variable settings.Refer to the set ns variable command for meanings of the arguments.
Synopsis
unset ns variable
set ns variable
Set a variable for use in assignments and expressions.
Synopsis
set ns variable
Arguments
name Variable name. This follows the same syntax rules as other expression entity names: It must begin with an alpha character (A-Z or a-z) or an underscore (_). The rest of the characters must be alpha, numeric (0-9) or underscores. It cannot be re or xp (reserved for regular and XPath expressions). It cannot be an expression reserved word (e.g. SYS or HTTP). It cannot be used for an existing expression object (HTTP callout, patset, dataset, stringmap, or named expression).
type Specification of the variable type; one of the following: ulong - singleton variable with an unsigned 64-bit value. text(value-max-size) - singleton variable with a text string value. map(text(key-max-size),ulong,max-entries) - map of text string keys to unsigned 64-bit values. map(text(key-max-size),text(value-max-size),max-entries) - map of text string keys to text string values. where value-max-size is a positive integer that is the maximum number of bytes in a text string value. key-max-size is a positive integer that is the maximum number of bytes in a text string key. max-entries is a positive integer that is the maximum number of entries in a map variable. For a global singleton text variable, value-max-size <= 64000. For a global map with ulong values, key-max-size <= 64000. For a global map with text values, key-max-size + value-max-size <= 64000. max-entries is a positive integer that is the maximum number of entries in a map variable. This has a theoretical maximum of 2^64-1, but in actual use will be much smaller, considering the memory available for use by the map. Example: map(text(10),text(20),100) specifies a map of text string keys (max size 10 bytes) to text string values (max size 20 bytes), with 100 max entries.
ifFull Action to perform if an assignment to a map exceeds its configured max-entries: lru - (default) reuse the least recently used entry in the map. undef - force the assignment to return an undefined (Undef) result to the policy executing the assignment.
Possible values: undef, lru Default value: lru
ifValueTooBig Action to perform if an value is assigned to a text variable that exceeds its configured max-size, or if a key is used that exceeds its configured max-size: truncate - (default) truncate the text string to the first max-size bytes and proceed. undef - force the assignment or expression evaluation to return an undefined (Undef) result to the policy executing the assignment or expression.
Possible values: undef, truncate Default value: truncate
ifNoValue Action to perform if on a variable reference in an expression if the variable is single-valued and uninitialized or if the variable is a map and there is no value for the specified key: init - (default) initialize the single-value variable, or create a map entry for the key and the initial value, using the -init value or its default. undef - force the expression evaluation to return an undefined (Undef) result to the policy executing the expression.
Possible values: undef, init Default value: init
init Initialization value for this variable, to which a singleton variable or map entry will be set if it is referenced before an assignment action has assigned it a value. If the singleton variable or map entry already has been assigned a value, setting this parameter will have no effect on that variable value. Default: 0 for ulong, NULL for text
expires Value expiration in seconds. If the value is not referenced within the expiration period it will be deleted. 0 (the default) means no expiration. Minimum value: 0 Maximum value: 31622400
comment Comments associated with this variable.
Example
set ns variable user_privilege_map -type map(text(15),text(10),10000)
rm ns variable
Remove a variable and its value(s).
Synopsis
rm ns variable
Arguments
name Variable name. This follows the same syntax rules as other expression entity names: It must begin with an alpha character (A-Z or a-z) or an underscore (_). The rest of the characters must be alpha, numeric (0-9) or underscores. It cannot be re or xp (reserved for regular and XPath expressions). It cannot be an expression reserved word (e.g. SYS or HTTP). It cannot be used for an existing expression object (HTTP callout, patset, dataset, stringmap, or named expression).
Example
rm ns variable user_privilege_map
show ns variable
Display configured variables
Synopsis
show ns variable [
Arguments
name Variable name. This follows the same syntax rules as other expression entity names: It must begin with an alpha character (A-Z or a-z) or an underscore (_). The rest of the characters must be alpha, numeric (0-9) or underscores. It cannot be re or xp (reserved for regular and XPath expressions). It cannot be an expression reserved word (e.g. SYS or HTTP). It cannot be used for an existing expression object (HTTP callout, patset, dataset, stringmap, or named expression).
Output
type Specification of the variable type; one of the following: ulong - singleton variable with an unsigned 64-bit value. text(value-max-size) - singleton variable with a text string value. map(text(key-max-size),ulong,max-entries) - map of text string keys to unsigned 64-bit values. map(text(key-max-size),text(value-max-size),max-entries) - map of text string keys to text string values. where value-max-size is a positive integer that is the maximum number of bytes in a text string value. key-max-size is a positive integer that is the maximum number of bytes in a text string key. max-entries is a positive integer that is the maximum number of entries in a map variable. For a global singleton text variable, value-max-size ‘ 64000. For a global map with ulong values, key-max-size ‘ 64000. For a global map with text values, key-max-size + value-max-size ‘ 64000. max-entries is a positive integer that is the maximum number of entries in a map variable. This has a theoretical maximum of 2^64-1, but in actual use will be much smaller, considering the memory available for use by the map. Example: map(text(10),text(20),100) specifies a map of text string keys (max size 10 bytes) to text string values (max size 20 bytes), with 100 max entries.
scope Scope of the variable: global - (default) one set of values visible across all Packet Engines on a standalone Citrix ADC, an HA pair, or all nodes of a cluster transaction - one value for each request-response transaction (singleton variables only; no expiration)
ifFull Action to perform if an assignment to a map exceeds its configured max-entries: lru - (default) reuse the least recently used entry in the map. undef - force the assignment to return an undefined (Undef) result to the policy executing the assignment.
ifValueTooBig Action to perform if an value is assigned to a text variable that exceeds its configured max-size, or if a key is used that exceeds its configured max-size: truncate - (default) truncate the text string to the first max-size bytes and proceed. undef - force the assignment or expression evaluation to return an undefined (Undef) result to the policy executing the assignment or expression.
ifNoValue Action to perform if on a variable reference in an expression if the variable is single-valued and uninitialized or if the variable is a map and there is no value for the specified key: init - (default) initialize the single-value variable, or create a map entry for the key and the initial value, using the -init value or its default. undef - force the expression evaluation to return an undefined (Undef) result to the policy executing the expression.
expires Value expiration in seconds. If the value is not referenced within the expiration period it will be deleted. 0 (the default) means no expiration.
init Initialization value for this variable, to which a singleton variable or map entry will be set if it is referenced before an assignment action has assigned it a value. If the singleton variable or map entry already has been assigned a value, setting this parameter will have no effect on that variable value. Default: 0 for ulong, NULL for text
comment Comments associated with this variable.
builtin Flag to determine if the variable is built-in or not
feature The feature to be checked while applying this config
referenceCount The number of references to the variable in expressions and assignments.
stateflag devno count
add ns variable
Create a variable for use in assignments and expressions.
Synopsis
add ns variable
Arguments
name Variable name. This follows the same syntax rules as other expression entity names: It must begin with an alpha character (A-Z or a-z) or an underscore (_). The rest of the characters must be alpha, numeric (0-9) or underscores. It cannot be re or xp (reserved for regular and XPath expressions). It cannot be an expression reserved word (e.g. SYS or HTTP). It cannot be used for an existing expression object (HTTP callout, patset, dataset, stringmap, or named expression).
type Specification of the variable type; one of the following: ulong - singleton variable with an unsigned 64-bit value. text(value-max-size) - singleton variable with a text string value. map(text(key-max-size),ulong,max-entries) - map of text string keys to unsigned 64-bit values. map(text(key-max-size),text(value-max-size),max-entries) - map of text string keys to text string values. where value-max-size is a positive integer that is the maximum number of bytes in a text string value. key-max-size is a positive integer that is the maximum number of bytes in a text string key. max-entries is a positive integer that is the maximum number of entries in a map variable. For a global singleton text variable, value-max-size <= 64000. For a global map with ulong values, key-max-size <= 64000. For a global map with text values, key-max-size + value-max-size <= 64000. max-entries is a positive integer that is the maximum number of entries in a map variable. This has a theoretical maximum of 2^64-1, but in actual use will be much smaller, considering the memory available for use by the map. Example: map(text(10),text(20),100) specifies a map of text string keys (max size 10 bytes) to text string values (max size 20 bytes), with 100 max entries.
scope Scope of the variable: global - (default) one set of values visible across all Packet Engines on a standalone Citrix ADC, an HA pair, or all nodes of a cluster transaction - one value for each request-response transaction (singleton variables only; no expiration)
Possible values: global, transaction Default value: global
ifFull Action to perform if an assignment to a map exceeds its configured max-entries: lru - (default) reuse the least recently used entry in the map. undef - force the assignment to return an undefined (Undef) result to the policy executing the assignment.
Possible values: undef, lru Default value: lru
ifValueTooBig Action to perform if an value is assigned to a text variable that exceeds its configured max-size, or if a key is used that exceeds its configured max-size: truncate - (default) truncate the text string to the first max-size bytes and proceed. undef - force the assignment or expression evaluation to return an undefined (Undef) result to the policy executing the assignment or expression.
Possible values: undef, truncate Default value: truncate
ifNoValue Action to perform if on a variable reference in an expression if the variable is single-valued and uninitialized or if the variable is a map and there is no value for the specified key: init - (default) initialize the single-value variable, or create a map entry for the key and the initial value, using the -init value or its default. undef - force the expression evaluation to return an undefined (Undef) result to the policy executing the expression.
Possible values: undef, init Default value: init
init Initialization value for this variable, to which a singleton variable or map entry will be set if it is referenced before an assignment action has assigned it a value. If the singleton variable or map entry already has been assigned a value, setting this parameter will have no effect on that variable value. Default: 0 for ulong, NULL for text
expires Value expiration in seconds. If the value is not referenced within the expiration period it will be deleted. 0 (the default) means no expiration. Minimum value: 0 Maximum value: 31622400
comment Comments associated with this variable.
Example
add ns variable user_privilege_map -type map(text(15),text(10),10000)
Share
Share
In this article
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.