设置实例告警配置[待下线] - SetAlarmTopicConfigInfo
功能介绍
设置实例告警配置
URI
POST /v1/{project_id}/{instance_id}/audit/alarm/topic
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 参数解释: 项目ID。可通过IAM服务[查询指定IAM用户的项目列表]接口获取。 约束限制: 不涉及 取值范围: 以IAM服务接口返回值为准,字符长度32-64。 默认取值: 不涉及 |
instance_id | 是 | String | 参数解释: 实例ID。可通过查询实例列表接口ID字段获取 约束限制: 不涉及 取值范围: 以查询实例列表接口值为准,字符长度32-64。 默认取值: 不涉及 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 参数解释: 用户Token。通过调用IAM服务查询用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 不涉及 取值范围: IAM服务查询用户Token接口为准 默认取值: 不涉及 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
alarm_cpu | 是 | Integer | CPU告警阈值(%) |
alarm_disk | 是 | Integer | 磁盘告警阈值(%) |
alarm_memory | 是 | Integer | 内存告警阈值(%) |
alarm_num | 是 | Integer | 每天发送告警总条数 |
alarm_risk | 否 | Array of strings | 告警等级,默认为空。
|
alarm_switch | 是 | String | 通知开关
|
alarm_topic_urn | 否 | String | 通知消息主题URN,调用SMN服务接口获取。当alarm_switch为ON时必填 |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
status | String | 状态
|
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
details | Array of DbssErrorDetail objects | PDP5鉴权异常信息 |
encoded_authorization_message | String | PDP5鉴权异常信息 |
error_code | String | 错误码 |
error_msg | String | 错误信息 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
details | Array of DbssErrorDetail objects | PDP5鉴权异常信息 |
encoded_authorization_message | String | PDP5鉴权异常信息 |
error_code | String | 错误码 |
error_msg | String | 错误信息 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
details | Array of DbssErrorDetail objects | PDP5鉴权异常信息 |
encoded_authorization_message | String | PDP5鉴权异常信息 |
error_code | String | 错误码 |
error_msg | String | 错误信息 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
details | Array of DbssErrorDetail objects | PDP5鉴权异常信息 |
encoded_authorization_message | String | PDP5鉴权异常信息 |
error_code | String | 错误码 |
error_msg | String | 错误信息 |
请求示例
/v1/{project_id}/{instance_id}/audit/alarm/topic
{
"alarm_cpu" : 80,
"alarm_memory" : 80,
"alarm_num" : 10,
"alarm_disk" : 80,
"alarm_switch" : "ON",
"alarm_topic_urn" : "urn:smn:cn-north-7:b9351f98c724428xxxxxxxxx:DBSS-Message",
"alarm_risk" : [ "high", "low" ]
} 响应示例
状态码:200
OK
{
"status" : "success"
} 状态码
状态码 | 描述 |
|---|---|
200 | OK |
400 | 请求参数有误 |
401 | 未授权 |
403 | 认证失败 |
500 | 服务端错误 |
错误码
请参见错误码。

