All Products
Search
Document Center

EventBridge:TestEventPattern

Last Updated:Mar 15, 2024

Checks whether the event pattern matches the provided JSON format.

Operation description

You can call this API operation to check whether the event pattern matches the provided JSON format.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
EventstringYes

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:****" }
EventPatternstringYes

The event pattern.

{"key1": "value1"}

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

96D7C0AB-DCE5-5E82-96B8-4725E1706BB1
Messagestring

The error message returned if the request failed.

Codestring

The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes.

Success
Successboolean

Indicates whether the request is successful. Valid values: true and false.

true
Dataobject

The returned result.

Resultboolean

The value true indicates that the event pattern matches the provided JSON format. The value false indicates that the event pattern does not match the provided JSON format.

true

Examples

Sample success responses

JSONformat

{
  "RequestId": "96D7C0AB-DCE5-5E82-96B8-4725E1706BB1",
  "Message": "",
  "Code": "Success",
  "Success": true,
  "Data": {
    "Result": true
  }
}

Error codes

For a list of error codes, visit the Service error codes.