调用 CreateAlarmNotifyGroup 接口创建告警通知组。
此接口的调用频率限制为 20 次/s,超出频率限制会报错 ExceedQPSLimit。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 参数类型 | 是否必选 | 示例值 | 说明 |
---|---|---|---|---|
AlarmNotifyGroupName | String | 必选 | test-alarm-nofify | 告警通知组名称。命名规则请参考资源命名限制。 |
NotifyType | Array of String | 必选 | / | 告警通知的类型。
|
Receivers | Array of Receiver | 必选 | / | 接收告警的 IAM 用户列表。可设置 1~10 个 IAM 用户。详细信息请参考 Receiver。 |
IamProjectName | String | 可选 | 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. | 服务器内部错误。 |