Skip to content

(aws-events): IApiDestination is missing grantInvokeApiDestination #30386

@WtfJoke

Description

@WtfJoke

Describe the feature

The IApiDestination provides currently no grant* method. This makes it harder/more cumbersome to invoke an API Destination from a given construct.

The permission needed to invoke an API Destination: events:InvokeApiDestination

Use Case

I was building the solution for #29386 and when I wrote the grantPush functionality in there I was missing the grantInvokeApiDestination method of IApiDestination

Proposed Solution

Add method grantInvokeApiDestination to IApiDestination and implement it in ApiDestination.

Method signature could look like that:
public grantInvokeApiDestination(grantee: iam.IGrantable): iam.Grant.

It will allow the action events:InvokeApiDestination for the grantee.

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.136.0

Environment details (OS name and version, etc.)

windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eventsRelated to CloudWatch Eventseffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions