最近更新时间:2024.04.19 11:53:54
首次发布时间:2023.06.30 15:23:34
更新告警联系人信息。
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UpdateContact | 公共参数,本接口值:UpdateContact。 |
Version | String | 是 | 2021-03-03 | 公共参数,本接口值:2021-03-03。 |
Id | String | 是 | 4a337d5b-0959-4cc7-a3ea-2f71332d4ff3 | 联系人 ID。 |
Name | String | 否 | test | 联系人名称。
|
String | 否 | test@123.com | 联系人邮箱,需为合法邮箱字段。 | |
Webhook | Object Webhook | 否 | 联系人通用 Webhook。 | |
ContactGroupIds | Array of String | 否 | ["f9626b5a-0c9e-420e-b6e5-4c66b84f080d"] | 联系人所属联系人组 ID。 |
LarkBotWebhook | Object LarkBotWebhook | 否 | - | 联系人飞书群组机器人 Webhook。 |
DingTalkBotWebhook | Object DingTalkBotWebhook | 否 | - | 联系人钉钉群组机器人 Webhook。 |
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Address | String | 是 | https://www.bytedance.com/ | 通用 Webhook 地址。 |
Token | String | 否 | 3KSxxx | 通用 Webhook token。 |
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Address | String | 是 | https://open.feishu.cn/open-apis/bot/v2/hook/xxx | 飞书群组机器人 Webhook 地址,请参见 官方文档。 |
SecretKey | String | 否 | 6KKxxx | 飞书群组机器人 Webhook 秘钥。 |
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Address | String | 是 | https://oapi.dingtalk.com/robot/send?access_token=xxx | 钉钉群组机器人 Webhook 地址,请参见 官方文档。 |
SecretKey | String | 否 | SECxxx | 钉钉群组机器人 Webhook 秘钥。 |
AtMobiles | Array of String | 否 | ["133********"] | 被@人的手机号,该用户需要在群组里。 |
AtUserIds | Array of String | 否 | ["********"] | 被@人的用户 ID,该用户需要在群组里。 |
POST /?Action=UpdateContact&Version=2021-03-03 Content-Type:application/json { "Id": "4a337d5b-0959-4cc7-a3ea-2f71332d4ff3", "Name": "test", "Email": "test@123.com", "Webhook": { "Address": "https://www.bytedance.com/", "Token": "xxxxxxxx" }, "ContactGroupIds": ["f9626b5a-0c9e-420e-b6e5-4c66b84f080d"], "LarkBotWebhook": { "Address": "https://open.feishu.cn/open-apis/bot/v2/hook/xxx", "SecretKey": "xxxxxxxx" }, "DingTalkBotWebhook": { "Address": "https://oapi.dingtalk.com/robot/send?access_token=xxx", "SecretKey": "xxxxxxxx", "AtMobiles": ["133********"], "AtUserIds": ["********"] } }
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Id | String | 4a337d5b-0959-4cc7-a3ea-2f71332d4ff3 | 联系人 ID。 |
SendStatus | String | MessageSucceed.Email | 发送邮箱认证信息状态码:
|
Message | String | - | 发送邮箱认证信息错误原因。 |
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "202211302208xxxx", "Action": "UpdateContact", "Version": "2021-03-03", "Service": "vmp", "Region": "cn-beijing" }, "Result": { "Id": "4a337d5b-0959-4cc7-a3ea-2f71332d4ff3", "SendStatus": " MessageSucceed.Email" } }
本接口错误码如下表所示,公共错误码请参见 公共错误码。
HTTP 状态码 | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParameter.{{parameter}} | The specified {{parameter}} is invalid. | 参数不合法,请检查参数正确性后重试。 |
400 | MissingParameter.{{parameter}} | The required parameter {{parameter}} is missing. | 缺少必要的参数。 |
403 | ProductUnsubscribed | You are not subscribed to the Volcengine Managed Service for Prometheus (VMP). Please go to the VMP console web page to subscribe to the service | 当前账号未订阅 VMP 服务。 |
404 | NotFound.Id | The specified Contact {{Id}} is not found. | 未找到指定联系人。 |
409 | Conflict.Name | The specified name conflicts with existing Contact. | 在同一账户下不能有相同名称的联系人。 |