Updates an event source.
Operation description
You can call this API operation to update an event source.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
eventbridge:UpdateEventSource | update | *EventSource acs:eventbridge:{#regionId}:{#accountId}:eventbus/{#EventBusName}/eventsource/{#EventSourceName} |
| 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. | |
LinkedExternalSource | boolean | No | Specifies whether to connect to an external data source. | |
ExternalSourceType | string | No | The type of the external data source. | |
ExternalSourceConfig | object | No | The configurations of the external data source. | |
EventBusName | string | Yes | The event bus with which the event source is associated. | my-event-bus |
SourceMNSParameters | object | No | The parameters that are configured if the event source is Message Service (MNS). | |
RegionId | string | No | The region where the MNS queue resides. | cn-beijing |
QueueName | string | No | The name of the MNS queue. | queue_api_bind_1672194645178 |
IsBase64Decode | string | No | Indicates whether Base64 decoding is enabled. By default, Base64 decoding is enabled. | true |
SourceRocketMQParameters | object | No | The parameters that are configured if the event source is Message Queue for Apache RocketMQ. | |
RegionId | string | No | The region where the Message Queue for Apache RocketMQ instance resides. | cn-zhangjiakou |
InstanceId | string | No | The ID of the Message Queue for Apache RocketMQ instance. For more information, see Limits . | dbaudit-cn-i7m2nx2or01 |
Topic | string | No | The name of the topic on 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 message consumption starts. Valid values:
Default value: CONSUME_FROM_LAST_OFFSET. | CONSUMEFROMLASTOFFSET |
Timestamp | float | No | The timestamp that specifies the time from which messages are consumed. This parameter is valid only if you set Offset to CONSUME_FROM_TIMESTAMP. | 1663555399032 |
GroupID | string | No | The ID of the consumer group on the Message Queue for Apache RocketMQ instance. | GID-test |
InstanceType | string | No | The type of the Message Queue for Apache RocketMQ instance. Valid values:
| Cloud_4 |
InstanceNetwork | string | No | None. | None |
InstanceVpcId | string | No | The ID of the virtual private cloud (VPC) in which the Message Queue for Apache RocketMQ instance resides. | vpc-bp1a4gmlk31hyg6ptl3ss |
InstanceVSwitchIds | string | No | The ID of the vSwitch with which the Message Queue for Apache RocketMQ instance is associated. | vsw-bp10rbrt6rb6vrd89**** |
InstanceSecurityGroupId | string | No | The ID of the security group to which the Message Queue for Apache RocketMQ instance belongs. | sg-catalog-eventlistener |
AuthType | string | No | The authentication type. You can set this parameter to ACL or leave this parameter empty. | ACL |
InstanceEndpoint | string | No | The endpoint that is used to access the Message Queue for Apache RocketMQ instance. | registry-vpc****.aliyuncs.com |
InstanceUsername | string | No | The username that is used to access the Message Queue for Apache RocketMQ instance. | root |
InstancePassword | string | No | The password that is used to access the Message Queue for Apache RocketMQ instance. | ****** |
SourceRabbitMQParameters | object | No | The parameters that are configured if the event source is Message Queue for RabbitMQ. | |
RegionId | string | No | The ID of the region where the Message Queue for RabbitMQ instance resides. | cn-hangzhou |
InstanceId | string | No | The ID of the Message Queue for RabbitMQ instance. For more information, see Limits . | bastionhost-cn-7mz2zkyff09 |
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 on the Message Queue for RabbitMQ instance. For more information, see Limits . | eb-connect |
SourceSLSParameters | object | No | SourceSLSParameters | |
Project | string | No | The Log Service project. | VideoTestProject |
LogStore | string | No | The Log Service Logstore. | waf-logstore |
ConsumePosition | string | No | The starting consumer offset. The value begin indicates the earliest offset, and the value end indicates the latest offset. You can also specify a time in seconds to start consumption. | end |
RoleName | string | No | The role name. If you want to authorize EventBridge to use this role to read logs in Log Service, you must select Alibaba Cloud Service for Selected Trusted Entity and EventBridge for Select Trusted Service when you create the role in the RAM console. For information about the permission policy of this role, see Create a custom event source of the Log Service type. | testRole |
SourceScheduledEventParameters | object | No | The parameters that are configured if you specify scheduled events as the event source. | |
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 | The user data that is displayed in a JSON string. | {"a": "b"} |
SourceHttpEventParameters | object | No | The parameters that are configured if the event source is HTTP events. | |
Type | string | No | The protocol type that is supported by the generated webhook URL. Valid values:
| HTTPS |
Method | array | No | The HTTP request method supported by the generated webhook URL. You can select multiple values. Valid values:
| |
string | No | The HTTP request method supported by the generated webhook URL. You can select multiple values. Valid values:
| GET | |
SecurityConfig | string | No | The type of security settings. Valid values:
| none |
Ip | array | No | The CIDR block that is used for security settings. This parameter is required only if SecurityConfig is set to ip. You can enter a CIDR block or an IP address. | |
string | No | The CIDR block that is used for security settings. This parameter is required only if SecurityConfig is set to ip. You can enter a CIDR block or an IP address. | 47.252.126.0/24 | |
Referer | array | No | The security domain name. This parameter is required only if SecurityConfig is set to referer. You can enter a domain name. | |
string | No | The security domain name. This parameter is required only if SecurityConfig is set to referer. You can enter a domain name. | aliyundoc.com | |
SourceKafkaParameters | object | No | The parameters that are configured if the event source is Message Queue for Apache Kafka. | |
InstanceId | string | No | The ID of the Message Queue for Apache Kafka instance. | cbwp-bp1o3m66wcjgbkssm3k5m |
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 on the Message Queue for Apache Kafka instance. | billing_notify |
OffsetReset | string | No | The consumer offset. | latest |
RegionId | string | No | The ID of the region where the Message Queue for Apache Kafka instance resides. | cn-shanghai |
MaximumTasks | integer | No | The maximum number of consumers. | 1 |
Network | string | No | The network. Valid values: Default and PublicNetwork. Default value: Default. The value PublicNetwork indicates a self-managed network. | Default |
SecurityGroupId | string | No | The ID of the security group to which the Message Queue for Apache Kafka instance belongs. This parameter is required only if you set Network to PublicNetwork. | sg-5wz3mjgo9wpvdnwpwnhkjdjwn |
VpcId | string | No | The ID of the VPC in which the Message Queue for Apache Kafka instance resides. This parameter is required only if you set Network to PublicNetwork. | vpc-2zefu4vfmx6siogujmo0b |
VSwitchIds | string | No | The ID of the vSwitch with which the Message Queue for Apache Kafka instance is associated. This parameter is required only if you set Network to PublicNetwork. | vsw-bp1xyntcxiwplhqxjybuk |
Response parameters
Examples
Sample success responses
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 |
---|---|---|
403 | ServiceNotEnable | Service not enable |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-10-19 | The Error code has changed | View Change Details |
2023-08-01 | The Error code has changed | View Change Details |
2023-04-21 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-04-06 | The Error code has changed | View Change Details |