2022 Zabbix中国峰会
2022 Zabbix中国峰会

iconmap.update

Description 说明

object iconmap.update(object/array iconMaps)

This method allows to update existing icon maps.此方法允许更新已有的图标拓扑图。

Parameters 参数

(object/array) Icon map properties to be updated.需要更新的图标拓扑图属性。

The iconmapid property must be defined for each icon map, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.每一个图标拓扑图的iconmapid属性必须已定义过,其他属性为可选项。仅被传递的属性会被更新,其他属性保持不变。

Additionally to the standard icon map properties, the method accepts the following parameters.另外,对于标准图标拓扑图属性,此方法接受以下参数。

参数 类 描述
mappings array Icon mappings to replace the existing icon mappings.替换当前图标映射。

Return values 返回值

(object) Returns an object containing the IDs of the updated icon maps under the iconmapids property.返回一个对象其中包含在iconmapids属性下已更新图标拓扑图的ID。

Examples 范例

Rename icon map重命名图标拓扑图

Rename an icon map to "OS icons".将图标拓扑图重命名为“OS icons”。

Request:

{
           "jsonrpc": "2.0",
           "method": "iconmap.update",
           "params": {
               "iconmapid": "1",
               "name": "OS icons"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "iconmapids": [
                   "1"
               ]
           },
           "id": 1
       }

See also 参见

Source 来源

CIconMap::update() in frontends/php/include/classes/api/services/CIconMap.php.