Commit 3d7023d
authored
fix: onEvent function to pass all the options to rule resource (#35829)
### Issue # (if applicable)
N/A
### Reason for this change
`onEvent()` has a lot of options other than description e.g. `ruleName` `detail` etc..
The old code didn't pass those values to rule, so it will never be propagated properly, so the consumer of this method will think that we're respecting their options, but in real we're discarding it.
### Description of changes
Creating the rule first with all the options so all the options from the consumer get propagated properly to the rule, then add the specific things that you want.
### Describe any new or updated permissions being added
N/A
### Description of how you validated changes
Add unit tests
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent dad112e commit 3d7023d
File tree
4 files changed
+34
-18
lines changed- packages/@aws-cdk
- aws-bedrock-alpha
- bedrock/agents
- test/bedrock/agents
- example-construct-library
- lib
- test
4 files changed
+34
-18
lines changedLines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
144 | 141 | | |
145 | 142 | | |
146 | 143 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 144 | + | |
151 | 145 | | |
152 | 146 | | |
153 | 147 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
299 | 307 | | |
300 | 308 | | |
| 309 | + | |
301 | 310 | | |
302 | 311 | | |
303 | 312 | | |
304 | 313 | | |
305 | 314 | | |
| 315 | + | |
| 316 | + | |
306 | 317 | | |
307 | 318 | | |
308 | 319 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 204 | + | |
209 | 205 | | |
210 | 206 | | |
211 | 207 | | |
| |||
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
125 | 135 | | |
126 | 136 | | |
| 137 | + | |
| 138 | + | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
| 142 | + | |
130 | 143 | | |
| 144 | + | |
| 145 | + | |
131 | 146 | | |
132 | 147 | | |
133 | 148 | | |
| |||
0 commit comments