All Products
Search
Document Center

EventBridge:UpdateEventSource

Last Updated:Dec 04, 2024

Updates an event source.

Operation description

You can call this API operation to update an event source.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
eventbridge:UpdateEventSourceupdate
*EventSource
acs:eventbridge:{#regionId}:{#accountId}:eventbus/{#EventBusName}/eventsource/{#EventSourceName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EventSourceNamestringYes

The name of the event source.

myrabbitmq.source
DescriptionstringNo

The description of the event source.

LinkedExternalSourcebooleanNo

Specifies whether to connect to an external data source.

ExternalSourceTypestringNo

The type of the external data source.

ExternalSourceConfigobjectNo

The configurations of the external data source.

EventBusNamestringYes

The event bus with which the event source is associated.

my-event-bus
SourceMNSParametersobjectNo

The parameters that are configured if the event source is Message Service (MNS).

RegionIdstringNo

The region where the MNS queue resides.

cn-beijing
QueueNamestringNo

The name of the MNS queue.

queue_api_bind_1672194645178
IsBase64DecodestringNo

Indicates whether Base64 decoding is enabled. By default, Base64 decoding is enabled.

true
SourceRocketMQParametersobjectNo

The parameters that are configured if the event source is Message Queue for Apache RocketMQ.

RegionIdstringNo

The region where the Message Queue for Apache RocketMQ instance resides.

cn-zhangjiakou
InstanceIdstringNo

The ID of the Message Queue for Apache RocketMQ instance. For more information, see Limits .

dbaudit-cn-i7m2nx2or01
TopicstringNo

The name of the topic on the Message Queue for Apache RocketMQ instance. For more information, see Limits .

topic_default_195820716552192
TagstringNo

The tag that is used to filter messages.

KEY2
OffsetstringNo

The offset from which message consumption starts. Valid values:

  • CONSUME_FROM_LAST_OFFSET: Start message consumption from the latest offset.
  • CONSUME_FROM_FIRST_OFFSET: Start message consumption from the earliest offset.
  • CONSUME_FROM_TIMESTAMP: Start message consumption from the offset at the specified point in time.

Default value: CONSUME_FROM_LAST_OFFSET.

CONSUMEFROMLASTOFFSET
TimestampfloatNo

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
GroupIDstringNo

The ID of the consumer group on the Message Queue for Apache RocketMQ instance.

GID-test
InstanceTypestringNo

The type of the Message Queue for Apache RocketMQ instance. Valid values:

  • Cloud_4: Message Queue for Apache RocketMQ 4.0 instance.
  • Cloud_5: Message Queue for Apache RocketMQ 5.0 instance.
Cloud_4
InstanceNetworkstringNo

None.

None
InstanceVpcIdstringNo

The ID of the virtual private cloud (VPC) in which the Message Queue for Apache RocketMQ instance resides.

vpc-bp1a4gmlk31hyg6ptl3ss
InstanceVSwitchIdsstringNo

The ID of the vSwitch with which the Message Queue for Apache RocketMQ instance is associated.

vsw-bp10rbrt6rb6vrd89****
InstanceSecurityGroupIdstringNo

The ID of the security group to which the Message Queue for Apache RocketMQ instance belongs.

sg-catalog-eventlistener
AuthTypestringNo

The authentication type. You can set this parameter to ACL or leave this parameter empty.

ACL
InstanceEndpointstringNo

The endpoint that is used to access the Message Queue for Apache RocketMQ instance.

registry-vpc****.aliyuncs.com
InstanceUsernamestringNo

The username that is used to access the Message Queue for Apache RocketMQ instance.

root
InstancePasswordstringNo

The password that is used to access the Message Queue for Apache RocketMQ instance.

******
SourceRabbitMQParametersobjectNo

The parameters that are configured if the event source is Message Queue for RabbitMQ.

RegionIdstringNo

The ID of the region where the Message Queue for RabbitMQ instance resides.

cn-hangzhou
InstanceIdstringNo

The ID of the Message Queue for RabbitMQ instance. For more information, see Limits .

bastionhost-cn-7mz2zkyff09
VirtualHostNamestringNo

The name of the vhost of the Message Queue for RabbitMQ instance. For more information, see Limits .

amqp-cn-nif22u74****
QueueNamestringNo

The name of the queue on the Message Queue for RabbitMQ instance. For more information, see Limits .

eb-connect
SourceSLSParametersobjectNo

SourceSLSParameters

ProjectstringNo

The Log Service project.

VideoTestProject
LogStorestringNo

The Log Service Logstore.

waf-logstore
ConsumePositionstringNo

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
RoleNamestringNo

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
SourceScheduledEventParametersobjectNo

The parameters that are configured if you specify scheduled events as the event source.

SchedulestringNo

The cron expression.

10 * * * * *
TimeZonestringNo

The time zone in which the cron expression is executed.

GMT+0:00
UserDatastringNo

The user data that is displayed in a JSON string.

{"a": "b"}
SourceHttpEventParametersobjectNo

The parameters that are configured if the event source is HTTP events.

TypestringNo

The protocol type that is supported by the generated webhook URL. Valid values:

  • HTTP
  • HTTPS
  • HTTP&HTTPS
HTTPS
MethodarrayNo

The HTTP request method supported by the generated webhook URL. You can select multiple values. Valid values:

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD
  • OPTIONS
  • TRACE
  • CONNECT
stringNo

The HTTP request method supported by the generated webhook URL. You can select multiple values. Valid values:

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD
  • OPTIONS
  • TRACE
  • CONNECT
GET
SecurityConfigstringNo

The type of security settings. Valid values:

  • none: No configuration is required.
  • ip: CIDR block.
  • referer: security domain name.
none
IparrayNo

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.

stringNo

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
RefererarrayNo

The security domain name. This parameter is required only if SecurityConfig is set to referer. You can enter a domain name.

stringNo

The security domain name. This parameter is required only if SecurityConfig is set to referer. You can enter a domain name.

aliyundoc.com
SourceKafkaParametersobjectNo

The parameters that are configured if the event source is Message Queue for Apache Kafka.

InstanceIdstringNo

The ID of the Message Queue for Apache Kafka instance.

cbwp-bp1o3m66wcjgbkssm3k5m
ConsumerGroupstringNo

The ID of the consumer group that subscribes to the topic.

dsp_online_ml_request
TopicstringNo

The name of the topic on the Message Queue for Apache Kafka instance.

billing_notify
OffsetResetstringNo

The consumer offset.

latest
RegionIdstringNo

The ID of the region where the Message Queue for Apache Kafka instance resides.

cn-shanghai
MaximumTasksintegerNo

The maximum number of consumers.

1
NetworkstringNo

The network. Valid values: Default and PublicNetwork. Default value: Default. The value PublicNetwork indicates a self-managed network.

Default
SecurityGroupIdstringNo

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
VpcIdstringNo

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
VSwitchIdsstringNo

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

ParameterTypeDescriptionExample
object
Messagestring

The returned error message.

Remote error. requestId: [xxxx-9D10-65DFDFA3A75D], error code: [EventSourceNotExist], message: [The event source in request is not exist! ]
RequestIdstring

The request ID.

c057d379-ea65-41ec-a8a8-90627a968204
Databoolean

The result of the operation.

true
Codestring

The returned response code. Valid values:

  • Success: The request is successful.
  • Other codes: The request failed. For more information about error codes, see Error codes.
200
Successboolean

Indicates whether the operation is successful. The value true indicates that the operation is successful.

true

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError message
403ServiceNotEnableService not enable

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-19The Error code has changedView Change Details
2023-08-01The Error code has changedView Change Details
2023-04-21The Error code has changed. The request parameters of the API has changedView Change Details
2023-04-06The Error code has changedView Change Details