-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(aws-events): ApiDestination missing fromArn methods for existing API destinations #29942
(aws-events): ApiDestination missing fromArn methods for existing API destinations #29942
Comments
thanks @keenangraham for reporting this. |
### Issue # (if applicable) Closes #29942 ### Reason for this change Allows existing API Destinations to be imported and attached to additional rules ### Description of changes * Added `ApiDestination.fromApiDestinationAttributes` method ### Description of how you validated changes Added unit and integ 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*
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
ApiDestination
doesn't have any way to reference an existing EventBridge API destination:aws-cdk/packages/aws-cdk-lib/aws-events/lib/api-destination.ts
Lines 70 to 107 in f00f918
This is problematic because the
aws-events-targets.ApiDestination
expects anaws-events.ApiDestination
:aws-cdk/packages/aws-cdk-lib/aws-events-targets/lib/api-destination.ts
Line 63 in f00f918
I would like to have multiple
Rules
targeting the same (existing)ApiDestination
. In my case the API destination is a Slack webhook with a secret in the URL endpoint.Expected Behavior
To be able to reference an existing API destination by an ARN, like in
Connection
:aws-cdk/packages/aws-cdk-lib/aws-events/lib/connection.ts
Line 303 in f00f918
Or
Eventbus
:aws-cdk/packages/aws-cdk-lib/aws-events/lib/event-bus.ts
Line 171 in f00f918
Current Behavior
No method to reference existing EventBridge API destination by ARN.
Reproduction Steps
Try to import existing API destination.
Possible Solution
Add
ImportedApiConnection
and method.Additional Information/Context
No response
CDK CLI Version
2.138.0
Framework Version
No response
Node.js Version
20
OS
Sonoma
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: