You need to enable JavaScript to run this app.
Cloud Monitor

Cloud Monitor

Copy page
Download PDF
Event rule
UpdateEventRule
Copy page
Download PDF
UpdateEventRule
Update an event rule.​
Request descriptions​
  • Request method: POST​
  • Request URL: https://cloudmonitor.cn-beijing.volcengineapi.com?Action=UpdateEventRule&Version=2018-01-01​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request descriptions​
​
Parameters​
Type​
Required​
Sample value​
Description​
Action​
String​
Yes​
UpdateEventRule​
The name of the API. The API name is UpdateEventRule.​
Version​
String​
Yes​
2018-01-01​
The API version. The API version is 2018-01-01.​
RuleId​
String​
Yes​
15847********688768​
Event rule ID.​
RuleName​
String​
No​
rule-01​
Event rule name.​
  • The name must be 1 to 128 characters in length.​
  • It cannot start with a digit or hyphen (-).​
Descriptions​
String​
No​
This is test rule 01 after updating​
Event rule description.​
  • It cannot start with a digit, hyphen (-), or Chinese character.​
  • It can contain only Chinese characters, letters, digits, underscore (_), hyphen (-), and Chinese characters.​
  • It must be 0 to 255 characters in length.​
EventBusName​
String​
Yes​
default​
Event bus name. Only default is supported.​
EventSource​
String​
Yes​
ecs​
Event source.​
EventType​
Array of String​
Yes​
[ "ecs:Disk:DiskError.Redeploy.Executing", "ecs:Disk:DiskError.Redeploy.Inquiring", "ecs:Disk:DiskError.Redeploy.Succeeded" ]​
Event type.​
Status​
String​
No​
enable​
Rule status.​
  • enable: The rule is enabled.​
  • disable: The rule is disabled.​
Level​
String​
Yes​
notice​
Severity level of the alert.​
  • notice​
  • warning​
  • critical​
FilterPattern​
JSON Map​
No​
-​
Filter pattern, also known as event matching rules.​
Custom matching rules are not supported.​
EffectiveTime​
Object of EffectiveTime​
Yes​
-​
The period of time during which the rule is active.​
ContactMethods​
Array of String​
Yes​
[ "Webhook", "Email", "SMS" ]​
Alert notification method.​
  • Phone: Phone​
  • Email: Email​
  • SMS: SMS​
  • Webhook: Alert callback​
  • TLS: TLS​
  • MQ: Message Queue for Kafka​
ContactGroupIds​
Array of String​
No​
[ "157284********69152" ]​
A list of alert contact group IDs. When the ContactMethods parameter is Email, Phone, or SMS, this parameter cannot be empty.​
Endpoint​
String​
No​
http://example.com/alert​
Callback address to be triggered. This parameter is configurable when ContactMethods options include webhook.​
warning​
WebhookIds and Endpoint parameters are mutually exclusive. Only one can be configured per call.​
TLSTarget​
Array of TLSTarget​
No​
-​
TLS configuration when ContactMethods options include TLS.​
MessageQueue​
Array of MQTarget​
No​
-​
Message queue when ContactMethods options include MQ.​
WebhookIds​
Array of String​
No​
-​
A list of alert callback IDs.​
warning​
WebhookIds and Endpoint parameters are mutually exclusive. Only one can be configured per call.​
NotifyTemplates​
No​
-​
Notification template configuration.​
tip​
Events follow a subscription model. A single event can match multiple event rules, with each event rule configurable with different delivery channels. When contact duplicates exist across rules, event rules are sorted by severity level (descending) + update time (descending). The severity level and notification template of the highest-priority rule are used for event delivery.​
​
FilterPattern​
​
Parameters​
Types​
Required​
Sample value​
Description​
key​
String​
Yes​
Source​
Key for pattern matching.​
value​
Any​
Yes​
ecs​
Key value for pattern matching.​
​
EffectiveTime​
​
Parameters​
Type​
Required​
Sample value​
Description​
StartTime​
String​
No​
09:00​
The start of the time period during which the rule is active.​
EndTime​
String​
No​
20:59​
The end of the time period during which the rule is active.​
​
TLSTarget​
​
Parameters​
Type​
Required​
Sample value​
Description​
TopicId​
String​
No​
6a6****67c7​
Topic ID.​
ProjectId​
String​
No​
79fe****122f​
Project ID.​
ProjectName​
String​
No​
default​
The project name.​
RegionNameCN​
String​
No​
Beijing​
Chinese name of the region.​
RegionNameEN​
String​
No​
cn-beijing​
English name of the region.​
​
MQTarget​
​
Parameters​
Type​
Required​
Sample value​
Description​
Type​
String​
No​
kafka​
Alert notification method.​
Topic​
String​
No​
testkafka​
Topic of the message queue.​
VpcId​
String​
No​
vpc-2bzq*****pm22​
VPC ID.​
Region​
String​
No​
cn-beijing​
Region where the MQ instance is located.​
Password​
String​
No​
-​
Password of the MQ instance.​
Endpoints​
String​
No​
-​
Cluster address, which is only returned for rule_engine.​
InstanceId​
String​
No​
kafka-cno*****5hc​
MQ instance ID.​
AuthEncrypt​
Array of Integer​
No​
-​
Encrypted account password, which is only returned for rule_engine.​
​
NotifyTemplateBasic​
​
Parameters​
Type​
Required​
Sample value​
Description​
Channel​
String​
No​
email​
Notification channel. Valid values:​
  • email: Email​
  • sms: SMS​
  • phone: Phone​
  • lark: Feishu​
  • dingtalk: DingTalk​
  • wecom: WeCom​
  • slack:Slack​
  • api: Callback address​
NotifyTemplateId​
String​
No​
189828***00​
Notification template ID.​
warning​
Only one notification template ID can be specified for each notification channel.​
​
Sample request​
​
POST https://cloudmonitor.cn-beijing.volcengineapi.com?Action=UpdateEventRule&Version=2018-01-01​
Content-Type: application/json​
{​
"RuleId": "15847********688768",​
"RuleName": "rule-01",​
"Status": "enable",​
"ContactGroupIds": [​
"157284********69152"​
],​
"ContactMethods": [​
"Webhook",​
"Email",​
"SMS"​
],​
"Description": "This is test rule 01 after updating",​
"EffectiveTime": {​
"EndTime": "20:59",​
"StartTime": "09:00"​
},​
"Endpoint": "http://example.com/alert",​
"EventBusName": "default",​
"EventSource": "ecs",​
"EventType": [​
"ecs:Disk:DiskError.Redeploy.Executing",​
"ecs:Disk:DiskError.Redeploy.Inquiring",​
"ecs:Disk:DiskError.Redeploy.Succeeded"​
],​
"FilterPattern": {},​
"Level": "notice",​
"MessageQueue": [​
{​
"Type": "kafka",​
"Topic": "testkafka",​
"VpcId": "vpc-2bzq*****pm22",​
"Region": "cn-guilin-boe",​
"Password": "-",​
"Endpoints": "-",​
"InstanceId": "kafka-cno*****5hc",​
"AuthEncrypt": [​
null​
]​
}​
],​
"TLSTarget": [​
{​
"TopicId": "6a6****67c7",​
"ProjectId": "79fe****122f",​
"ProjectName": "default",​
"RegionNameCN": "北京",​
"RegionNameEN": "cn-beijing"​
}​
],​
"WebhookIds": [​
""​
],​
"NotifyTemplates": [​
{​
"Channel": "email",​
"NotifyTemplateId": "189828***00"​
}​
]​
}​
​
Response parameters​
​
Parameters​
Types​
Sample value​
Description​
Data​
Object of RuleIDVo​
-​
Event rule content.​
​
RuleIDVo​
​
Parameters​
Type​
Sample value​
Description​
RuleId​
String​
157284163494346****​
Event rule ID.​
​
Sample response​
​
{​
"ResponseMetadata": {​
"Action": "UpdateEventRule",​
"Region": "cn-beijing",​
"Service": "cloudmonitor",​
"Version": "2018-01-01",​
"RequestId": "20230604110420****100232280022D31"​
},​
"Result": {​
"Data": {​
"RuleId": "157284163494346****"​
}​
}​
}​
​
Error code​
There are no error codes specific to this API. For more information, see Error codes.​
Last updated: 2026.03.27 11:34:32