创建通知模板

最近更新时间: 2026-09-17 00:06:28

1. 接口描述

接口请求域名: monitor.api3.fincloud.tencent.cn。

创建通知模板

默认接口请求频率限制:20次/秒。

接口更新时间:2022-07-25 20:37:38。

接口既验签名又鉴权。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数

参数名称 必选 允许NULL 类型 描述
Action String 公共参数,本接口取值:CreateAlarmNotice
Version String 公共参数,本接口取值:2018-07-24
Region String 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表
Module String 模块名,这里填“monitor”
示例值: monitor
Name String 通知模板名称 60字符以内
示例值: 默认通知模板
NoticeType String 通知类型 ALARM=未恢复通知 OK=已恢复通知 ALL=都通知
示例值: ALL
NoticeLanguage String 通知语言 zh-CN=中文 en-US=英文
示例值: zh-CN
UserNotices Array of UserNotice 用户通知 最多5个
示例值:查看
URLNotices Array of URLNotice 回调通知 最多3个
示例值:查看
ExtraChannels Array of String 其他非公开通知渠道列表
示例值: ["TSS"]
BigCustomerNotices Array of BigCustomerNotice 大客户通知 最多1个
示例值:查看

3. 输出参数

参数名称 类型 描述
NoticeId String 告警通知模板ID
示例值: notice-abcdef
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

错误码 描述
InvalidParameter 参数错误。
InvalidParameterValue 无效的参数值。
AuthFailure.UnauthorizedOperation 请求未授权。请参考 CAM 文档对鉴权的说明。
InternalError 内部错误。
ResourceNotFound 资源不存在。
FailedOperation 操作失败。

5. 示例

示例1 创建通知模板

输入示例

POST / HTTP/1.1
Host: monitor.api3.fincloud.tencent.cn
Content-Type: application/json
X-TC-Action: CreateAlarmNotice
https://monitor.api3.fincloud.tencent.cn/?Action=DescribeAllNamespaces&Module="monitor"&SceneType="1598976507"&ids="1598976507"&MonitorTypes="1000000"
&<公共请求参数>

Module=&NoticeId&Name&NoticeType&NoticeLanguage&UserNotices&URLNotices
{
    "Module": "monitor", 
    "Name": "noticeA", 
    "NoticeType": "ALL", 
    "NoticeLanguage": "zh-CN",
    "UserNotices": [
        {
            "ReceiverType": "USER",  
            "UserIds": [
                10001
            ], 
            "NoticeWay": [
                "SMS",
                "EMAIL"
            ], 
            "StartTime": 0, 
            "EndTime": 1, 
            "PhoneOrder": [
                10001
            ],
            "PhoneCircleInterval": 60, 
            "PhoneCircleTimes": 2, 
            "PhoneInnerInterval": 60,
            "NeedPhoneArriveNotice": 1
        }
    ], 
    "URLNotices": [
        {
            "URL": "https://www.mytest.com/validate"
        }
    ]
}

输出示例

{
    "Response": {
        "NoticeId": "notice-2h92ghf2",  
        "RequestId": "neh390an4opw0-45nw"
    }
}