GetRule
Updated at:
The GetRule operation retrieves the details of an event rule.
URI
/openapi/getRule
Request parameters
| Name | Type | Required | Example | Description |
| EventBusName | String | Yes | default | The name of the event bus. For more information, see Limits. |
| RuleName | String | Yes | myRule3 | The name of the event rule. For more information, see Limits. |
Response parameters
| Name | Type | Example | Description |
| EventBusName | String | default | The name of the event bus. |
| RuleARN | String | acs:eventbridge:cn-hangzhou:123456789098****:eventbus/default/rule/myRule3 | The Alibaba Cloud Resource Name (ARN) of the rule. |
| RuleName | String | myRule3 | The name of the event rule. |
| Description | String | test | The description of the rule. |
| Status | String | ENABLE | The status of the rule. Valid values:
|
| FilterPattern | String | | The event pattern in JSON format. Valid values:
Each field can have a maximum of five expressions in the map data structure. |
| Targets | List<Target> | The event destination. | |
| Id | String | 1 | The custom ID of the event target. |
| Type | String | acs.mns.queue | Target type. |
| Endpoint | String | acs:mns:cn-hangzhou:123456789098****:queues/myqueue | The URL of the delivery endpoint. |
| PushRetryStrategy | String | BACKOFF_RETRY | The retry policy for pushing events. Valid values:
|
| ParamList | List<Param> | The parameters for event delivery. | |
| resourceKey | String | body | The resource parameter for the event transformation. For more information, see Event target parameters. |
| form | String | TEMPLATE | The format of the event transformation. For more information, see Event target parameters. |
| value | String | | The value of the event transformation. |
| template | String | The value of ${key} is ${value}! | The template style. |
Examples
Sample request
POST /openapi/getRule HTTP/1.1
Host: 123456789098****.eventbridge.cn-hangzhou.aliyuncs.com
Date: Sat, 18 Apr 2020 05:30:41 GMT
x-eventbridge-version: 2020-04-01
Authorization: acs vZ3VL0SuJdHi****:Jo2PbTj******zYAYoYslKLvWzg=
Content-Type: application/json;charset=UTF-8
Content-Length: 26
{
"EventBusName":"default",
"RuleName":"myRule3"
}Sample response
HTTP/1.1 200 OK
Server: AliyunEventBridge
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 79
x-eventbridge-request-id: 5E9A9081333245F1D800****
Date: Sat, 18 Apr 2020 05:30:41 GMT
{
"EventBusName":"default",
"Description":"test",
"RuleARN":"acs:eventbridge:cn-hangzhou:123456789098****:eventbus/default/rule/myRule3",
"RuleName":"myRule3",
"Status":"ENABLE",
"FilterPattern":"{\"source\":[\"acs.oss\"],\"type\":[\"oss:BucketQueried:GetBucketStat\"]}",
"Targets":[
{
"Id":"1",
"Type":"acs.mns.queue",
"Endpoint":"acs:mns:cn-hangzhou:123456789098****:queues/myqueue",
"PushRetryStrategy":"BACKOFF_RETRY",
"ParamList":[
{
"resourceKey":"queue",
"form":"CONSTANT",
"value":"myqueue"
},
{
"resourceKey":"body",
"form":"TEMPLATE",
"value":"{\"key\"=\"value\"}",
"template":"The value of ${key} is ${value}!"
}
]
}
]
}Is this page helpful?