You need to enable JavaScript to run this app.
导航

CreateAlarmNotifyGroup

最近更新时间2024.03.28 10:17:47

首次发布时间2022.05.11 11:26:48

调用 CreateAlarmNotifyGroup 接口创建告警通知组。

使用说明

此接口的调用频率限制为 20 次/s,超出频率限制会报错 ExceedQPSLimit。

URI

请求方法
POST

URI

https://tls-{Region}.ivolces.com/CreateAlarmNotifyGroup

传输协议

HTTPS

请求参数

参数
参数类型
是否必选
示例值
说明

AlarmNotifyGroupName

String

必选

test-alarm-nofify

告警通知组名称。命名规则请参考资源命名规则

NotifyType

Array of String

必选

/

告警通知的类型。

  • Trigger:告警触发
  • Recovery:告警恢复

Receivers

Array of Receiver

必选

/

接收告警的 IAM 用户列表。可设置 1~10 个 IAM 用户。详细信息请参考 Receiver

IamProjectName

String

可选

default

告警组所属的 IAM 项目名称。未指定此参数时,日志服务会将告警组添加到名为 default 的 IAM 项目中。

响应参数

参数
参数类型
示例值
说明

AlarmNotifyGroupId

String

fc6*******

告警通知组 ID。

示例

请求示例

POST https://tls-{Region}.ivolces.com/CreateAlarmNotifyGroup HTTP/1.1
Content-Type: application/json
...
{
    "AlarmNotifyGroupName": "test1",
    "NotifyType": ["Recovery", "Trigger"],
    "Receivers": [
        {
                "ReceiverType": "User",
                "ReceiverNames": ["******"],
                "ReceiverChannels": ["Sms"],
                "StartTime": "00:00:00",
                "EndTime": "23:59:59"
        }
    ],
    "IamProjectName": "default"
}

响应示例

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8  
{
    "AlarmNotifyGroupId":"fc6*******"
}

错误码

错误码(Code)
HTTP 状态码
错误信息(Message)
说明

InvalidArgument

400

Invalid argument key %s, value %s, please check argument.

参数不合法。

AlarmNotifyGroupQuotaExceed

400

Exceeded alarm notifyGroup quota.

超过告警策略限额。

AlarmNoticeUserNotExist

400

Alarm notice user %s not exist

告警通知用户不存在。

NotifyGroupAlreadyExist

409

Notify group already exist

告警通知组已存在。

InternalServerError

500

We encountered an unexpected server error . Please try again later.

服务器内部错误。

更多信息,请参考通用错误码