获取基础策略告警组列表
最近更新时间: 2026-09-17 00:06:28
1. 接口描述
接口请求域名: monitor.api3.fincloud.tencent.cn。
获取基础策略告警组列表
默认接口请求频率限制:20次/秒。
接口更新时间:2022-10-24 10:18:55。
接口既验签名又鉴权。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数。
| 参数名称 | 必选 | 允许NULL | 类型 | 描述 |
|---|---|---|---|---|
| Action | 是 | 否 | String | 公共参数,本接口取值:DescribePolicyGroupList |
| Version | 是 | 否 | String | 公共参数,本接口取值:2018-07-24 |
| Region | 是 | 否 | String | 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表 |
| Module | 是 | 否 | String | 固定值,为"monitor" 示例值: monitor |
| Limit | 是 | 否 | Int64 | 分页参数,每页返回的数量,取值1~1000 示例值: 10 |
| Offset | 是 | 否 | Int64 | 分页参数,页偏移量,从0开始计数 示例值: 0 |
| Like | 否 | 否 | String | 按策略名搜索 示例值: test |
| InstanceGroupId | 否 | 否 | Int64 | 实例分组id 示例值: 12345 |
| UpdateTimeOrder | 否 | 否 | String | 按更新时间排序, asc 或者 desc 示例值: asc |
| ProjectIds | 否 | 否 | Array of Int64 | 项目id列表 示例值: [1] |
| ViewNames | 否 | 否 | Array of String | 告警策略类型列表 示例值: [cvm_device] |
| FilterUnuseReceiver | 否 | 否 | Int64 | 是否过滤无接收人策略组, 1表示过滤, 0表示不过滤 示例值: 0 |
| Receivers | 否 | 否 | Array of String | 过滤条件, 接收组列表 示例值: [123] |
| ReceiverUserList | 否 | 否 | Array of String | 过滤条件, 接收人列表 示例值: [12345] |
| Dimensions | 否 | 否 | String | 维度组合字段(json字符串), 例如[[{"name":"unInstanceId","value":"ins-6e4b2aaa"}]] 示例值: {} |
| ConditionTempGroupId | 否 | 否 | String | 模板策略组id, 多个id用逗号分隔 示例值: 123,345 |
| ReceiverType | 否 | 否 | String | 过滤条件, 接收人或者接收组, user表示接收人, group表示接收组 示例值: user |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| GroupList | Array of DescribePolicyGroupListGroup | 策略组列表 示例值:查看 |
| Total | Int64 | 策略组总数 示例值: 142 |
| RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
4. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码。
| 错误码 | 描述 |
|---|---|
| InvalidParameterValue | 无效的参数值。 |
| InternalError | 内部错误。 |
| InvalidParameter.InvalidParameterParam | 参数错误。 |
| InvalidParameter.InvalidParameter | 参数错误。 |
| InvalidParameter | 参数错误。 |
| InternalError.ExeTimeout | 执行超时。 |
| FailedOperation | 操作失败。 |
| MissingParameter | 缺少参数错误。 |
| UnknownParameter | 未知参数错误。 |
| UnauthorizedOperation | 未授权操作。 |
| UnsupportedOperation | 操作不支持。 |
| ResourceNotFound | 资源不存在。 |
| LimitExceeded | 超过配额限制。 |
| ResourceUnavailable | 资源不可用。 |
| ResourceInsufficient | 资源不足。 |
| FailedOperation | 操作失败。 |
| ResourceInUse | 资源被占用。 |
| DryRunOperation | DryRun 操作,代表请求将会是成功的,只是多传了 DryRun 参数。 |
| ResourcesSoldOut | 资源售罄。 |
| LimitExceeded.MetricQuotaExceeded | 指标数量达到配额限制,禁止含有未注册指标的请求。 |
| FailedOperation.ServiceNotEnabled | 服务未启用,开通服务后方可使用。 |
| FailedOperation.AlertPolicyCreateFailed | 创建告警策略失败。 |
| FailedOperation.DbRecordCreateFailed | 创建数据库记录失败。 |
| FailedOperation.DbTransactionBeginFailed | 数据库事务开始失败。 |
| FailedOperation.DbRecordDeleteFailed | 数据库记录删除失败。 |
| FailedOperation.DbQueryFailed | 数据库查询失败。 |
| FailedOperation.DbTransactionCommitFailed | 数据库事务提交失败。 |
| FailedOperation.DbRecordUpdateFailed | 数据库记录更新失败。 |
| AuthFailure.UnauthorizedOperation | 请求未授权。请参考 CAM 文档对鉴权的说明。 |
| FailedOperation.DuplicateName | 名字重复。 |
| FailedOperation.DruidQueryFailed | 查询分析数据失败。 |
| FailedOperation.DimQueryRequestFailed | 请求维度查询服务失败。 |
| FailedOperation.AlertPolicyDescribeFailed | 告警策略查询失败。 |
| FailedOperation.AlertPolicyDeleteFailed | 告警策略删除失败。 |
| FailedOperation.AlertPolicyModifyFailed | 告警策略修改失败。 |
| FailedOperation.AlertTriggerRuleDeleteFailed | 删除触发条件失败。 |
| FailedOperation.AlertFilterRuleDeleteFailed | 删除过滤条件失败。 |
5. 示例
示例1 获取头两个基础策略告警组列表
输入示例
https://monitor.api3.fincloud.tencent.cn/?Action=DescribePolicyGroupList
&Module=monitor
&Limit=2
&Offset=0
&<公共请求参数>
输出示例
{
"Response": {
"GroupList": [
{
"CanSetDefault": true,
"Conditions": [
{
"AlarmNotifyPeriod": 86400,
"AlarmNotifyType": 0,
"CalcType": 1,
"CalcValue": "0",
"ContinueTime": 60,
"MetricId": 33,
"MetricShowName": "CPU利用率",
"Period": 60,
"RuleId": 1111111,
"Unit": "%"
}
],
"ConditionsTemp": null,
"EventConditions": [
{
"AlarmNotifyPeriod": 0,
"AlarmNotifyType": 0,
"EventId": 42,
"EventShowName": "ping不可达",
"RuleId": 1111112
}
],
"GroupId": 1111111,
"GroupName": "复制-test",
"InsertTime": 1531122504,
"InstanceGroup": null,
"IsDefault": 0,
"IsOpen": true,
"LastEditUin": "1500000000",
"NoShieldedSum": 0,
"ParentGroupId": 0,
"ProjectId": 0,
"ReceiverInfos": [
{
"EndTime": 86400,
"NeedSendNotice": 1,
"NotifyWay": [
"EMAIL",
"SMS"
],
"PersonInterval": 60,
"ReceiverGroupList": [
1111
],
"ReceiverType": "group",
"ReceiverUserList": [],
"RecoverNotify": [
"SMS"
],
"RoundInterval": 60,
"RoundNumber": 2,
"SendFor": [],
"StartTime": 0,
"UidList": null
}
],
"Remark": "",
"UpdateTime": 1577689096,
"UseSum": 0,
"ViewName": "cvm_device"
},
{
"CanSetDefault": false,
"Conditions": [
{
"AlarmNotifyPeriod": 0,
"AlarmNotifyType": 0,
"CalcType": 1,
"CalcValue": "0.85",
"ContinueTime": 300,
"MetricId": 1220,
"MetricShowName": "磁盘使用百分比",
"Period": 60,
"RuleId": 1111113,
"Unit": ""
}
],
"ConditionsTemp": null,
"EventConditions": null,
"GroupId": 1111112,
"GroupName": "默认",
"InsertTime": 1565792922,
"InstanceGroup": null,
"IsDefault": 1,
"IsOpen": true,
"LastEditUin": "1500000687",
"NoShieldedSum": 1,
"ParentGroupId": 0,
"ProjectId": 0,
"ReceiverInfos": null,
"Remark": "",
"UpdateTime": 1565792922,
"UseSum": 1,
"ViewName": "CKAFKA_INSTANCE"
}
],
"RequestId": "5fdf1257-6024-4b59-b924-2b995080f0bd",
"Total": 142
}
}