Updates the configuration of an event source.
Operation description
Updates the configuration of an event source.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:UpdateEventSource |
update |
*EventSource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| EventSourceName |
string |
Yes |
The name of the event source. |
myrabbitmq.source |
| Description |
string |
No |
The description of the event source. |
Event source of the RabbitMQ type |
| LinkedExternalSource |
boolean |
No |
Specifies whether to connect to an external data source. |
true |
| ExternalSourceType |
string |
No |
The type of the external data source. |
SLS |
| ExternalSourceConfig |
object |
No |
The configuration of the external data source. |
{\"ConsumePosition\":\"end\",\"LogStore\":\"oss_log\",\"Project\":\"slsaudit-center-5795350335281001-cn-beijing\",\"RoleName\":\"sls-beijing-tf\"} |
| EventBusName |
string |
Yes |
The event bus that is bound to the event source. |
my-event-bus |
| SourceMNSParameters |
object |
No |
The parameters for the Message Service (MNS) event source. |
|
| RegionId |
string |
No |
The region where the MNS queue is located. |
cn-beijing |
| QueueName |
string |
No |
The name of the MNS queue. |
queue_api_bind_1672194645178 |
| IsBase64Decode |
boolean |
No |
Specifies whether to enable Base64 decoding. This feature is enabled by default. |
true |
| SourceRocketMQParameters |
object |
No |
The parameters for the Message Queue for Apache RocketMQ event source. |
|
| RegionId |
string |
No |
The region where the Message Queue for Apache RocketMQ instance is located. |
cn-zhangjiakou |
| InstanceId |
string |
No |
The ID of the Message Queue for Apache RocketMQ instance. For more information, see Limits. |
dbaudit-cn-i7m2nx**** |
| Topic |
string |
No |
The topic of the Message Queue for Apache RocketMQ instance. For more information, see Limits. |
topic_default_195820716552192 |
| Tag |
string |
No |
The tag that is used to filter messages. |
KEY2 |
| Offset |
string |
No |
The offset from which to start consuming messages. Valid values:
Default value: |
CONSUMEFROMLASTOFFSET |
| Timestamp |
integer |
No |
The timestamp from which to start consuming messages. This parameter is required only when the |
1663555399032 |
| GroupID |
string |
No |
The group ID of the consumer. |
GID-test |
| InstanceType |
string |
No |
The type of the instance. Valid values:
|
Cloud_4 |
| InstanceNetwork |
string |
No |
This parameter is not supported. |
None |
| InstanceVpcId |
string |
No |
The ID of the Virtual Private Cloud (VPC) where the instance is deployed. This parameter is required for instances in a VPC. |
vpc-bp1a4gmlk31hyg6pt**** |
| InstanceVSwitchIds |
string |
No |
The vSwitch ID of the instance. This parameter is required for instances in a VPC. |
vsw-bp10rbrt6rb6vrd89**** |
| InstanceSecurityGroupId |
string |
No |
The security group ID of the instance. This parameter is required for instances in a VPC. |
sg-catalog-eventlistener |
| AuthType |
string |
No |
The authentication type. Set this parameter to |
ACL |
| InstanceEndpoint |
string |
No |
The endpoint of the instance. |
registry-vpc****.aliyuncs.com |
| InstanceUsername |
string |
No |
The username that is used to access the instance. |
root |
| InstancePassword |
string |
No |
The password that is used to access the instance. |
****** |
| SourceRabbitMQParameters |
object |
No |
The parameters for the Message Queue for RabbitMQ event source. |
|
| RegionId |
string |
No |
The region where the Message Queue for RabbitMQ instance is located. |
cn-hangzhou |
| InstanceId |
string |
No |
The ID of the Message Queue for RabbitMQ instance. For more information, see Limits. |
bastionhost-cn-7mz2zky**** |
| VirtualHostName |
string |
No |
The name of the vhost of the Message Queue for RabbitMQ instance. For more information, see Limits. |
amqp-cn-nif22u74**** |
| QueueName |
string |
No |
The name of the queue in the Message Queue for RabbitMQ instance. For more information, see Limits. |
eb-connect |
| SourceSLSParameters |
object |
No |
The parameters for the Log Service (SLS) event source. |
|
| Project |
string |
No |
The Log Service project. |
VideoTestProject |
| LogStore |
string |
No |
The Log Service Logstore. |
waf-logstore |
| ConsumePosition |
string |
No |
The starting offset. You can set this parameter to |
end |
| RoleName |
string |
No |
The RAM role that is used by EventBridge to read logs from Log Service. When you create this role in the RAM console, select Alibaba Cloud Service for the Select Trusted Entity parameter and EventBridge for the Select Trusted Service parameter. For more information about the required permission policy, see the documentation about custom SLS event sources. |
testRole |
| SourceScheduledEventParameters |
object |
No |
The parameters for the scheduled event. |
|
| Schedule |
string |
No |
The cron expression. |
10 * * * * * |
| TimeZone |
string |
No |
The time zone in which the cron expression is executed. |
GMT+0:00 |
| UserData |
string |
No |
A JSON string. |
{"a": "b"} |
| SourceHttpEventParameters |
object |
No |
The parameters for the HTTP event source. |
|
| Type |
string |
No |
The protocol type that is supported by the webhook. Valid values:
|
HTTPS |
| Method |
array |
No |
The HTTP request methods supported by the webhook. You can select one or more methods. Valid values:
|
|
|
string |
No |
The HTTP request methods supported by the webhook. You can select one or more methods. Valid values:
|
GET |
|
| SecurityConfig |
string |
No |
The security configuration type. Valid values:
|
none |
| Ip |
array |
No |
The IP address whitelist. This parameter is required only when |
|
|
string |
No |
An IP address or CIDR block. |
47.252.126.0/24 |
|
| Referer |
array |
No |
The Referer whitelist. This parameter is required only when |
|
|
string |
No |
A domain name in the Referer whitelist. |
aliyundoc.com |
|
| SourceKafkaParameters |
object |
No |
The parameters for the Message Queue for Apache Kafka event source. |
|
| InstanceId |
string |
No |
The ID of the instance. |
cbwp-bp1o3m66wcjgbkssm3**** |
| ConsumerGroup |
string |
No |
The ID of the consumer group that subscribes to the topic. |
dsp_online_ml_request |
| Topic |
string |
No |
The name of the topic. |
billing_notify |
| OffsetReset |
string |
No |
The consumer offset. |
latest |
| RegionId |
string |
No |
The ID of the region. |
cn-shanghai |
| MaximumTasks |
integer |
No |
The maximum number of concurrent consumers. |
1 |
| Network |
string |
No |
The network type. Valid values: |
Default |
| SecurityGroupId |
string |
No |
The security group ID. This parameter is required if |
sg-5wz3mjgo9wpvdnwpwnhkj**** |
| VpcId |
string |
No |
The VPC ID. This parameter is required if |
vpc-2zefu4vfmx6sioguj**** |
| VSwitchIds |
string |
No |
The vSwitch ID. This parameter is required if |
vsw-bp1xyntcxiwplhqxj**** |
| SourceOSSEventParameters |
object |
No |
The parameters for the Object Storage Service (OSS) event source. |
|
| EventTypes |
array |
No |
The list of event types. |
|
|
string |
No |
The event type. |
||
| StsRoleArn |
string |
No |
The Alibaba Cloud Resource Name (ARN) of the RAM role. |
|
| MatchRules |
array<object> |
No |
The matching rules. |
|
|
array<object> |
No |
|||
|
object |
No |
|||
| Suffix |
string |
No |
The suffix of the object name. |
|
| MatchState |
boolean |
No |
The matching state. |
|
| Prefix |
string |
No |
The prefix of the object name. |
|
| Name |
string |
No |
The name of the rule. |
Example request:
POST /openapi/updateEventSource HTTP/1.1
Host: 164901546557****.eventbridge.cn-hangzhou.aliyuncs.com
Date: Sat, 18 Apr 2020 05:30:41 GMT
x-eventbridge-version: 2020-04-01
Authorization: acs vZ3VL0SuJdHi****:Jo2PbT******azYAYoYslKLvWzg=
Content-Type: application/json;charset=UTF-8
Content-Length: 26
{
"EventSourceName":"myRocketMQ.source",
"Description":"RocketMQ event source",
"SourceRocketMQParameters":{
"InstanceId":"MQ_INST_164901546557_BAAN",
"GroupID":"GID_group1",
"Topic":"mytopic",
"Offset":"CONSUME_FROM_LAST_OFFSET",
"Tag":"test",
"RegionId":"cn-hangzhou"
},
"EventBusName":"my-event-bus"
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned in the response. |
||
| Message |
string |
The error message. |
Remote error. requestId: [xxxx-9D10-65DFDFA3A75D], error code: [EventSourceNotExist], message: [The event source in request is not exist! ] |
| RequestId |
string |
The ID of the request. |
c057d379-ea65-41ec-a8a8-90627a9**** |
| Data |
boolean |
The result of the update. |
true |
| Code |
string |
The response code. The value Success indicates that the call is successful. For more information about other values, see Error codes.
|
Success |
| Success |
boolean |
Indicates whether the operation was successful. A value of true indicates that the operation was successful. |
true |
Examples
Success response
JSON format
{
"Message": "Remote error. requestId: [xxxx-9D10-65DFDFA3A75D], error code: [EventSourceNotExist], message: [The event source in request is not exist! ]",
"RequestId": "c057d379-ea65-41ec-a8a8-90627a9****",
"Data": true,
"Code": "Success",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | ServiceNotEnable | Service not enable |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.