-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aws-apigatewayv2): add support for api-key in websocket apis
- Loading branch information
1 parent
d21561a
commit b45ca7f
Showing
6 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.api-default.expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Resources": { | ||
"MyWebsocketApiEBAC53DF": { | ||
"Type": "AWS::ApiGatewayV2::Api", | ||
"Properties": { | ||
"ApiKeySelectionExpression": "$request.header.x-api-key", | ||
"Name": "MyWebsocketApi", | ||
"ProtocolType": "WEBSOCKET", | ||
"RouteSelectionExpression": "$request.body.action" | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.api-default.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env node | ||
import * as cdk from '@aws-cdk/core'; | ||
import * as apigw from '../../lib'; | ||
|
||
const app = new cdk.App(); | ||
|
||
const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2-websockets'); | ||
|
||
new apigw.WebSocketApi(stack, 'MyWebsocketApi'); | ||
|
||
app.synth(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters