Modifies the information about an EventStreaming, such as the basic information and the information about the event source, event rule, and event target.

URL

/eventstreaming/updateEventStreaming

Usage notes

  • In an EventStreaming, you can specify only one of the SourceMNSParameters, SourceRocketMQParameters, and SourceRabbitMQParameters parameters.
  • In an EventStreaming, you can specify only one of the SinkMNSParameters, SinkRocketMQParameters, and SinkRabbitMQParameters parameters.

Request parameters

Parameter Type Required Example Description
EventStreamingName String Yes myeventstreaming The name of the EventStreaming.
Description String Yes rocketmq2mns The description of the EventStreaming.
Source Object Yes SourceRocketMQParameters The information about the event provider.
SourceMNSParameters Object No The resource information that you configure when the event provider is MNS. For more information, see Request parameter SourceMNSParameters.
SourceRocketMQParameters Object No The resource information that you configure when the event provider is Message Queue for Apache RocketMQ. For more information, see Request parameter SourceRocketMQParameters.
SourceRabbitMQParameters Object No The resource information that you configure when the event provider is Message Queue for RabbitMQ. For more information, see Request parameter SourceRabbitMQParameters.
FilterPattern String No N/A The event rule. If you leave this parameter empty, all events are matched.
Sink Object Yes SinkMNSParameters The information about the event target.
SinkMNSParameters Object No The resource information that you configure when the event target is MNS. For more information, see Request parameter SinkMNSParameters.
SinkRocketMQParameters Object No The resource information that you configure when the event target is Message Queue for Apache RocketMQ. For more information, see Request parameter SinkRocketMQParameters.
SinkRabbitMQParameters Object No The resource information that you configure when the event target is Message Queue for RabbitMQ. For more information, see Request parameter SinkRabbitMQParameters.
RunOptions Object No The runtime environment.
RetryStrategy String Yes BACKOFF_RETRY The retry policy to be used when an event fails to be pushed. Valid values:
  • BACKOFF_RETRY: backoff retry. The request can be retried up to three times. The interval between two consecutive retries is a random value between 10 and 20 seconds.
  • EXPONENTIAL_DECAY_RETRY: exponential decay retry. The request can be retried up to 176 times. The interval between two consecutive retries exponentially increases to 512 seconds, and the total retry time is one day. The specific retry intervals are 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, ..., and 512 seconds, including a maximum of one hundred and sixty-seven 512 seconds in total.

Default value: BACKOFF_RETRY.

ErrorsTolerance String Yes ALL The fault tolerance policy, which specifies whether to ignore an error when it occurs. Valid values:
  • ALL: ignores the error.
  • NONE: does not ignore the error.

Default value: ALL.

DeadLetterQueue Object Yes Specifies whether to enable dead-letter queues. By default, dead-letter queues are disabled. Messages that fail to be pushed after allowed retries as specified by the retry policy are discarded.
Arn String No acs:mq:cn-chengdu:164901546557****:/instances/MQ_INST_164901546557****_BXxk0KXx/topic/Mytopic The Alibaba Cloud Resource Name (ARN) of the topic in the Message Queue for RabbitMQ instance.

Request parameter SourceMNSParameters

If you specify the SourceMNSParameters parameter, you can set the parameters described in the following table.

Parameter Type Required Example Description
QueueName String Yes demo The name of the queue in the MNS instance.
IsBase64Decode String Yes true Specifies whether to enable Base64 decoding. Default value: true.

Request parameter SourceRocketMQParameters

If you specify the SourceRocketMQParameters parameter, you can set the parameters described in the following table.

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou The ID of the region where the Message Queue for Apache RocketMQ instance resides.
InstanceId String Yes MQ_INST_164901546557****_BAAN**** The ID of the Message Queue for Apache RocketMQ instance. For more information, see Limits.
Topic String Yes mytopic The name of the topic in the Message Queue for Apache RocketMQ instance. For more information, see Limits.
Tag String No test The tags for filtering.
Offset String No CONSUME_FROM_TIMESTAMP The consumer offset of the message. Valid values:
  • CONSUME_FROM_LAST_OFFSET: Consumption starts from the latest offset.
  • CONSUME_FROM_FIRST_OFFSET: Consumption starts from the earliest offset.
  • CONSUME_FROM_TIMESTAMP: Consumption starts from the offset at the specified point in time.

Default value: CONSUME_FROM_LAST_OFFSET.

Timestamp Long No 1636597951964 The timestamp of the offset from which the consumption starts. This parameter is valid only when you set the Offset parameter to CONSUME_FROM_TIMESTAMP.
GroupID String Yes GID_group1 The group ID of the Message Queue for Apache RocketMQ instance.

Request parameter SourceRabbitMQParameters

If you specify the SourceRabbitMQParameters parameter, you can set the parameters described in the following table.

Parameter Type Required Example Description
InstanceId String Yes amqp-cn-nif22u74**** The ID of the Message Queue for RabbitMQ instance. For more information, see Limits.
VirtualHostName String Yes eb-connect The name of the vhost in the Message Queue for RabbitMQ instance. For more information, see Limits.
QueueName String Yes demo The name of the queue in the Message Queue for RabbitMQ instance. For more information, see Limits.

Request parameter SinkMNSParameters

If you specify the SinkMNSParameters parameter, you can set the parameters described in the following table.

Parameter Type Required Example Description
QueueName TargetParameter Yes The name of the queue that you specify when the event target is MNS.
Value String Yes MyQueue The name of the queue in the MNS instance.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
Body TargetParameter No The content of the message.
Form String No TEMPLATE The transformation method.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Template String No The value of ${key} is ${value}! The template based on which events are to be transformed.
IsBase64Encode TargetParameter Yes Specifies whether to enable Base64 encoding.
Value String Yes true Specifies whether to enable Base64 encoding.
Form String No CONSTANT The transformation method. Default value: CONSTANT.

Request parameter SinkRocketMQParameters

If you specify the SinkRocketMQParameters parameter, you can set the parameters described in the following table.

Parameter Type Required Example Description
InstanceId TargetParameter Yes The ID of the Message Queue for Apache RocketMQ instance that you specify when the event target is Message Queue for Apache RocketMQ.
Value String Yes MQ_INST_164901546557****_BAAN**** The ID of the Message Queue for Apache RocketMQ instance. For more information, see Limits.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
Topic TargetParameter Yes The topic in the Message Queue for Apache RocketMQ instance.
Value String Yes Mytopic The name of the topic in the Message Queue for Apache RocketMQ instance. For more information, see Limits.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
Body TargetParameter Yes The content of the message.
Form String No N/A The transformation method. Default value: TEMPLATE.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Template String Yes The value of ${key} is ${value}! The template based on which events are to be transformed.
Properties TargetParameter Yes The properties for filtering.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Form String No TEMPLATE The transformation method.
Template String Yes The value of ${key} is ${value}! The template based on which events are to be transformed.
Keys TargetParameter Yes The keys for filtering.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Form String No TEMPLATE The transformation method.
Template String Yes The value of ${key} is ${value}! The template based on which events are to be transformed.
Tags TargetParameter Yes The tags for filtering.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Form String No TEMPLATE The transformation method.
Template String Yes The value of ${key} is ${value}! The template based on which events are to be transformed.

Request parameter SinkRabbitMQParameters

If you specify the SinkRabbitMQParameters parameter, you can set the parameters described in the following table.

Parameter Type Required Example Description
InstanceId TargetParameter Yes The ID of the Message Queue for RabbitMQ instance that you specify when the event target is Message Queue for RabbitMQ.
Value String Yes amqp-cn-2r42e73o**** The ID of the Message Queue for RabbitMQ instance. For more information, see Limits.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
VirtualHostName TargetParameter Yes The name of the vhost in the Message Queue for RabbitMQ instance.
Value String Yes rabbit-host The name of the vhost in the Message Queue for RabbitMQ instance. For more information, see Limits.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
TargetType TargetParameter Yes The type of the resource to which events are to be pushed.
Value String Yes Exchange/Queue The type of the resource to which events are to be pushed. Valid values:
  • Exchange
  • Queue
Form String No CONSTANT The transformation method. Default value: CONSTANT.
Exchange TargetParameter Yes The name of the exchange to which events are to be pushed in the destination instance.

This parameter is valid only when you set the TargetType parameter to Exchange.

Value String Yes a_exchange The name of the exchange in the Message Queue for RabbitMQ instance. For more information, see Limits.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
RoutingKey TargetParameter Yes The routing rule of the message.

This parameter is valid only when you set the TargetType parameter to Exchange.

Value String Yes housekeeping The routing rule of the message.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
QueueName TargetParameter Yes The name of the queue to which events are pushed in the destination instance.

This parameter is valid only when you set the TargetType parameter to Queue.

Value String Yes MyQueue The name of the queue in the Message Queue for RabbitMQ instance. For more information, see Limits.
Form String No CONSTANT The transformation method. Default value: CONSTANT.
Body TargetParameter Yes The content of the message.
Form String No TEMPLATE The transformation method.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Template String No The value of ${key} is ${value}! The template based on which events are to be transformed.
MessageId TargetParameter Yes The ID of the message.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Form String No TEMPLATE The transformation method.
Template String Yes The value of ${key} is ${value}! The template based on which events are to be transformed.
Properties TargetParameter Yes The properties for filtering.
Value String Yes
{
  "key": "value"
}
The value before the transformation.
Form String No TEMPLATE The transformation method.
Template String Yes The value of ${key} is ${value}! The template based on which events are to be transformed.

Response parameters

If the information about the EventStreaming is modified, the HTTP status code 200 is returned and no response body is returned.

Examples

In the following sample requests and responses, the event target of the EventStreaming is changed to Message Queue for RabbitMQ.

Sample requests

POST /eventstreaming/updateEventStreaming 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

{
    "EventStreamingName":"myeventstreaming",
    "Description":"rocketmq2rabbitmq",
    "FilterPattern":"{}",
    "Source":{
        "SourceRocketMQParameters":{
            "InstanceId":"MQ_INST_164901546557****_BAAN****",
            "GroupID":"GID_group1",
            "Topic":"mytopic",
            "Offset":"CONSUME_FROM_LAST_OFFSET",
            "Tag":"",
            "RegionId":"cn-hangzhou"
        }
    },
    "Sink":{
        "SinkRabbitMQParameters":{
            "InstanceId":{
                "Value":"amqp-cn-2r42e73o****",
                "Form":"CONSTANT"
            },
            "VirtualHostName":{
                "Value":"dlq",
                "Form":"CONSTANT"
            },
            "TargetType":{
                "Value":"Exchange",
                "Form":"CONSTANT"
            },
            "Exchange":{
                "Value":"a_exchange",
                "Form":"CONSTANT"
            },
            "RoutingKey":{
                "Value":"housekeeping",
                "Form":"JSONPATH"
            },
            "Body":{
                "Value":"{\n  \"key\": \"value\"\n}",
                "Form":"TEMPLATE",
                "Template":"The value of ${key} is ${value}."
            },
            "MessageId":{
                "Value":"message_001",
                "Form":"JSONPATH"
            },
            "Properties":{
                "Value":"systemProperties",
                "Form":"JSONPATH"
            }
        }
    },
    "RunOptions":{
        "ErrorsTolerance":"ALL",
        "RetryStrategy":{
            "PushRetryStrategy":"BACKOFF_RETRY"
        }
    }
}

Sample responses

HTTP/1.1 200 OK
Server: AliyunEventBridge
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 79
x-eventbridge-request-id: D232C031-7CDC-1FEF-BB88-5F4522A8****
Date: Sat, 18 Apr 2020 05:30:41 GMT

{
    "code":"200",
    "data":{
        "RequestId":"D232C031-7CDC-1FEF-BB88-5F4522A8****",
        "Data":true,
        "Code":"Success",
        "Success":true
    },
    "httpStatusCode":"200",
    "requestId":"D232C031-7CDC-1FEF-BB88-5F4522A8****",
    "successResponse":true
}