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 external data source configuration. |
{\"ConsumePosition\":\"end\",\"LogStore\":\"oss_log\",\"Project\":\"slsaudit-center-5795350335281001-cn-beijing\",\"RoleName\":\"sls-beijing-tf\"} |
| EventBusName |
string |
Yes |
The name of the associated event bus. |
my-event-bus |
| SourceMNSParameters |
object |
No |
The parameters for a Simple Message Queue (formerly MNS) event source. |
|
| RegionId |
string |
No |
The region where the Simple Message Queue (formerly MNS) queue resides. |
cn-beijing |
| QueueName |
string |
No |
The name of the Simple Message Queue (formerly MNS) queue. |
queue_api_bind_1672194645178 |
| IsBase64Decode |
boolean |
No |
Specifies whether to enable Base64 decoding. Default value: true. |
true |
| SourceRocketMQParameters |
object |
No |
The SourceRocketMQParameters request parameter. |
|
| RegionId |
string |
No |
The region where the ApsaraMQ for RocketMQ instance resides. |
cn-zhangjiakou |
| InstanceId |
string |
No |
The instance ID of the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
dbaudit-cn-i7m2nx**** |
| Topic |
string |
No |
The topic name of the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
topic_default_195820716552192 |
| Tag |
string |
No |
The filter tag of the message. |
KEY2 |
| Offset |
string |
No |
The consumption offset of the message. Valid values:
|
CONSUMEFROMLASTOFFSET |
| Timestamp |
integer |
No |
The timestamp. This parameter takes effect only when the Offset parameter is set to CONSUME_FROM_TIMESTAMP. |
1663555399032 |
| GroupID |
string |
No |
The group ID of the ApsaraMQ for RocketMQ instance. |
GID-test |
| InstanceType |
string |
No |
The instance type. Valid values:
|
Cloud_4 |
| InstanceNetwork |
string |
No |
The network type. |
PublicNetwork |
| InstanceVpcId |
string |
No |
The ID of the VPC. This parameter is required for VPCs. |
vpc-bp1a4gmlk31hyg6pt**** |
| InstanceVSwitchIds |
string |
No |
The ID of the vSwitch. This parameter is required for VPCs. |
vsw-bp10rbrt6rb6vrd89**** |
| InstanceSecurityGroupId |
string |
No |
The ID of the security group. This parameter is required for VPCs. |
sg-catalog-eventlistener |
| AuthType |
string |
No |
The authentication type. Set the value to ACL or leave it empty. |
ACL |
| InstanceEndpoint |
string |
No |
The endpoint of the instance. |
registry-vpc****.aliyuncs.com |
| InstanceUsername |
string |
No |
The username of the instance. |
root |
| InstancePassword |
string |
No |
The password of the instance. |
yourPassword |
| SourceRabbitMQParameters |
object |
No |
The SourceRabbitMQParameters request parameter. |
|
| RegionId |
string |
No |
The region where the ApsaraMQ for RabbitMQ instance resides. |
cn-hangzhou |
| InstanceId |
string |
No |
The instance ID of the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
bastionhost-cn-7mz2zky**** |
| VirtualHostName |
string |
No |
The vhost name of the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
amqp-cn-nif22u74**** |
| QueueName |
string |
No |
eb-connect: The name of the queue in the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
eb-connect |
| SourceSLSParameters |
object |
No |
The parameters for a Simple Log Service event source. |
|
| Project |
string |
No |
The Simple Log Service project. |
VideoTestProject |
| LogStore |
string |
No |
The Simple Log Service Logstore. |
waf-logstore |
| ConsumePosition |
string |
No |
The start consumption offset. You can set this parameter to begin to consume from the earliest offset, end to consume from the latest offset, or a specific timestamp in seconds to consume from a specified point in time. |
end |
| RoleName |
string |
No |
When authorizing EventBridge to use this role to read Simple Log Service log content, the following conditions must be met: when creating the role in the Resource Access Management (RAM) console, you must select Alibaba Cloud Service, and select EventBridge as the trusted service. For the permission policy of this role, refer to the custom event source Simple Log Service. |
testRole |
| SourceScheduledEventParameters |
object |
No |
The SourceScheduledEventParameters request parameter. |
|
| Schedule |
string |
No |
The cron expression. |
10 * * * * * |
| TimeZone |
string |
No |
The time zone for the cron expression. |
GMT+0:00 |
| UserData |
string |
No |
The JSON string. |
{"a": "b"} |
| SourceHttpEventParameters |
object |
No |
The SourceHttpEventParameters request parameter. |
|
| Type |
string |
No |
The protocol type supported by the generated webhook. Valid values:
|
HTTPS |
| Method |
array |
No |
The HTTP request methods supported by the generated webhook. You can select multiple values. Valid values:
|
|
|
string |
No |
The HTTP request methods supported by the generated webhook. You can select multiple values. Valid values:
|
GET |
|
| SecurityConfig |
string |
No |
The type of the security configuration. Valid values:
|
none |
| Ip |
array |
No |
The CIDR block for security configuration. This parameter is required only when the SecurityConfig parameter is set to ip. You can enter a CIDR block or an IP address. |
|
|
string |
No |
The CIDR block for security configuration. This parameter is required only when the SecurityConfig parameter is set to ip. You can enter a CIDR block or an IP address. |
47.252.126.0/24 |
|
| Referer |
array |
No |
The secure domain name for security configuration. This parameter is required only when the SecurityConfig parameter is set to referer. You can enter a domain name. |
|
|
string |
No |
The secure domain name for security configuration. This parameter is required only when the SecurityConfig parameter is set to referer. You can enter a domain name. |
aliyundoc.com |
|
| SourceKafkaParameters |
object |
No |
The SourceKafkaParameters request parameter. |
|
| InstanceId |
string |
No |
The instance ID. |
cbwp-bp1o3m66wcjgbkssm3**** |
| ConsumerGroup |
string |
No |
The group ID of the consumer that subscribes to the topic. |
dsp_online_ml_request |
| Topic |
string |
No |
The name of the topic. |
billing_notify |
| OffsetReset |
string |
No |
The consumption offset. |
latest |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| MaximumTasks |
integer |
No |
The concurrency quota, which is the number of consumers. |
1 |
| Network |
string |
No |
The network configuration. Valid values: Default and PublicNetwork. |
Default |
| SecurityGroupId |
string |
No |
The ID of the security group. This parameter is required for self-managed networks. |
sg-5wz3mjgo9wpvdnwpwnhkj**** |
| VpcId |
string |
No |
The ID of the VPC. This parameter is required for self-managed networks. |
vpc-2zefu4vfmx6sioguj**** |
| VSwitchIds |
string |
No |
The ID of the vSwitch. This parameter is required for self-managed networks. |
vsw-bp1xyntcxiwplhqxj**** |
| SourceOSSEventParameters |
object |
No |
The parameters for an OSS event source. |
|
| EventTypes |
array |
No |
The list of event types. |
|
|
string |
No |
The event type. |
ObjectCreated:PutObject |
|
| StsRoleArn |
string |
No |
The ARN of the STS role. |
acs:eventbridge:cn-hangzhou:** |
| MatchRules |
array<object> |
No |
The matching rules. |
|
|
array<object> |
No |
A set of matching rules. |
||
|
object |
No |
|||
| Suffix |
string |
No |
The suffix. |
/document |
| MatchState |
boolean |
No |
The match state. |
|
| Prefix |
string |
No |
The prefix. |
fun/document/ |
| Name |
string |
No |
The name. |
bucketName |
Sample 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 response body parameters. |
||
| 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 unique identifier generated by Alibaba Cloud for the request. |
c057d379-ea65-41ec-a8a8-90627a9**** |
| Data |
boolean |
The update result. |
true |
| Code |
string |
The API response code:
|
Success |
| Success |
boolean |
Indicates whether the operation is 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-90627a968204",
"Data": true,
"Code": "200",
"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.