Skip to content

feat(apigatewayv2): expose disableExecuteApiEndpoint for WebSocketApi#37882

Draft
MukundaKatta wants to merge 1 commit into
aws:mainfrom
MukundaKatta:codex/aws-cdk-spec-restapi-binary
Draft

feat(apigatewayv2): expose disableExecuteApiEndpoint for WebSocketApi#37882
MukundaKatta wants to merge 1 commit into
aws:mainfrom
MukundaKatta:codex/aws-cdk-spec-restapi-binary

Conversation

@MukundaKatta
Copy link
Copy Markdown

Issue

Closes #35516.

Reason for this change

HttpApi already exposes disableExecuteApiEndpoint, and CfnApi supports DisableExecuteApiEndpoint for API Gateway v2 APIs. WebSocketApi currently does not expose or pass through the property, which prevents users from disabling the default execute-api endpoint without dropping down to lower-level constructs.

Description of changes

  • Adds disableExecuteApiEndpoint to WebSocketApiProps.
  • Passes the value through to the underlying AWS::ApiGatewayV2::Api.
  • Mirrors HttpApi behavior by throwing when apiEndpoint is accessed while the default endpoint is disabled.
  • Adds focused WebSocket API tests for synthesis and apiEndpoint access.

Description of how you validated changes

  • Attempted to run jest test/websocket/api.test.ts --runInBand using the existing local AWS CDK toolchain. The test runner could not start in the fresh worktree because generated core/dist artifacts were missing (../dist/core/cfn-utils-provider.generated).
  • Verified the implementation against the existing HttpApi pattern and checked the synthesized property expectations in the focused test changes.

Checklist

  • My code adheres to the CONTRIBUTING GUIDE and DESIGN GUIDELINES
  • My change is relevant to the issue above
  • I tried to run relevant tests and documented the local environment blocker

@MukundaKatta MukundaKatta requested a deployment to automation May 15, 2026 07:53 — with GitHub Actions Abandoned
@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 May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

1 participant