TestEventPattern
Tests whether the event pattern matches the provided JSON-formatted event.
Operation description
Tests whether the event pattern matches the provided JSON-formatted event.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Event |
string |
Yes |
The event. |
{ "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. |
{"key1": "value1"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
96D7C0AB-DCE5-5E82-96B8-4725E1706BB1 |
| Message |
string |
The error message. |
Operation success |
| Code |
string |
The return code of the API operation. A value of Success indicates that the request is successful. Other values indicate error codes. For more information, see Error codes. |
Success |
| Success |
boolean |
Indicates whether the operation is successful. |
true |
| Data |
object |
The returned result. |
|
| Result |
boolean |
Indicates whether the event pattern matches the provided JSON-formatted event. A value of true indicates that the event pattern matches the event. A value of false indicates that the event pattern does not match the event. |
true |
Examples
Success response
JSON format
{
"RequestId": "96D7C0AB-DCE5-5E82-96B8-4725E1706BB1",
"Message": "Operation success",
"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.