This is a translation of the original English documentation page. Help us make it better.

User macroオブジェクト

次のオブジェクトは、usermacroAPIに直接関連しています。

Global macro

global macro オブジェクトには次のプロパティがあります。

プロパティ タイプ 説明
globalmacroid string (読取専用) グローバルマクロのID。
macro
(必須)
string マクロ文字列
value
(必須)
string マクロの値
type integer マクロのタイプ

有効な値:
0 - (デフォルト) テキストマクロ
1 - シークレット マクロ
2 - Vault シークレット
description string マクロの説明

Host macro

host macro objectはホスト、ホスト プロトタイプ、またはテンプレートで使用可能なマクロを定義します。 次のプロパティがあります。

プロパティ タイプ 説明
hostmacroid string (読取専用) ホストマクロのID
hostid
(必須)
string マクロが属するホストのID
macro
(必須)
string マクロ文字列
value
(必須)
string マクロの値
type integer マクロのタイプ

有効な値:
0 - (デフォルト) テキストマクロ
1 - シークレット マクロ
2 - Vault シークレット
description string マクロの説明

Macro configuration

The macro configuration object defines how a macro is displayed in the Host Wizard.

Property Type Description
type integer Type of macro input field.

Possible values:
0 - Macro is not used in Host Wizard;
1 - Textbox;
2 - List;
3 - Checkbox.

Property behavior:
- required
label string Label for macro input field.

Property behavior:
- required if type is set to "Textbox", "List", or "Checkbox"
description text Help text displayed alongside macro input field. Supports Markdown formatting.
priority integer Macro input field position in the macro list.

If priority is not set, the macro is added at the end of the ungrouped macro list.
required integer Marks the macro as mandatory.

Possible values:
0 - Not mandatory;
1 - Mandatory.

Property behavior:
- supported if type is set to "Textbox" or "List"
regex string Regular expression to validate user input in a textbox field.

Property behavior:
- supported if type is set to "Textbox"
section_name string Label of the collapsible section where the macro is grouped.

If section_name is not set, the macro is ungrouped. Ungrouped macros are displayed first; grouped macros are displayed below, ordered by their priority within each collapsible section.
options text JSON string defining list items or checkbox values.

For lists: an array of objects with value and text properties.
Example: [{"value": "http", "text": "HTTP"}, {"value": "https", "text": "HTTPS"}]

For checkboxes: an object with checked and unchecked properties.
Example: {"checked": true, "unchecked": false}

Property behavior:
- required if type is set to "List" or "Checkbox"