blob: 13dd41be27397eaccd12132b71ca41a920f60ea3 [file] [log] [blame] [view]
2011shenlinf9fb2e92023-06-10 15:39:06 +08001## Use HttpSource to put events
2
3EventBridge HttpSource allows you to put events to eventbus in the form of webhook.
4
5Here is an example explaining how to put events using EventBridge HttpSource.
6
71. Create an EventBridge HttpSource
8
9 - eventSourceName: Name of EventSource
10 - eventBusName: Name of EventBus
11 - description: Description
12 - className: HttpEvent. This parameter is a fixed value and cannot be modified.
13 - config: HttpSource Config
14 - Type: Request type. Available values are 'HTTP', 'HTTPS' and 'HTTP&HTTPS'.
15 - Method: Allowed HTTP request methods. The request will be filtered if the http request method type for accessing
16 the webhook does not meet the configuration.
17 - SecurityConfig: Security configuration type. Available values are 'none', 'ip' and 'referer'.
18 - Ip: IP security configuration. Http requests whose source ip is not in the configured network segment will be
19 filtered if the security configuration is selected as 'ip'.
20 - Referer: Referer security configuration. HTTP requests whose referer is not in this configuration will be filtered
21 if the security configuration is selected as 'referer'.
22
23A webhook will be generated after the creation of HttpSource.
24
25```text
26POST /source/createEventSource HTTP/1.1
27Host: demo.eventbridge.com
28Content-Type: application/json; charset=utf-8
29{
30 "eventSourceName": "httpEventSourceDemo",
31 "eventBusName": "demo",
32 "description": "http source demo",
33 "className": "HttpEvent",
34 "config": {
35 "Type": "HTTP&HTTPS",
36 "Method": ["GET", "POST"],
37 "SecurityConfig": "ip",
38 "Ip": ["10.0.0.0/8"],
39 "Referer":[]
40 }
41}
42```