Tests if an event pattern matches a given event.
Operation description
Use this action to test an event pattern before you apply it to a rule.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Event |
string |
Yes |
The event to test, which must be a JSON string. |
{ "datacontenttype": "application/json;charset=utf-8", "aliyunaccountid": "*****", "aliyunpublishtime": "2023-04-****:54:57.939Z", "data": { "resourceEventType": "****", "resourceCreateTime": "****", "resourceId": "sls-code-***-debug", "captureTime": "***" }, "aliyunoriginalaccountid": "****", "specversion": "1.0", "aliyuneventbusname": "****", "id": "295e6bd2-bb72-4f70-****-204a0680ee41", "source": "acs.sls", "time": "2023-04-***:37:56Z", "aliyunregionid": "cn-***", "type": "sls:Config:****" } |
| EventPattern |
string |
Yes |
The event pattern to test, which must be a JSON string. |
{"key1": "value1"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The request ID. |
96D7C0AB-DCE5-5E82-96B8-4725E1706BB1 |
| Message |
string |
The error message. |
|
| Code |
string |
The return code. |
Success |
| Success |
boolean |
Indicates if the request was successful. |
true |
| Data |
object |
The result of the test. |
|
| Result |
boolean |
Indicates if the event matches the event pattern. |
true |
Examples
Success response
JSON format
{
"RequestId": "96D7C0AB-DCE5-5E82-96B8-4725E1706BB1",
"Message": "",
"Code": "Success",
"Success": true,
"Data": {
"Result": true
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.