Registers an event source.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:RegisterEventSource |
none |
*All Resource
|
None | None |
Request syntax
POST /2021-04-06/services/{serviceName}/functions/{functionName}/event-sources HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| serviceName |
string |
Yes |
The service name. |
demo-service |
| functionName |
string |
Yes |
The function name. |
demo-function |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| qualifier |
string |
No |
The version or alias of the service. |
LATEST |
| body |
object |
No |
The request parameters. |
|
| sourceArn |
string |
Yes |
The Alibaba Cloud Resource Name (ARN) of the event source. |
acs:eventbridge:cn-shanghai:123456:eventbus/mns-test/rule/fc-test1/target/abc |
| X-Fc-Account-Id |
string |
No |
The ID of your Alibaba Cloud account. |
188077086902**** |
| X-Fc-Date |
string |
No |
The time when the function is invoked. The value is in the EEE,d MMM yyyy HH:mm:ss GMT format. |
Sat, 14 Jul 2017 07:02:38 GMT |
| X-Fc-Trace-Id |
string |
No |
The trace ID of the request for Function Compute API. |
asdf**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| sourceArn |
string |
The Alibaba Cloud Resource Name (ARN) of the event source. |
acs:eventbridge:cn-shanghai:123456:eventbus/mns-test/rule/fc-test1/target/abc |
| createdTime |
string |
The time when the event source was created. |
2016-08-15T16:06:05.000+0000 |
Examples
Success response
JSON format
{
"sourceArn": "acs:eventbridge:cn-shanghai:123456:eventbus/mns-test/rule/fc-test1/target/abc",
"createdTime": "2016-08-15T16:06:05.000+0000"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.