aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

Documentation for !Ref of an AWS::Events::Rule not fully documented

Open
#1,131 2 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::Events::Rule

### Resource name

_No response_

### Reference Link

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#aws-resource-events-rule-return-values

### Details

In https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#aws-resource-events-rule-return-values, the return value for the !Ref of a Rule is

> Ref returns event rule ID, such as `mystack-ScheduledRule-ABCDEFGHIJK`

I have seen that Rules return "busname|rulename" as the value of !Ref. I am actually using the return value of !Ref on an Event this to monitor the rule like this:
```
BusInvocationErrors:
Type: AWS::CloudWatch::Alarm
Properties:
ActionsEnabled: true
AlarmDescription: !Sub 'FailedInvocations in ${AWS::StackName}'
ComparisonOperator: GreaterThanThreshold
Dimensions:
- Name: EventBusName
Value: !Select [ 0, !Split [ '|', !Ref Rule ] ]
- Name: RuleName
Value: !Select [ 1, !Split [ '|', !Ref Rule ] ]
Period: 60
EvaluationPeriods: 1
MetricName: FailedInvocations
Namespace: AWS/Events
Statistic: Sum
```
I would suggest that the return value be correctly documented.

Contributor guide

Open the contributing guide

Research direction

Start with the AWS CloudFormation AWS::Events::Rule return-values section linked in the issue and verify the observed !Ref format against the current documentation. Done means the page accurately documents the returned value, including the event bus and rule-name format; the issue does not identify a repository file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.