[comment]: # translation:outdated

[comment]: # ({dd4b3810-2fbbc9a6})
# > 对象

以下对象是直接关联到`mediatype`接口

[comment]: # ({/dd4b3810-2fbbc9a6})

[comment]: # ({1755282b-4630c87a})
### 媒介类型

媒介类型参数拥有以下参数

|Property|Type|Description|
|--------|----|-----------|
|mediatypeid|string|*(readonly)* 媒介类型ID|
|**description**<br>(required)|string|媒介类型名称|
|**type**<br>(required)|integer|媒介类型的传输方式<br><br>可能的值：<br>0-电子邮件<br>1-脚本<br>2-SMS<br>3-Jabber<br>100-Ez Texting。|
|exec\_path|string|<|

对于脚本媒体类型，“exec\_path”包含已执行脚本的名称。\
\
对于Ez Texting `exec_path`包含了消息文本的限制\
可能的文本限定值 ：0- USA (160 characters) 1 - Canada (136 characters).\
\
用于脚本和Ez短信媒体类型。|

|   |   |   |
|---|---|---|
|gsm\_modem|string|GSM调制解调器的串行设备名称。<br><br>用于SMS媒介类型|
|passwd|string|认证的密码<br>\\\\用于Jabber和Ez Texting媒介类型|
|smtp\_email|string|发送通知的电子邮件地址。<br><br>用于电子邮件媒介类型|
|smtp\_helo|string|<br><br>用于电子邮件媒介类型|
|smtp\_server|string|<br>\\\\用于电子邮件媒介类型|
|status|integer|媒介类型是否是启用的<br>\\\\可能的值：<br>0-启用（默认） 1-禁用|
|username|string|用户名或Jabber标识符<br><br>用于Jabber and Ez Texting媒介类型|
|exec\_params|string|脚本参数。<br><br>每个参数以新的行提要结束|
|maxsessions|integer|可以并行处理的警报的最大数量。<br><br>SMS可能的值：1（默认的）\\\\其他媒介类型可能的值：0-100|
|maxattempts|integer|发送警报的最大尝试次数。<br>\\\\可能的值：<br><br>1-10，默认是3|
|attempt\_interval|string|重试尝试之间的间隔。接收带后缀的秒和时间单位。<br><br>可能的值：0\~60s 默认是：10s|

[comment]: # ({/1755282b-4630c87a})

[comment]: # ({46e1e59a-46e1e59a})
### Webhook parameters

Parameters passed to webhook script when it is called, have the
following properties.

|Property|[Type](/manual/api/reference_commentary#data_types)|Description|
|--------|---------------------------------------------------|-----------|
|**name**<br>(required)|string|Parameter name.|
|value|string|Parameter value, support macros. Supported macros described on [page](/manual/appendix/macros/supported_by_location).|

[comment]: # ({/46e1e59a-46e1e59a})

[comment]: # ({48d58257-48d58257})
### Message template

The message template object defines a template that will be used as a
default message for action operations to send a notification. It has the
following properties.

|Property|[Type](/manual/api/reference_commentary#data_types)|Description|
|--------|---------------------------------------------------|-----------|
|**eventsource**<br>(required)|integer|Event source.<br><br>Possible values:<br>0 - triggers;<br>1 - discovery;<br>2 - autoregistration;<br>3 - internal.|
|**recovery**<br>(required)|integer|Operation mode.<br><br>Possible values:<br>0 - operations;<br>1 - recovery operations;<br>2 - update operations.|
|subject|string|Message subject.|
|message|string|Message text.|

[comment]: # ({/48d58257-48d58257})
