管理告警规则
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /manageAlertRules HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body | ManageAlertRulesUnifiedActionInput |
否 |
管理告警规则请求体聚合(CREATE/UPDATE/PATCH/BATCH_DELETE 共用,按 action 选填字段) |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
| ServerResponseManageAlertRulesResult |
管理告警规则-服务器响应结果 |
示例
正常返回示例
JSON格式
{
"data": {
"alertRule": {
"uuid": "",
"createdAt": "",
"updatedAt": "",
"status": "",
"workspace": "",
"displayName": "",
"contentTemplate": "",
"enabled": true,
"datasourceConfig": {
"type": "",
"instanceId": "",
"regionId": ""
},
"queryConfig": {
"type": "",
"promQl": "",
"enableDataCompleteCheck": true,
"metricSet": "",
"metric": "",
"entityDomain": "",
"entityType": "",
"entityFilters": [
{
"field": "",
"operator": "",
"value": ""
}
],
"labelFilters": [
{
"name": "",
"value": "",
"operator": ""
}
],
"entityFields": [
{
"field": "",
"value": ""
}
],
"serviceIdList": [
""
],
"filterList": [
{
"key": "",
"type": "",
"value": ""
}
],
"measureList": [
{
"measureCode": "",
"windowSecs": 0,
"groupBy": [
""
]
}
]
},
"conditionConfig": {
"type": "",
"durationSecs": 0,
"severity": "",
"operator": "",
"threshold": 0,
"aggregate": "",
"thresholdList": [
{
"severity": "",
"threshold": 0
}
],
"compareList": [
{
"aggregate": "",
"operator": "",
"threshold": 0
}
],
"relation": ""
},
"scheduleConfig": {
"type": "",
"intervalSecs": 0
},
"notifyConfig": {
"type": "",
"channels": [
{
"type": "",
"identifiers": [
""
]
}
],
"silenceTimeSecs": 0,
"activeDays": [
0
],
"activeStartTime": "",
"activeEndTime": "",
"utcOffset": ""
},
"actionIntegrationConfig": {
"enabled": true,
"actions": [
""
]
},
"armsIntegrationConfig": {
"enabled": true
},
"labels": {
"key": ""
},
"annotations": {
"key": ""
}
},
"deletedCount": 0,
"deletedUuidList": [
""
]
},
"code": "",
"success": true,
"requestId": "",
"message": "",
"total": 0,
"pageSize": 0,
"pageNumber": 0,
"nextToken": ""
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ParameterInvalid | The parameter is missing or invalid. %s | 参数缺失或者参数无效。 |
| 500 | InternalUnknownError | The request processing has failed due to some unknown error. | 服务运行错误。 |
| 403 | Forbidden | You are not authorized to operate the specified resource. | 没有权限,请使用RAM进行授权 |
| 404 | ResourceNotFound | The specified resource is not found. | 未找到指定资源。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?