Queries the details of an event stream.
URL
/eventstreaming/getEventStreaming
Request parameters
| Parameter | Type | Required | Example | Description |
| EventStreamingName | String | Yes | myeventstreaming | The name of the event stream whose details you want to query. |
Response parameters
| Parameter | Type | Example | Description |
| EventStreamingName | String | rocketmq-sync | The name of the event stream that is returned. |
| Description | String | RocketMQ-to-RocketMQ | The description of the event stream that is returned. |
| Status | String | RUNNING | The status of the event stream that is returned. Valid values:
|
| Source | Object | SourceRocketMQParameters | The event provider. |
| SourceMNSParameters | Object | Indicates that the event provider is Simple Message Queue (formerly MNS). | |
| SourceRocketMQParameters | Object | Indicates that the event provider is ApsaraMQ for RocketMQ. | |
| SourceRabbitMQParameters | Object | Indicates that the event provider is ApsaraMQ for RabbitMQ. | |
| SourceSLSParameters | Object | Indicates that the event provider is Log Service. | |
| FilterPattern | Map | None. | The rule that is used to filter events. If you leave this parameter empty, all events are matched. |
| Sink | Object | SinkRocketMQParameters | The event target. |
| SinkMNSParameters | Object | Indicates that the event target is Simple Message Queue (formerly MNS). | |
| SinkRocketMQParameters | Object | Indicates that the event target is ApsaraMQ for RocketMQ. | |
| SinkRabbitMQParameters | Object | Indicates that the event target is ApsaraMQ for RabbitMQ. | |
| SinkSLSParameters | Object | Indicates that the event target is Log Service. | |
| RunOptions | Map | The runtime environment. | |
| RetryStrategy | String | BACKOFF_RETRY | The retry policy to be used when an event fails to be pushed. Valid values:
|
| ErrorsTolerance | String | ALL | The fault tolerance policy. The policy specifies whether to ignore an error when the error occurs. Valid values:
|
Response parameter SourceMNSParameters
| Parameter | Type | Example | Description |
| QueueName | String | demo | The name of the queue in the Simple Message Queue (formerly MNS) instance. |
| IsBase64Decode | String | true | Indicates whether Base64 encoding is enabled. |
Response parameter SourceRocketMQParameters
| Parameter | Type | Example | Description |
| RegionId | String | cn-hangzhou | The ID of the region where the ApsaraMQ for RocketMQ instance resides. |
| InstanceId | String | MQ_INST_164901546557****_BAAN**** | The ID of the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
| Topic | String | mytopic | The name of the topic in the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
| Tag | String | test | The tags that are used to filter messages. |
| Offset | String | CONSUME_FROM_TIMESTAMP | The consumer offset of messages. Valid values:
|
| Timestamp | Long | 1636597951964 | The timestamp of the offset from which consumption starts. This parameter is valid only when you set the Offset parameter to CONSUME_FROM_TIMESTAMP. |
| GroupID | String | GID_group1 | The ID of the group in the ApsaraMQ for RocketMQ instance. |
Response parameter SourceRabbitMQParameters
| Parameter | Type | Example | Description |
| InstanceId | String | amqp-cn-nif22u74**** | The ID of the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
| VirtualHostName | String | eb-connect | The name of the vhost in the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
| QueueName | String | demo | The name of the queue in the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
Response parameter SourceSLSParameters
| Parameter | Type | Required | Example | Description |
| Project | String | Yes | test-project | The Log Service project. |
| LogStore | String | Yes | test-logstore | The Log Service Logstore. |
| ConsumePosition | String | No | end | 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. |
| RoleName | String | Yes | testRole | The name of the role. If you want to authorize EventBridge to use this role to read the logs in Log Service, you must select Alibaba Cloud Service for the Selected Trusted Entity parameter, and select EventBridge for the Select Trusted Service parameter when you create the role in the RAM console. |
Response parameter SinkMNSParameters
| Parameter | Type | Example | Description |
| QueueName | TargetParameter | The name of the queue that you specify when the event target is Simple Message Queue (formerly MNS). | |
| Form | String | CONSTANT | The transformation method. |
| Value | String | MyQueue | The name of the queue in the Simple Message Queue (formerly MNS) instance. |
| IsBase64Encode | TargetParameter | Indicates whether Base64 encoding is enabled. | |
| Value | String | true | Indicates that Base64 encoding is enabled. |
| Form | String | CONSTANT | The transformation method. |
| Body | TargetParameter | The content of the message. | |
| Form | String | TEMPLATE | The transformation method. |
| Value | String | | The value before the transformation. |
Response parameter SinkRocketMQParameters
| Parameter | Type | Example | Description |
| InstanceId | TargetParameter | The ID of the instance that you specify when the event target is ApsaraMQ for RocketMQ. | |
| Value | String | MQ_INST_164901546557****_BAAN**** | The ID of the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
| Form | String | CONSTANT | The transformation method. |
| Topic | TargetParameter | The topic in the ApsaraMQ for RocketMQ instance. | |
| Value | String | Mytopic | The name of the topic in the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
| Form | String | CONSTANT | The transformation method. |
| Body | TargetParameter | The content of the message. | |
| Form | String | No | TEMPLATE |
| Value | String | | The value before the transformation. |
| Template | String | The value of ${key} is ${value}! | The template based on which events are transformed. |
| Properties | TargetParameter | The properties that are used to filter messages. | |
| Value | String | | The value before the transformation. |
| Form | String | TEMPLATE | The transformation method. |
| Template | String | The value of ${key} is ${value}! | The template based on which events are transformed. |
| Keys | TargetParameter | The properties that are used to filter messages. | |
| Value | String | | The value before the transformation. |
| Form | String | TEMPLATE | The transformation method. |
| Template | String | The value of ${key} is ${value}! | The template based on which events are transformed. |
| Tags | TargetParameter | The properties that are used to filter messages. | |
| Value | String | | The value before the transformation. |
| Form | String | TEMPLATE | The transformation method. |
| Template | String | The value of ${key} is ${value}! | The template based on which events are transformed. |
Response parameter SinkRabbitMQParameters
| Parameter | Type | Example | Description |
| InstanceId | TargetParameter | The ID of the instance that you specify when the event target is ApsaraMQ for RabbitMQ. | |
| Value | String | amqp-cn-2r42e73o**** | The ID of the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
| Form | String | CONSTANT | The transformation method. |
| VirtualHostName | TargetParameter | The name of the vhost in the ApsaraMQ for RabbitMQ instance. | |
| Value | String | rabbit-host | The name of the vhost in the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
| Form | String | CONSTANT | The transformation method. |
| TargetType | TargetParameter | The type of the resource to which events are pushed. | |
| Value | String | Exchange/Queue | The type of the resource to which events are pushed. Valid values:
|
| Form | String | CONSTANT | The transformation method. |
| Exchange | TargetParameter | The name of the exchange to which events are pushed in the destination instance. This parameter is valid only when you set the TargetType parameter to Exchange. | |
| Value | String | a_exchange | The name of the exchange in the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
| Form | String | CONSTANT | The transformation method. |
| RoutingKey | TargetParameter | The routing rule for the message. This parameter is valid only when you set the TargetType parameter to Exchange. | |
| Value | String | housekeeping | The routing rule for the message. |
| Form | String | CONSTANT | The transformation method. |
| QueueName | TargetParameter | 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 | MyQueue | The name of the queue in the Message Queue for RabbitMQ instance. For more information, see Limits. |
| Form | String | CONSTANT | The transformation method. |
| Body | TargetParameter | The content of the message. | |
| Form | String | TEMPLATE | The transformation method. |
| Value | String | | The value before the transformation. |
| Template | String | The value of ${key} is ${value}! | The template based on which events are transformed. |
| MessageId | TargetParameter | The ID of the message. | |
| Value | String | | The value before the transformation. |
| Form | String | TEMPLATE | The transformation method. |
| Template | String | The value of ${key} is ${value}! | The template based on which events are transformed. |
| Properties | TargetParameter | The properties that are used to filter messages. | |
| Value | String | | The value before the transformation. |
| Form | String | TEMPLATE | The transformation method. |
| Template | String | The value of ${key} is ${value}! | The template based on which events are transformed. |
Response parameter SinkSLSParameters
| Parameter | Type | Required | Example | Description |
| Project | String | Yes | test-project | The Log Service project. |
| LogStore | String | Yes | test-logstore | The Log Service Logstore. |
| Topic | String | No | testTopic | The topic in which the log resides. The value of this parameter is the same as the value of the reserved field "__topic__" in Log Service. |
| RoleName | String | Yes | testRole | The name of the role. If you want to authorize EventBridge to use this role to read the logs in Log Service, you must select Alibaba Cloud Service for the Selected Trusted Entity parameter, and select EventBridge for the Select Trusted Service parameter when you create the role in the RAM console. |
Examples
Sample requests
POST /eventstreaming/getEventStreaming 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"
}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: 61027584-9E35-15F0-B9A7-9CC463D1****
Date: Sat, 18 Apr 2020 05:30:41 GMT
{
"code":"200",
"data":{
"RequestId":"61027584-9E35-15F0-B9A7-9CC463D1****",
"Data":{
"Status":"STARTING",
"FilterPattern":"{}",
"Description":"rocketmq2rabbitmq",
"Sink":{
"SinkRabbitMQParameters":{
"Exchange":{
"Form":"CONSTANT",
"Value":"a_exchange"
},
"RoutingKey":{
"Form":"JSONPATH",
"Value":"housekeeping"
},
"VirtualHostName":{
"Form":"CONSTANT",
"Value":"dlq"
},
"InstanceId":{
"Form":"CONSTANT",
"Value":"amqp-cn-2r42e73o****"
},
"TargetType":{
"Form":"CONSTANT",
"Value":"Exchange"
},
"Properties":{
"Form":"JSONPATH",
"Value":"systemProperties"
},
"Body":{
"Form":"TEMPLATE",
"Value":"{"key": "value"}",
"Template":"The value of ${key} is ${value}."
},
"MessageId":{
"Form":"JSONPATH",
"Value":"message_001"
}
}
},
"EventStreamingName":"myeventstreaming",
"Source":{
"SourceRocketMQParameters":{
"InstanceId":"MQ_INST_164901546557****_BAAN5UF8",
"RegionId":"cn-hangzhou",
"Tag":"",
"Topic":"mytopic",
"Offset":"CONSUME_FROM_TIMESTAMP",
"GroupID":"GID_group1",
"Timestamp":1636597951964
}
},
"RunOptions":{
"ErrorsTolerance":"ALL",
"MaximumTasks":0,
"RetryStrategy":{
"PushRetryStrategy":"BACKOFF_RETRY",
}
}
},
"Code":"Success",
"Success":true
},
"httpStatusCode":"200",
"requestId":"61027584-9E35-15F0-B9A7-9CC463D1****",
"successResponse":true
}该文章对您有帮助吗?