以下对象与“usermacro”API直接相关。
全局宏对象具有以下属性。
| 属性 类 | 说明 | |
|---|---|---|
| globalmacroid | string | (readonly) 全局宏的ID。 |
| macro (required) |
string | 宏字符串。 |
| value (required) |
string | 宏的价值。 |
The following objects are directly related to the usermacro API.
The global macro object has the following properties.
| Property | Type | Description |
|---|---|---|
| globalmacroid | string | (readonly) ID of the global macro. |
| macro (required) |
string | Macro string. |
| value (required) |
string | Value of the macro. |
主机宏对象定义主机或模板上可用的宏。 它具有以下属性。
| 属性 类 | 说明 | |
|---|---|---|
| hostmacroid | string | (readonly) 主机宏的ID。 |
| hostid (required) |
string | 宏所属主机的ID。 |
| macro (required) |
string | 宏字符串。 |
| value (required) |
string | 宏的值。 |
The host macro object defines a macro available on a host or template. It has the following properties.
| Property | Type | Description |
|---|---|---|
| hostmacroid | string | (readonly) ID of the host macro. |
| hostid (required) |
string | ID of the host that the macro belongs to. |
| macro (required) |
string | Macro string. |
| value (required) |
string | Value of the macro. |