Skip to content

feat(apigatewayv2): expose disableExecuteApiEndpoint option in WebSocketApi configuration#35526

Closed
bimnett wants to merge 3 commits intoaws:mainfrom
bimnett:feat-35516-expose-disable-execute-api-endpoint-prop
Closed

feat(apigatewayv2): expose disableExecuteApiEndpoint option in WebSocketApi configuration#35526
bimnett wants to merge 3 commits intoaws:mainfrom
bimnett:feat-35516-expose-disable-execute-api-endpoint-prop

Conversation

@bimnett
Copy link
Copy Markdown

@bimnett bimnett commented Sep 19, 2025

Issue #35516

Closes #35516

Reason for this change

This change addresses a feature request to add the disableExecuteApiEndpoint property 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 underlying CfnApi construct already supports this property, and the HttpApi construct 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:

  • Added a disableExecuteApiEndpoint?: boolean property to the WebSocketApiProps interface.
  • Added a disableExecuteApiEndpoint?: boolean property to the WebSocketApi class.
  • Passed the disableExecuteApiEndpoint property to the underlying CfnApi construct's properties.
  • Modified the public attribute apiEndpoint in the WebSocketApi class to be private.
  • Added a getter for the private _apiEndpoint property that throws a ValidationError if disableExecuteApiEndpoint is 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 disableExecuteApiEndpoint property is correctly set on the CloudFormation template and that the apiEndpoint getter throws an error as expected. The integration test successfully deploys a stack with the new property enabled. All tests pass.

My steps to verify:

  1. Successfully building the project with: $ npx lerna run build --skip-nx-cache.
  2. Running unit tests with: $ npx jest packages/aws-cdk-lib/aws-apigatewayv2/test/websocket/api.test.ts.
  3. Running integration test with: $ yarn integ test/aws-apigatewayv2-integrations/test/websocket/integ.disable-execute-api-endpoint.js --update-on-failed

Checklist


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

@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Sep 19, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team September 19, 2025 02:38
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Sep 19, 2025
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

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.

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

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:

  • Resume work on the PR
  • OR request an exemption by adding a comment containing 'Exemption Request' with justification e.x "Exemption Request: "
  • OR request clarification by adding a comment containing 'Clarification Request' with a question e.x "Clarification Request: "

This PR will automatically close in 14 days if no action is taken.

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

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.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Oct 25, 2025
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

awsapigatewayv2: Expose disableExecuteApiEndpoint option in WebSocketApi configuration

2 participants