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

feat(events): API Gateway target #13823

Merged
merged 12 commits into from Apr 23, 2021
Merged

Conversation

hedrall
Copy link
Contributor

@hedrall hedrall commented Mar 26, 2021

close #12708

Added construct class of api gateway target .


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Mar 26, 2021

@nija-at nija-at removed the @aws-cdk/aws-apigateway Related to Amazon API Gateway label Mar 29, 2021
@nija-at nija-at removed their assignment Mar 29, 2021
rix0rrr
rix0rrr previously requested changes Apr 6, 2021
*
* @default - no message group ID (regular queue)
*/
readonly messageGroupId?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not need to be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this is my mistake.

*
* @default the entire EventBridge event
*/
readonly message?: events.RuleTargetInput;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not need to be removed?

Where DOES the payload go?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be called something like postBody ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. This will send to API as post body. I fixed.

*
* @default - no dead-letter queue
*/
readonly deadLetterQueue?: sqs.IQueue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are eventRole and deadletterQueue not inheritable from some common props type?

httpParameters: {
headerParameters: this.props?.headerParameters,
queryStringParameters: this.props?.queryStringParameters,
pathParameterValues: this.props?.pathParameterValues,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not validate pathParameterValues.length agains the number of * in the path ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know if it would be better to validate with CDK or wait for Cloudformation to handle the errors naturally at runtime.
(If it is documented somewhere, I would appreciate it if you could let me know.)
I have implemented validation as you mentioned.

@mergify mergify bot dismissed rix0rrr’s stale review April 6, 2021 23:02

Pull request has been modified.

@hedrall hedrall requested a review from rix0rrr April 7, 2021 06:00
@gitpod-io
Copy link

gitpod-io bot commented Apr 8, 2021

rix0rrr
rix0rrr previously approved these changes Apr 22, 2021
@rix0rrr rix0rrr changed the title feat(events-targets): Add api gateway target feat(events-targets): API Gateway target Apr 22, 2021
@mergify
Copy link
Contributor

mergify bot commented Apr 22, 2021

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

@rix0rrr rix0rrr changed the title feat(events-targets): API Gateway target feat(events): API Gateway target Apr 22, 2021
@github-actions github-actions bot added @aws-cdk/aws-apigateway Related to Amazon API Gateway @aws-cdk/aws-events Related to CloudWatch Events labels Apr 22, 2021
@mergify mergify bot dismissed rix0rrr’s stale review April 23, 2021 05:16

Pull request has been modified.

@hedrall hedrall requested a review from rix0rrr April 23, 2021 05:57
@hedrall
Copy link
Contributor Author

hedrall commented Apr 23, 2021

I resolved conflict.

@mergify
Copy link
Contributor

mergify bot commented Apr 23, 2021

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 4f01a64
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Apr 23, 2021

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

@mergify mergify bot merged commit ce789bf into aws:master Apr 23, 2021
mergify bot pushed a commit that referenced this pull request May 5, 2021
A previous [PR](#13823) added a dependency from the stable module `aws-events-targets` to the experimental module `aws-batch`. Depending on experimental modules is no longer allowed.  In fact, this PR build should have failed when attempting to build `aws-cdk-lib`, preventing it from being merged. However, since the dependency was added but not used, the build succeeded, and the PR was merged.

### Why did we expect the PR build of #13823 to fail?

In the build step of `aws-cdk-lib` we strip all the L2 of experimental modules. This means that when compiling `aws-cdk-lib` the L2 types of experimental modules does not exists, if a stable module reference such a type, the build of `aws-cdk-lib` will fail. 

### Why did the PR build of #13823 succeeded?

It added a dependency on the experimental `aws-batch` but didn't use it.

### What are we doing to prevent this from happening in the future?
 #14249 adds a lint rule that disallow depending on an experimental module.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
john-tipper pushed a commit to john-tipper/aws-cdk that referenced this pull request May 10, 2021
close aws#12708 

Added construct class of api gateway target .

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
john-tipper pushed a commit to john-tipper/aws-cdk that referenced this pull request May 10, 2021
A previous [PR](aws#13823) added a dependency from the stable module `aws-events-targets` to the experimental module `aws-batch`. Depending on experimental modules is no longer allowed.  In fact, this PR build should have failed when attempting to build `aws-cdk-lib`, preventing it from being merged. However, since the dependency was added but not used, the build succeeded, and the PR was merged.

### Why did we expect the PR build of aws#13823 to fail?

In the build step of `aws-cdk-lib` we strip all the L2 of experimental modules. This means that when compiling `aws-cdk-lib` the L2 types of experimental modules does not exists, if a stable module reference such a type, the build of `aws-cdk-lib` will fail. 

### Why did the PR build of aws#13823 succeeded?

It added a dependency on the experimental `aws-batch` but didn't use it.

### What are we doing to prevent this from happening in the future?
 aws#14249 adds a lint rule that disallow depending on an experimental module.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
close aws#12708 

Added construct class of api gateway target .

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
A previous [PR](aws#13823) added a dependency from the stable module `aws-events-targets` to the experimental module `aws-batch`. Depending on experimental modules is no longer allowed.  In fact, this PR build should have failed when attempting to build `aws-cdk-lib`, preventing it from being merged. However, since the dependency was added but not used, the build succeeded, and the PR was merged.

### Why did we expect the PR build of aws#13823 to fail?

In the build step of `aws-cdk-lib` we strip all the L2 of experimental modules. This means that when compiling `aws-cdk-lib` the L2 types of experimental modules does not exists, if a stable module reference such a type, the build of `aws-cdk-lib` will fail. 

### Why did the PR build of aws#13823 succeeded?

It added a dependency on the experimental `aws-batch` but didn't use it.

### What are we doing to prevent this from happening in the future?
 aws#14249 adds a lint rule that disallow depending on an experimental module.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway @aws-cdk/aws-events Related to CloudWatch Events @aws-cdk/aws-events-targets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(events-targets): Add target class for API Gateway target in EventBridge
4 participants