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(apigateway): disable execute api endpoint #14526

Merged
merged 4 commits into from
Jun 11, 2021
Merged

Conversation

spacekitcat
Copy link
Contributor

@spacekitcat spacekitcat commented May 4, 2021

I noticed that CloudFormation exposes the field DisableExecuteApiEndpoint on RestApi, but it isn't wired up in CDK (like it is for ApiGatewayv2). This would clean up our infrastructure code quite nicely, were you to accept it into main.

I've verified that CDK omits the field from the CloudFormation (CF) templates if it isn't defined and sets the specified value when it is. I also verified that when those CF templates are deployed to AWS, the default execute endpoint toggle is flipped in API Gateway.

There's also a unit test, I've verified that the fail condition works if the answer is incorrect.

Many thanks.


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 May 4, 2021

@github-actions github-actions bot added the @aws-cdk/aws-apigateway Related to Amazon API Gateway label May 4, 2021
@nija-at nija-at changed the title feat(apigateway): expose DisableExecuteApiEndpoint via RestApi constructor feat(apigateway): disable execute api endpoint May 6, 2021
nija-at
nija-at previously approved these changes May 6, 2021
Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks for the PR.

@nija-at nija-at added effort/small Small work item – less than a day of effort p2 labels May 6, 2021
@spacekitcat
Copy link
Contributor Author

Awesome, cheers! :)

@caruso-billfire
Copy link

Any idea when this will get merged? We are in need of this feature.
Thank you

@nija-at nija-at added the pr-linter/exempt-readme The PR linter will not require README changes label Jun 11, 2021
@mergify mergify bot dismissed nija-at’s stale review June 11, 2021 09:28

Pull request has been modified.

@mergify
Copy link
Contributor

mergify bot commented Jun 11, 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: bd25373
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit b3a7d5b into aws:master Jun 11, 2021
@mergify
Copy link
Contributor

mergify bot commented Jun 11, 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).

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
I noticed that [CloudFormation exposes the field DisableExecuteApiEndpoint on RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html), but it isn't wired up in CDK (like it is for ApiGatewayv2). This would clean up our infrastructure code quite nicely, were you to accept it into main.

I've verified that CDK omits the field from the CloudFormation (CF) templates if it isn't defined and sets the specified value when it is. I also verified that when those CF templates are deployed to AWS, the default execute endpoint toggle is flipped in API Gateway.

There's also a unit test, I've verified that the fail condition works if the answer is incorrect.

Many thanks.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this pull request Sep 20, 2022
…rty (#22133)

In this [PR](#14526) the disableExecuteApiEndpoint property was added to RestApiBaseProps, which is used by both RestApi and SpecRestApi. The property is propagated to the resulting CfnRestApi when specified for a RestApi, but is ignored when specified for a SpecRestApi.

Closes #21295.


----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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 effort/small Small work item – less than a day of effort p2 pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants