aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.71k stars 3.94k forks source link

(aws-scheduler-targets-alpha): add support for universal targets #32328

Open sakurai-ryo opened 1 day ago

sakurai-ryo commented 1 day ago

Describe the feature

EventBridge Scheduler has a mechanism called Universal Target that calls a wide range of AWS APIs. Supporting this mechanism in L2 Construct will make it easier to configure EventBridge Scheduler. https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-universal.html

Use Case

Currently, scheduler-targets only supports templated targets such as StartBuild and does not support universal targets. If supported in L2, there are various usecases, such as stopping RDS.

Proposed Solution

Create a new UniversalTarget class that extends ScheduleTargetBase.

Other Information

No response

Acknowledgements

CDK version used

2.171.0

Environment details (OS name and version, etc.)

macos

khushail commented 10 hours ago

Thanks @sakurai-ryo for requesting this and volunteering for PR contribution. I can see that Cloudformation supports Universal as well as templated targets so it would be good to have this. Looking forward to your PR!