feat(servicecatalog): Add stack event notification constraint#15610
feat(servicecatalog): Add stack event notification constraint#15610mergify[bot] merged 9 commits intoaws:masterfrom
Conversation
skinny85
left a comment
There was a problem hiding this comment.
Looks great! A few minor comments.
| * @param product A service catalog product. | ||
| * @param topics A list of SNS Topics to receive notifications on events related to the provisioned product. | ||
| */ | ||
| addEventNotifications(product: IProduct, topics: sns.ITopic[], options?: CommonConstraintOptions): void; |
There was a problem hiding this comment.
- Not a huge fan of this name. How about
notify(Topic(s))On(Stack)Events()? - I don't love the ergonomics of the
topicsparameter right now - if the most common case is subscribing a single Topic to the events, like I suspect it is, it's not very easy. Maybe we should have two methods - one with a singular name (notifyTopicOnStackEvents()) that takes in a singlesns.Topic, and one with a plural name (notifyTopicsOnStackEvents()) that takes insns.Topic[]?
There was a problem hiding this comment.
- sure - I liked the notify verbiage but didn't like what I had for what would be the stackEvents part. I also thought maybe something like
subscribeToEvents. - I got my guidance before based on the original construct which took a list. I don't have many good examples, but using the singular version might be easier here if that hypothesis is true. For one it simplifies the code since we don't need the for loop. The only concern I had was that if you had more than one topic and more than one portfolio-product association it would get very not DRY. Adding just the singular version first sounds fine.
There was a problem hiding this comment.
changed this to singular.
packages/@aws-cdk/aws-servicecatalog/lib/private/association-manager.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-servicecatalog/lib/private/association-manager.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-servicecatalog/lib/private/association-manager.ts
Outdated
Show resolved
Hide resolved
|
is this good to go? |
Could you resolve the conflicts with |
Add event notification constraint. Allows users to subscribe AWS `SNS` topics to stack updates on their products. Co-authored-by: Dillon Ponzo <dponzo18@gmail.com>
|
fixed, didn't see merge conflicts before. |
packages/@aws-cdk/aws-servicecatalog/lib/private/association-manager.ts
Outdated
Show resolved
Hide resolved
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Add stack event notification constraint.
Allows users to subscribe AWS
SNStopics to stack updates on their products.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
Co-authored-by: Dillon Ponzo dponzo18@gmail.com