> 用户宏对象

以下对象与“usermacro”API直接相关。

全局宏

全局宏对象具有以下属性。

属性 类说明
globalmacroidstring(readonly) 全局宏的ID。
macro
(required)
string宏字符串。
value
(required)
string宏的价值。

> User macro object

The following objects are directly related to the usermacro API.

Global macro

The global macro object has the following properties.

PropertyTypeDescription
globalmacroidstring(readonly) ID of the global macro.
macro
(required)
stringMacro string.
value
(required)
stringValue of the macro.

主机宏

主机宏对象定义主机或模板上可用的宏。 它具有以下属性。

属性 类说明
hostmacroidstring(readonly) 主机宏的ID。
hostid
(required)
string宏所属主机的ID。
macro
(required)
string宏字符串。
value
(required)
string宏的值。

Host macro

The host macro object defines a macro available on a host or template. It has the following properties.

PropertyTypeDescription
hostmacroidstring(readonly) ID of the host macro.
hostid
(required)
stringID of the host that the macro belongs to.
macro
(required)
stringMacro string.
value
(required)
stringValue of the macro.