> 脚本对象

    脚本对象有以下参数。 |属性|类型|描述| |————|—————————————————————————-|—————-| |scriptid|string|(只读) 脚本ID。| |name
    (必需)|string|脚本名称。| |type
    (必需)|integer|脚本类型。

    可能的值:
    0 - 脚本;
    1 - IPMI;
    2 - SSH;
    3 - Telnet;
    5 - (默认) Webhook。| |command
    (必需)|string|运行的命令。| |scope|integer|脚本范围。

    可能的值:
    1 - 默认 动作操作;
    2 - 手动主机动作;
    4 - 手动事件动作。| |execute_on|integer|在哪里运行脚本。
    type0时使用 (脚本)。

    可能的值:
    0 - 密码;
    1 - 公钥。| |username|string|身份验证使用的用户名
    type23时需要。| |password|string|通过密码进行身份验证的SSH脚本和Telnet脚本使用的密码。
    type2 且 为 0type3时使用。| |publickey|string|通过公钥进行身份验证的SSH脚本使用的公钥文件名。
    type2authtype1时需要。| |privatekey|string|通过公钥进行身份验证的SSH脚本使用的私钥文件名。
    type2authtype1时需要。| |port|string|SSH 和 Telnet 脚本使用的端口号。
    type 为 或 3时使用。| |groupid|string|可以运行脚本的主机群组ID。如果设置为 0, 脚本将可以在所有主机群组运行。

    默认值: 0。| |usrgrpid|string|允许运行脚本的用户群组ID。如果设置为 0, 脚本将可以在所有用户群组运行。
    scope24时使用。

    默认值: 0.| |host_access|integer|运行脚本所需的主机权限。
    scope24时使用。

    可能的值:
    1-60s

    默认值:
    30s| |parameters|array|[webhook入参]数组(/manual/api/reference/script/object#Webhook参数).
    当 为 5时使用。| |description|string|脚本描述。|

    webhook脚本运行时被传入的参数有如下属性。 |属性||描述| |————|—————————————————————————-|—————-| |name
    (必需)|string|参数名称。| |value|string|参数值。 支持。|

    日志条目对象有如下属性。 |属性||描述| |————|—————————————————————————-|—————-| |level|integer|日志等级。| |ms|string|从脚本开始运行到添加日志条目前经过时间(毫秒)。| |message|string|日志信息。|