feat(apigatewayv2): expose disableExecuteApiEndpoint option in WebSocketApi configuration#35526
feat(apigatewayv2): expose disableExecuteApiEndpoint option in WebSocketApi configuration#35526
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter fails with the following errors:
❌ Features must contain a change to a README file.
❌ Features must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
|
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing To prevent automatic closure:
This PR will automatically close in 14 days if no action is taken. |
|
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue #35516
Closes #35516
Reason for this change
This change addresses a feature request to add the
disableExecuteApiEndpointproperty to the WebSocketApi construct. This property allows users to disable the default execute-api endpoint and enforce the use of a custom domain name. The underlyingCfnApiconstruct already supports this property, and theHttpApiconstruct in the same module already implements it, so this change provides consistency across API Gateway v2 constructs.Description of changes
I've made the following code changes to expose the disableExecuteApiEndpoint property in the WebSocketApi construct:
disableExecuteApiEndpoint?: booleanproperty to the WebSocketApiProps interface.disableExecuteApiEndpoint?: booleanproperty to the WebSocketApi class.disableExecuteApiEndpointproperty to the underlying CfnApi construct's properties.apiEndpointin the WebSocketApi class to be private._apiEndpointproperty that throws a ValidationError ifdisableExecuteApiEndpointis set to true. This prevents the use of a disabled endpoint.Describe any new or updated permissions being added
None
Description of how you validated changes
I validated these changes by adding two unit tests and one integration test. The unit tests confirm that the
disableExecuteApiEndpointproperty is correctly set on the CloudFormation template and that theapiEndpointgetter throws an error as expected. The integration test successfully deploys a stack with the new property enabled. All tests pass.My steps to verify:
$ npx lerna run build --skip-nx-cache.$ npx jest packages/aws-cdk-lib/aws-apigatewayv2/test/websocket/api.test.ts.$ yarn integ test/aws-apigatewayv2-integrations/test/websocket/integ.disable-execute-api-endpoint.js --update-on-failedChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license