Retrieves the details of an event rule.
Operation description
Retrieves the details of an event rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:GetRule |
get |
*Rule
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| EventBusName |
string |
Yes |
The name of the event bus. |
default |
| RuleName |
string |
Yes |
The name of the event rule. |
ram-changes |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The error message. |
The event rule not existed! |
| RequestId |
string |
The unique ID that Alibaba Cloud generates for the request. |
2BC1857D-E633-5E79-B2C2-43EF5F7730D8 |
| Data |
object |
The response data. |
|
| Status |
string |
The status of the rule. Valid values: ENABLE: The rule is enabled. This is the default status. DISABLE: The rule is disabled. |
ENABLE |
| EventBusName |
string |
The name of the event bus. |
Housekeeping-Bus |
| RuleARN |
string |
The Alibaba Cloud Resource Name (ARN) of the rule. |
acs:eventbridge:cn-hangzhou:123456789098****:eventbus/default/rule/myRule3 |
| Description |
string |
The description of the rule. |
test |
| Targets |
array<object> |
The list of event targets. |
|
|
array<object> |
An event target. |
||
| DetailMap |
object |
The details. |
|
| Type |
string |
The type of the event target. For more information, see Event target parameters. |
acs.mns.queue |
| Endpoint |
string |
The endpoint to which the event is delivered. |
acs:mns:cn-hangzhou:123456789098****:queues/myqueue |
| ParamList |
array<object> |
The list of parameters for the event target. |
|
|
object |
The parameters of the event target. |
||
| Value |
string |
The value of the event target parameter. |
{\"key\"=\"value\"} |
| Template |
string |
The template of the event target parameter. |
The value of ${key} is ${value}! |
| Form |
string |
The format of the event target parameter. For more information, see Limits. |
TEMPLATE |
| ResourceKey |
string |
The resource parameter of the event target. For more information, see Limits. |
body |
| PushSelector |
string |
The push selector. |
MATCHED_EVENT |
| Id |
string |
The custom ID of the event target. |
1 |
| DeadLetterQueue |
object |
The dead-letter queue. |
|
| Arn |
string |
The Alibaba Cloud Resource Name (ARN) of the dead-letter queue. |
acs:eventbridge:cn-hangzhou:164901546557****:eventbus/my-event-bus/eventsource/myRocketMQ.source |
| Network |
string |
||
| VpcId |
string |
||
| VSwitchIds |
string |
||
| SecurityGroupId |
string |
||
| PushRetryStrategy |
string |
The retry policy for pushing events. Valid values: BACKOFF_RETRY: Backoff retry. Retries 3 times. The retry interval is a random value between 10 and 20 seconds. EXPONENTIAL_DECAY_RETRY: Exponential decay retry. Retries 176 times. The retry interval exponentially increases to 512 seconds. The total retry time is 1 day. The specific intervals are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512...512 seconds (167 retries at 512 seconds). |
BACKOFF_RETRY |
| ConcurrentConfig |
object |
||
| Concurrency |
integer |
||
| ErrorsTolerance |
string |
The fault tolerance policy. Valid values: ALL: Allows fault tolerance. If an error occurs, the execution is not blocked. After the retry policy is exhausted, the message is sent to the dead-letter queue or discarded. NONE: Disallows fault tolerance. If an error occurs and the retry policy is exhausted, the execution is blocked. |
ALL |
| FilterPattern |
string |
The event pattern, in JSON format. The following modes are supported: stringEqual stringExpression Each field can have a maximum of five expressions in a map structure. Each field can have a maximum of five expressions in a map structure. |
{\"source\":[\"acs.oss\"],\"type\":[\"oss:BucketQueried:GetBucketStat\"]} |
| CreatedTimestamp |
integer |
The UNIX timestamp when the rule was created. |
1607071602000 |
| RuleName |
string |
The name of the event rule. |
ramrolechange-fc |
| Code |
string |
The response code. The value `Success` indicates that the call was successful. For more information about other values, see Error codes. |
Success |
| Success |
boolean |
Indicates whether the call was successful. A value of `true` indicates that the call was successful. |
true |
Examples
Success response
JSON format
{
"Message": "The event rule not existed!",
"RequestId": "2BC1857D-E633-5E79-B2C2-43EF5F7730D8",
"Data": {
"Status": "ENABLE",
"EventBusName": "Housekeeping-Bus",
"RuleARN": "acs:eventbridge:cn-hangzhou:123456789098****:eventbus/default/rule/myRule3",
"Description": "test",
"Targets": [
{
"DetailMap": {
"test": "test",
"test2": 1
},
"Type": "acs.mns.queue",
"Endpoint": "acs:mns:cn-hangzhou:123456789098****:queues/myqueue",
"ParamList": [
{
"Value": "{\\\"key\\\"=\\\"value\\\"}",
"Template": "The value of ${key} is ${value}!",
"Form": "TEMPLATE",
"ResourceKey": "body"
}
],
"PushSelector": "MATCHED_EVENT",
"Id": "1",
"DeadLetterQueue": {
"Arn": "acs:eventbridge:cn-hangzhou:164901546557****:eventbus/my-event-bus/eventsource/myRocketMQ.source",
"Network": "",
"VpcId": "",
"VSwitchIds": "",
"SecurityGroupId": ""
},
"PushRetryStrategy": "BACKOFF_RETRY",
"ConcurrentConfig": {
"Concurrency": 0
},
"ErrorsTolerance": "ALL"
}
],
"FilterPattern": "{\\\"source\\\":[\\\"acs.oss\\\"],\\\"type\\\":[\\\"oss:BucketQueried:GetBucketStat\\\"]}",
"CreatedTimestamp": 1607071602000,
"RuleName": "ramrolechange-fc"
},
"Code": "Success",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | ServiceNotEnable | Service not enable |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.