describeRule method
Describes the specified rule.
DescribeRule does not list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.
May throw InternalException.
May throw ResourceNotFoundException.
Parameter name :
The name of the rule.
Parameter eventBusName :
The name or ARN of the event bus associated with the rule. If you omit
this, the default event bus is used.
Implementation
Future<DescribeRuleResponse> describeRule({
required String name,
String? eventBusName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.DescribeRule'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (eventBusName != null) 'EventBusName': eventBusName,
},
);
return DescribeRuleResponse.fromJson(jsonResponse.body);
}