Mengkueri semua aturan EventBridge.
Deskripsi operasi
You can call this API operation to query all rules of an event bus.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:ListRules |
get |
*Rule
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RuleNamePrefix |
string |
No |
Awalan nama aturan. |
test |
| Limit |
integer |
No |
Jumlah maksimum entri yang dikembalikan dalam satu permintaan. Anda dapat menggunakan parameter ini dan parameter NextToken untuk mengimplementasikan pembagian halaman. Maksimum 100 entri dapat dikembalikan dalam satu permintaan. |
50 |
| NextToken |
string |
No |
Jika Anda menetapkan parameter Limit dan terdapat nilai kembalian yang berlebih, parameter ini akan dikembalikan. |
1000 |
| EventBusName |
string |
Yes |
Nama EventBridge. |
default |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The error message that is returned if the request failed. |
Specified parameter Limit is not valid. |
| RequestId |
string |
The request ID. |
C7043799-F4DA-5290-9249-97C359876D97 |
| Data |
object |
The returned data. |
|
| NextToken |
string |
If excess return values exist, this parameter is returned. |
1000 |
| Total |
integer |
The total number of entries. |
6 |
| Rules |
array<object> |
The event rules. |
|
|
array<object> |
The event rule. |
||
| DetailMap |
object |
The details of the event rule. |
|
| Status |
string |
The status of the event rule. Valid values:
|
ENABLE |
| EventBusName |
string |
The name of the event bus. |
demo |
| RuleARN |
string |
The Alibaba Cloud Resource Name (ARN) of the rule. |
acs:eventbridge:cn-hangzhou:123456789098****:eventbus/default/rule/myRule3 |
| Description |
string |
The rule description. |
demo |
| Targets |
array<object> |
The event targets. |
|
|
object |
The event target. |
||
| Type |
string |
The type of the event target. For more information, see Event target parameters. |
acs.mns.queue |
| Endpoint |
string |
The endpoint of the event target. |
acs:mns:cn-hangzhou:123456789098****:queues/myqueue |
| Id |
string |
The ID of the custom event target. |
177 |
| PushSelector |
string |
The transformer that is used to push events. |
MATCHED_EVENT |
| ErrorsTolerance |
string |
The fault tolerance policy. Valid values:
|
ALL |
| FilterPattern |
string |
The event pattern, in JSON format. Valid values:
|
{\"source\":[\"acs.oss\"],\"type\":[\"oss:BucketQueried:GetBucketStat\"]} |
| CreatedTimestamp |
integer |
The creation timestamp. |
1607071602000 |
| RuleName |
string |
The name of the event rule. |
tf-testacc-rule |
| Code |
string |
The response code.
|
Success |
| Success |
boolean |
Indicates whether the request was successful. Valid values: true and false. |
true |
Contoh
Respons sukses
JSONformat
{
"Message": "Specified parameter Limit is not valid.",
"RequestId": "C7043799-F4DA-5290-9249-97C359876D97",
"Data": {
"NextToken": "1000",
"Total": 6,
"Rules": [
{
"DetailMap": {
"test": "test",
"test2": 1
},
"Status": "ENABLE",
"EventBusName": "demo",
"RuleARN": "acs:eventbridge:cn-hangzhou:123456789098****:eventbus/default/rule/myRule3",
"Description": "demo",
"Targets": [
{
"Type": "acs.mns.queue\n",
"Endpoint": "acs:mns:cn-hangzhou:123456789098****:queues/myqueue",
"Id": "177",
"PushSelector": "MATCHED_EVENT",
"ErrorsTolerance": "ALL"
}
],
"FilterPattern": "{\\\"source\\\":[\\\"acs.oss\\\"],\\\"type\\\":[\\\"oss:BucketQueried:GetBucketStat\\\"]}\n",
"CreatedTimestamp": 1607071602000,
"RuleName": "tf-testacc-rule"
}
]
},
"Code": "Success",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | ServiceNotEnable | Service not enable |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.