interface WebSocketApiProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Apigatewayv2.WebSocketApiProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#WebSocketApiProps |
![]() | software.amazon.awscdk.services.apigatewayv2.WebSocketApiProps |
![]() | aws_cdk.aws_apigatewayv2.WebSocketApiProps |
![]() | aws-cdk-lib » aws_apigatewayv2 » WebSocketApiProps |
Props for WebSocket API.
Example
const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi',{
apiKeySelectionExpression: apigwv2.WebSocketApiKeySelectionExpression.HEADER_X_API_KEY,
});
Properties
Name | Type | Description |
---|---|---|
api | Web | An API key selection expression. |
api | string | Name for the WebSocket API resource. |
connect | Web | Options to configure a '$connect' route. |
default | Web | Options to configure a '$default' route. |
description? | string | The description of the API. |
disable | boolean | Avoid validating models when creating a deployment. |
disconnect | Web | Options to configure a '$disconnect' route. |
ip | Ip | The IP address types that can invoke the API. |
route | string | The route selection expression for the API. |
apiKeySelectionExpression?
Type:
Web
(optional, default: Key is not required to access these APIs)
An API key selection expression.
Providing this option will require an API Key be provided to access the API.
apiName?
Type:
string
(optional, default: id of the WebSocketApi construct.)
Name for the WebSocket API resource.
connectRouteOptions?
Type:
Web
(optional, default: no '$connect' route configured)
Options to configure a '$connect' route.
defaultRouteOptions?
Type:
Web
(optional, default: no '$default' route configured)
Options to configure a '$default' route.
description?
Type:
string
(optional, default: none)
The description of the API.
disableSchemaValidation?
Type:
boolean
(optional, default: false)
Avoid validating models when creating a deployment.
disconnectRouteOptions?
Type:
Web
(optional, default: no '$disconnect' route configured)
Options to configure a '$disconnect' route.
ipAddressType?
Type:
Ip
(optional, default: undefined - AWS default is IPV4)
The IP address types that can invoke the API.
See also: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-ip-address-type.html
routeSelectionExpression?
Type:
string
(optional, default: '$request.body.action')
The route selection expression for the API.