GetRule
Retrieves the details of an event rule.
Operation description
Gets 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 rule. |
ram-changes |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The error message. |
The event rule not existed! |
| RequestId |
string |
The unique request ID generated by Alibaba Cloud. |
2BC1857D-E633-5E79-B2C2-43EF5F7730D8 |
| Data |
object |
The response data. |
|
| Status |
string |
The status of the rule. Valid values:
|
ENABLE |
| EventBusName |
string |
The name of the event bus. |
Housekeeping-Bus |
| RuleARN |
string |
The 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 of the event target. |
|
| Type |
string |
The type of the event target. For more information, see Event target parameters. |
acs.mns.queue |
| Endpoint |
string |
The delivery endpoint for the event. |
acs:mns:cn-hangzhou:123456789098****:queues/myqueue |
| ParamList |
array<object> |
The list of parameters for the event target. |
|
|
object |
A parameter for 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 key of the event target. For more information, see Limits. |
body |
| PushSelector |
string |
The push selector. |
PARAM_TRANSFORMER |
| Id |
string |
The custom ID of the event target. |
Mlm123456JHd2RsRoKw |
| 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 |
The network type of the dead-letter queue. |
|
| VpcId |
string |
The VPC ID. |
|
| VSwitchIds |
string |
The vSwitch IDs. |
|
| SecurityGroupId |
string |
The security group ID. |
|
| PushRetryStrategy |
string |
The retry policy for pushing events. Valid values:
|
BACKOFF_RETRY |
| ConcurrentConfig |
object |
The concurrency settings. |
|
| Concurrency |
integer |
The maximum number of concurrent pushes. |
2 |
| ErrorsTolerance |
string |
The fault tolerance policy. Valid values:
|
ALL |
| FilterPattern |
string |
The event pattern in JSON format. The following modes are supported:
|
{\"source\":[\"acs.oss\"],\"type\":[\"oss:BucketQueried:GetBucketStat\"]} |
| CreatedTimestamp |
integer |
The creation timestamp of the rule. |
1607071602000 |
| RuleName |
string |
The name of the rule. |
ramrolechange-fc |
| Code |
string |
The response code. Valid values:
|
Success |
| Success |
boolean |
Indicates whether the operation was successful. A value of |
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": "PARAM_TRANSFORMER",
"Id": "Mlm123456JHd2RsRoKw\n",
"DeadLetterQueue": {
"Arn": "acs:eventbridge:cn-hangzhou:164901546557****:eventbus/my-event-bus/eventsource/myRocketMQ.source",
"Network": "",
"VpcId": "",
"VSwitchIds": "",
"SecurityGroupId": ""
},
"PushRetryStrategy": "BACKOFF_RETRY",
"ConcurrentConfig": {
"Concurrency": 2
},
"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.