最近更新时间:2024.03.12 16:52:17
首次发布时间:2022.10.26 11:08:02
调用ListEventRules接口查询事件规则的信息。
该接口调用服务方较多,不建议高频调用,否则将触发限流。建议QPS值不大于20。
POST https://open.volcengineapi.com?Action=ListEventRules&Version=2018-01-01
ServiceName : Volc_Observe Region : cn-beijing AccessKey : xxx SecretKey : xxx
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
RuleName | String | 否 |
| 规则名称,按照名称模糊搜索规则。 |
Source | String | 否 |
| 事件源。 |
Status | String | 否 |
| 规则状态。
|
PageSize | Integer | 否 |
| 分页查询参数,用于设置每页行数。默认值:30。 |
PageNumber | Integer | 否 |
| 分页查询参数,用于设置当前页码。默认值:1。 |
OrderBy | String | 否 |
| 规则排列依据。
|
Asc | Boolean | 否 |
| 规则排序方式。
|
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
Data | Array | - | 符合条件的规则的详细信息。具体格式,请参见Data数据结构。 |
PageSize | Integer |
| 当前分页的行数。 |
PageNumber | Integer |
| 当前页码。 |
OrderBy | String |
| 返回规则的排序依据。 |
Asc | Boolean |
| 返回规则的排序方式。 |
TotalCount | Integer |
| 符合条件的事件规则总数。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
RuleId | String |
| 事件规则ID。 |
Source | String |
| 事件源。 |
RuleName | String |
| 规则名称。 |
Description | String |
| 规则描述。 |
EventBusName | String |
| 事件总线名称,目前仅支持填写default。 |
AccountId | String |
| 主账号ID。 |
Region | String |
| 地域。 |
Level | String |
| 告警规则的严重程度。 |
EnableState | String |
| 规则状态。
|
EffectStartAt | String |
| 规则启用的开始时间。 |
EffectEndAt | String |
| 规则启用的结束时间。 |
EventType | Array |
| 事件类型。 |
FilterPattern | Object | - | 过滤模式,也叫事件匹配规则。具体格式,请参见FilterPattern数据结构。 |
ContactMethods | Array |
| 告警通知方式。
|
Endpoint | String |
| 告警通知方式为告警回调时,触发的回调地址。 |
TLSTarget | Array |
| 告警方式为日志服务时,触发的日志服务的配置。 |
ContactGroupIds | Array |
| 告警通知方式为电话、短信、邮件时,触发的告警联系组ID。 |
MessageQueue | Array |
| 告警通知方式为消息队列kafka时,触发的消息队列。 |
UpdatedAt | Interger |
| 事件规则更新时间。 |
CreatedAt | Interger |
| 事件规则创建时间。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
Type | Array |
| 模式匹配中对应的事件类型列表,当前为任意匹配。 |
Source | String |
| 模式匹配中对应的事件源。 |
POST https://open.volcengineapi.com/?Action=ListEventRules&Version=2018-01-01 ServiceName=Volc_Observe Region=cn-beijing AccessKey=xxx SecretKey=xxx { "RuleName": "rule-01", "OrderBy": "UpdatedAt", "Asc": true, "PageSize": 10, "PageNumber": 1 }
{ "ResponseMetadata": { "RequestId": "2b02*****f3b3", "Action": "ListEventRules", "Version": "2018-01-01" "Region": "cn-chengdu-sdv" }, "Result": { "Data": [ { "RuleId": "168*****4352", "Source": "vke", "RuleName": "test-kafka", "Description":"This is test rule 01", "EventBusName": "default", "AccountId": "210****168", "Region": "cn-chengdu-sdv", "Level": "critical", "EnableState": "enable", "EffectStartAt": "00:00", "EffectEndAt": "23:59", "EventType": [ "vke:Addon:AddonStatus.Failed" ], "FilterPattern": { "Source": "vke", "Type": [ "vke:Addon:AddonStatus.Failed" ] }, "ContactMethods": [ "MQ", "Webhook", "Email", "SMS" ], "ContactGroupIds": [ "166*****7680" ], "Endpoint":"http://example.com/alert", "MessageQueue": [ { "Type": "kafka", "Region": "cn-guilin-boe", "InstanceId": "kafka-cno*****5hc", "Topic": "testkafka", "VpcId": "vpc-2bzq*****pm22" } ], "UpdatedAt": 1691474146, "CreatedAt": 1691474146 } ], "PageNumber": 1, "PageSize": 10, "TotalCount": 1, "OrderBy": "UpdatedAt", "Asc": true } }