interface WebSocketStageProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Apigatewayv2.WebSocketStageProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#WebSocketStageProps |
Java | software.amazon.awscdk.services.apigatewayv2.WebSocketStageProps |
Python | aws_cdk.aws_apigatewayv2.WebSocketStageProps |
TypeScript (source) | aws-cdk-lib » aws_apigatewayv2 » WebSocketStageProps |
Properties to initialize an instance of WebSocketStage.
Example
import * as logs from 'aws-cdk-lib/aws-logs';
declare const httpApi: apigwv2.HttpApi;
declare const webSocketApi : apigwv2.WebSocketApi;
declare const logGroup: logs.LogGroup;
new apigwv2.HttpStage(this, 'HttpStage', {
httpApi,
accessLogSettings: {
destination: new apigwv2.LogGroupLogDestination(logGroup),
},
});
new apigwv2.WebSocketStage(this, 'WebSocketStage', {
webSocketApi,
stageName: 'dev',
accessLogSettings: {
destination: new apigwv2.LogGroupLogDestination(logGroup),
},
});
Properties
| Name | Type | Description |
|---|---|---|
| stage | string | The name of the stage. |
| web | IWeb | The WebSocket API to which this stage is associated. |
| access | IAccess | Settings for access logging. |
| auto | boolean | Whether updates to an API automatically trigger a new deployment. |
| description? | string | The description for the API stage. |
| detailed | boolean | Specifies whether detailed metrics are enabled. |
| domain | Domain | The options for custom domain and api mapping. |
| stage | { [string]: string } | Stage variables for the stage. These are key-value pairs that you can define and use in your API routes. |
| throttle? | Throttle | Throttle settings for the routes of this stage. |
stageName
Type:
string
The name of the stage.
webSocketApi
Type:
IWeb
The WebSocket API to which this stage is associated.
accessLogSettings?
Type:
IAccess
(optional, default: No access logging)
Settings for access logging.
autoDeploy?
Type:
boolean
(optional, default: false)
Whether updates to an API automatically trigger a new deployment.
description?
Type:
string
(optional, default: no description)
The description for the API stage.
detailedMetricsEnabled?
Type:
boolean
(optional, default: false)
Specifies whether detailed metrics are enabled.
domainMapping?
Type:
Domain
(optional, default: no custom domain and api mapping configuration)
The options for custom domain and api mapping.
stageVariables?
Type:
{ [string]: string }
(optional, default: No stage variables)
Stage variables for the stage. These are key-value pairs that you can define and use in your API routes.
The allowed characters for variable names and the required pattern for variable values are specified here: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-apigateway-stage.html#cfn-apigateway-stage-variables
throttle?
Type:
Throttle
(optional, default: no throttling configuration)
Throttle settings for the routes of this stage.

.NET
Go
Java
Python
TypeScript (