GetEventStreaming

更新时间:
复制 MD 格式

Queries the details of an event stream.

URL

/eventstreaming/getEventStreaming

Request parameters

ParameterTypeRequiredExampleDescription
EventStreamingNameStringYesmyeventstreamingThe name of the event stream whose details you want to query.

Response parameters

ParameterTypeExampleDescription
EventStreamingNameStringrocketmq-syncThe name of the event stream that is returned.
DescriptionStringRocketMQ-to-RocketMQThe description of the event stream that is returned.
StatusStringRUNNINGThe status of the event stream that is returned. Valid values:
  • READY
  • STARTING
  • STARTING_FAILED
  • RUNNING
  • RUNNING_FAILED
  • PAUSED
SourceObjectSourceRocketMQParametersThe event provider.
SourceMNSParametersObjectIndicates that the event provider is Simple Message Queue (formerly MNS).
SourceRocketMQParametersObjectIndicates that the event provider is ApsaraMQ for RocketMQ.
SourceRabbitMQParametersObjectIndicates that the event provider is ApsaraMQ for RabbitMQ.
SourceSLSParametersObjectIndicates that the event provider is Log Service.
FilterPatternMapNone.The rule that is used to filter events. If you leave this parameter empty, all events are matched.
SinkObjectSinkRocketMQParametersThe event target.
SinkMNSParametersObjectIndicates that the event target is Simple Message Queue (formerly MNS).
SinkRocketMQParametersObjectIndicates that the event target is ApsaraMQ for RocketMQ.
SinkRabbitMQParametersObjectIndicates that the event target is ApsaraMQ for RabbitMQ.
SinkSLSParametersObjectIndicates that the event target is Log Service.
RunOptionsMapThe runtime environment.
RetryStrategyStringBACKOFF_RETRYThe 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.
ErrorsToleranceStringALLThe fault tolerance policy. The policy specifies whether to ignore an error when the error occurs. Valid values:
  • ALL: ignores the error.
  • NONE: does not ignore the error.

Response parameter SourceMNSParameters

ParameterTypeExampleDescription
QueueNameStringdemoThe name of the queue in the Simple Message Queue (formerly MNS) instance.
IsBase64DecodeStringtrueIndicates whether Base64 encoding is enabled.

Response parameter SourceRocketMQParameters

ParameterTypeExampleDescription
RegionIdStringcn-hangzhouThe ID of the region where the ApsaraMQ for RocketMQ instance resides.
InstanceIdStringMQ_INST_164901546557****_BAAN****The ID of the ApsaraMQ for RocketMQ instance. For more information, see Limits.
TopicStringmytopicThe name of the topic in the ApsaraMQ for RocketMQ instance. For more information, see Limits.
TagStringtestThe tags that are used to filter messages.
OffsetStringCONSUME_FROM_TIMESTAMPThe consumer offset of messages. 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.
TimestampLong1636597951964The timestamp of the offset from which consumption starts. This parameter is valid only when you set the Offset parameter to CONSUME_FROM_TIMESTAMP.
GroupIDStringGID_group1The ID of the group in the ApsaraMQ for RocketMQ instance.

Response parameter SourceRabbitMQParameters

ParameterTypeExampleDescription
InstanceIdStringamqp-cn-nif22u74****The ID of the ApsaraMQ for RabbitMQ instance. For more information, see Limits.
VirtualHostNameStringeb-connectThe name of the vhost in the ApsaraMQ for RabbitMQ instance. For more information, see Limits.
QueueNameStringdemoThe name of the queue in the ApsaraMQ for RabbitMQ instance. For more information, see Limits.

Response parameter SourceSLSParameters

ParameterTypeRequiredExampleDescription
ProjectStringYestest-projectThe Log Service project.
LogStoreStringYestest-logstoreThe Log Service Logstore.
ConsumePositionStringNoendThe 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.
RoleNameStringYestestRoleThe 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

ParameterTypeExampleDescription
QueueNameTargetParameterThe name of the queue that you specify when the event target is Simple Message Queue (formerly MNS).
FormStringCONSTANTThe transformation method.
ValueStringMyQueueThe name of the queue in the Simple Message Queue (formerly MNS) instance.
IsBase64EncodeTargetParameterIndicates whether Base64 encoding is enabled.
ValueStringtrueIndicates that Base64 encoding is enabled.
FormStringCONSTANTThe transformation method.
BodyTargetParameterThe content of the message.
FormStringTEMPLATEThe transformation method.
ValueString
{
  "key": "value"
}
The value before the transformation.

Response parameter SinkRocketMQParameters

ParameterTypeExampleDescription
InstanceIdTargetParameterThe ID of the instance that you specify when the event target is ApsaraMQ for RocketMQ.
ValueStringMQ_INST_164901546557****_BAAN****The ID of the ApsaraMQ for RocketMQ instance. For more information, see Limits.
FormStringCONSTANTThe transformation method.
TopicTargetParameterThe topic in the ApsaraMQ for RocketMQ instance.
ValueStringMytopicThe name of the topic in the ApsaraMQ for RocketMQ instance. For more information, see Limits.
FormStringCONSTANTThe transformation method.
BodyTargetParameterThe content of the message.
FormStringNoTEMPLATE
ValueString
{
  "key": "value"
}
The value before the transformation.
TemplateStringThe value of ${key} is ${value}!The template based on which events are transformed.
PropertiesTargetParameterThe properties that are used to filter messages.
ValueString
{
  "key": "value"
}
The value before the transformation.
FormStringTEMPLATEThe transformation method.
TemplateStringThe value of ${key} is ${value}!The template based on which events are transformed.
KeysTargetParameterThe properties that are used to filter messages.
ValueString
{
  "key": "value"
}
The value before the transformation.
FormStringTEMPLATEThe transformation method.
TemplateStringThe value of ${key} is ${value}!The template based on which events are transformed.
TagsTargetParameterThe properties that are used to filter messages.
ValueString
{
  "key": "value"
}
The value before the transformation.
FormStringTEMPLATEThe transformation method.
TemplateStringThe value of ${key} is ${value}!The template based on which events are transformed.

Response parameter SinkRabbitMQParameters

ParameterTypeExampleDescription
InstanceIdTargetParameterThe ID of the instance that you specify when the event target is ApsaraMQ for RabbitMQ.
ValueStringamqp-cn-2r42e73o****The ID of the ApsaraMQ for RabbitMQ instance. For more information, see Limits.
FormStringCONSTANTThe transformation method.
VirtualHostNameTargetParameterThe name of the vhost in the ApsaraMQ for RabbitMQ instance.
ValueStringrabbit-hostThe name of the vhost in the ApsaraMQ for RabbitMQ instance. For more information, see Limits.
FormStringCONSTANTThe transformation method.
TargetTypeTargetParameterThe type of the resource to which events are pushed.
ValueStringExchange/QueueThe type of the resource to which events are pushed. Valid values:
  • Exchange
  • Queue
FormStringCONSTANTThe transformation method.
ExchangeTargetParameterThe 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.

ValueStringa_exchangeThe name of the exchange in the ApsaraMQ for RabbitMQ instance. For more information, see Limits.
FormStringCONSTANTThe transformation method.
RoutingKeyTargetParameterThe routing rule for the message.

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

ValueStringhousekeepingThe routing rule for the message.
FormStringCONSTANTThe transformation method.
QueueNameTargetParameterThe 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.

ValueStringMyQueueThe name of the queue in the Message Queue for RabbitMQ instance. For more information, see Limits.
FormStringCONSTANTThe transformation method.
BodyTargetParameterThe content of the message.
FormStringTEMPLATEThe transformation method.
ValueString
{
  "key": "value"
}
The value before the transformation.
TemplateStringThe value of ${key} is ${value}!The template based on which events are transformed.
MessageIdTargetParameterThe ID of the message.
ValueString
{
  "key": "value"
}
The value before the transformation.
FormStringTEMPLATEThe transformation method.
TemplateStringThe value of ${key} is ${value}!The template based on which events are transformed.
PropertiesTargetParameterThe properties that are used to filter messages.
ValueString
{
  "key": "value"
}
The value before the transformation.
FormStringTEMPLATEThe transformation method.
TemplateStringThe value of ${key} is ${value}!The template based on which events are transformed.

Response parameter SinkSLSParameters

ParameterTypeRequiredExampleDescription
ProjectStringYestest-projectThe Log Service project.
LogStoreStringYestest-logstoreThe Log Service Logstore.
TopicStringNotestTopicThe 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.
RoleNameStringYestestRoleThe 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
}