Consulta todas as regras de um barramento de eventos.
Descrição da operação
Você pode chamar esta operação de API para consultar todas as regras de um barramento de eventos.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
eventbridge:ListRules |
get |
*Rule
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RuleNamePrefix |
string |
Não |
O prefixo do nome da regra. |
test |
| Limit |
integer |
Não |
O número máximo de entradas a serem retornadas em uma única chamada. Você pode usar este parâmetro e o parâmetro NextToken para implementar a paginação. No máximo 100 entradas podem ser retornadas em uma única chamada. |
50 |
| NextToken |
string |
Não |
Se você definir o parâmetro Limit e houver entradas excedentes, este parâmetro será retornado. |
1000 |
| EventBusName |
string |
Sim |
O nome do barramento de eventos. |
default |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| Message |
string |
A mensagem de erro retornada se a solicitação falhar. |
Specified parameter Limit is not valid. |
| RequestId |
string |
O ID da solicitação. |
C7043799-F4DA-5290-9249-97C359876D97 |
| Data |
object |
Os dados retornados. |
|
| NextToken |
string |
Se houver entradas excedentes, este parâmetro será retornado. |
1000 |
| Total |
integer |
O número total de entradas. |
6 |
| Rules |
array<object> |
As regras de evento. |
|
|
array<object> |
A regra de evento. |
||
| 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 |
O código de resposta.
|
Success |
| Success |
boolean |
Indica se a solicitação foi bem-sucedida. Valores válidos: true e false. |
true |
Exemplos
Resposta de sucesso
JSON formato
{
"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
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 403 | ServiceNotEnable | Service not enable |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.