On this page
Oggetto macro utente
I seguenti oggetti sono direttamente correlati all'API usermacro.
Macro globale
L'oggetto macro globale ha le seguenti proprietà.
| Property | Type | Description |
|---|---|---|
| globalmacroid | ID | ID della macro globale. Property behavior: - sola lettura - obbligatorio per le operazioni di aggiornamento |
| macro | string | Stringa della macro. Property behavior: - obbligatorio per le operazioni di creazione |
| value | string | Valore della macro. Property behavior: - solo scrittura se type è impostato su "Secret macro"- obbligatorio per le operazioni di creazione |
| type | integer | Tipo di macro. Valori possibili: 0 - (predefinito) Text macro; 1 - Secret macro; 2 - Vault secret. |
| description | string | Descrizione della macro. |
Macro host
L'oggetto macro dell'host definisce una macro disponibile su un host, host prototype o template. Ha le seguenti proprietà.
| Property | Type | Description |
|---|---|---|
| hostmacroid | ID | ID della macro dell'host. Property behavior: - read-only - required for update operations |
| hostid | ID | ID dell'host a cui appartiene la macro. Property behavior: - constant - required for create operations |
| macro | string | Stringa della macro. Property behavior: - required for create operations |
| value | string | Valore della macro. Property behavior: - write-only if type is set to "Secret macro"- required for create operations |
| type | integer | Tipo di macro. Possible values: 0 - (default) Text macro; 1 - Secret macro; 2 - Vault secret. |
| description | string | Descrizione della macro. |
| automatic | integer | Definisce se la macro è controllata da una 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. |