The following objects are directly related to the usermacro
API.
The global macro object has the following properties.
Property | Type | Description |
---|---|---|
globalmacroid | ID | ID of the global macro. Property behavior: - read-only - required for update operations |
macro | string | Macro string. Property behavior: - required for create operations |
value | string | Value of the macro. Property behavior: - write-only if type is set to "Secret macro"- required for create operations |
type | integer | Type of macro. Possible values: 0 - (default) Text macro; 1 - Secret macro; 2 - Vault secret. |
description | string | Description of the macro. |
The host macro object defines a macro available on a host, host prototype or template. It has the following properties.
Property | Type | Description |
---|---|---|
hostmacroid | ID | ID of the host macro. Property behavior: - read-only - required for update operations |
hostid | ID | ID of the host that the macro belongs to. Property behavior: - constant - required for create operations |
macro | string | Macro string. Property behavior: - required for create operations |
value | string | Value of the macro. Property behavior: - write-only if type is set to "Secret macro"- required for create operations |
type | integer | Type of macro. Possible values: 0 - (default) Text macro; 1 - Secret macro; 2 - Vault secret. |
description | string | Description of the macro. |
automatic | integer | Defines whether the macro is controlled by discovery rule. Possible values: 0 - (default) Macro is managed by user; 1 - Macro is managed by discovery rule. User is not allowed to create automatic macro. To update automatic macro, it must be converted to manual. |