The following objects are directly related to the valuemap
API.
The value map object has the following properties.
Property | Type | Description |
---|---|---|
valuemapid | string | ID of the value map. Property behavior: - read-only - required for update operations |
hostid | id | ID of the host or template that the value map belongs to. Property behavior: - constant - required for create operations |
name | string | Name of the value map. Property behavior: - required for create operations |
mappings | array | Value mappings for current value map. The mapping object is described in detail below. Property behavior: - required for create operations |
uuid | string | Universal unique identifier, used for linking imported value maps to already existing ones. Auto-generated, if not given. Property behavior: - supported if the value map belongs to a template |
The value mappings object defines value mappings of the value map. It has the following properties.
Property | Type | Description |
---|---|---|
type | integer | Mapping match type. Possible values: 0 - (default) mapping will be applied if value is equal; 1 - mapping will be applied if value is greater or equal1; 2 - mapping will be applied if value is less or equal1; 3 - mapping will be applied if value is in range (ranges are inclusive; multiple ranges, separated by comma character, can be defined)1; 4 - mapping will be applied if value matches a regular expression2; 5 - if no matches are found, mapping will not be applied, and the default value will be used. If type is set to "0", "1", "2", "3", "4", then value cannot be empty.If type is set to "5", then value must be empty. |
value | string | Original value. Property behavior: - required if type is set to "1", "2", "3", "4"- supported if type is set to "5" |
newvalue | string | Value to which the original value is mapped to. Property behavior: - required |
1 supported only for items having value type "numeric unsigned", "numeric float".
2 supported only for items having value type "character".