Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(scheduler-targets-alpha): Make the event bus in EventBridgePutEventsEntry optional #30205

Open
2 tasks
daschaa opened this issue May 15, 2024 · 2 comments
Open
2 tasks
Labels
@aws-cdk/aws-events Related to CloudWatch Events effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@daschaa
Copy link
Contributor

daschaa commented May 15, 2024

Describe the feature

When creating a EventBridgePutEvents target for a Schedule the event entry has to be of type EventBridgePutEventsEntry. The shape of the interface looks like this:

export interface EventBridgePutEventsEntry {
    readonly detail: ScheduleTargetInput;
    readonly detailType: string;
    readonly eventBus: events.IEventBus;
    readonly source: string;
}

For me as an user it would be good to have the eventBus as an optional property. So when the eventBus is not defined, the default event bus is used.

Use Case

Creating a target without specifying an event bus (just use the default one).

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.141.0

Environment details (OS name and version, etc.)

Mac

@daschaa daschaa added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@github-actions github-actions bot added the @aws-cdk/aws-events Related to CloudWatch Events label May 15, 2024
@pahud
Copy link
Contributor

pahud commented May 16, 2024

Makes sense to me. What value should we assign for the default event bus if undefined? Did you find any doc about it?

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 16, 2024
@daschaa
Copy link
Contributor Author

daschaa commented May 16, 2024

@pahud I did not find anything about that. So the synthesized construct would need to have the ARN of the default event bus.
Since the service and resource part of the ARN are static, it should be doable to build the ARN with the environments region and account id.
The challenge here is that we (if I see it correctly) don't have all of the information in the super call of the constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-events Related to CloudWatch Events effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

2 participants