User macro [用户宏]
此类用于全局宏的使用。
对象引用:
可用的方法:
[usermacro.create](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/create "manual:api:reference:usermacro:create")
- 创建新的主机宏[usermacro.createglobal](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/createglobal "manual:api:reference:usermacro:createglobal")
- 创建新的全局宏[usermacro.delete](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/delete "manual:api:reference:usermacro:delete")
- 删除主机宏[usermacro.deleteglobal](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/deleteglobal "manual:api:reference:usermacro:deleteglobal")
- 删除全局宏[usermacro.get](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/get "manual:api:reference:usermacro:get")
- 检索主机和全局宏[usermacro.update](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/update "manual:api:reference:usermacro:update")
- 更新主机宏[usermacro.updateglobal](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/updateglobal "manual:api:reference:usermacro:updateglobal")
- 更新全局宏
User macro
This class is designed to work with host and global macros.
Object references:
Available methods:
[usermacro.create](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/create "manual:api:reference:usermacro:create")
- creating new host macros[usermacro.createglobal](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/createglobal "manual:api:reference:usermacro:createglobal")
- creating new global macros[usermacro.delete](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/delete "manual:api:reference:usermacro:delete")
- deleting host macros[usermacro.deleteglobal](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/deleteglobal "manual:api:reference:usermacro:deleteglobal")
- deleting global macros[usermacro.get](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/get "manual:api:reference:usermacro:get")
- retrieving host and global macros[usermacro.update](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/update "manual:api:reference:usermacro:update")
- updating host macros[usermacro.updateglobal](https://www.zabbix.com/documentation/4.0/zh/manual/api/reference/usermacro/updateglobal "manual:api:reference:usermacro:updateglobal")
- updating global macros