interface WebSocketStageProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Apigatewayv2.WebSocketStageProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#WebSocketStageProps |
![]() | software.amazon.awscdk.services.apigatewayv2.WebSocketStageProps |
![]() | aws_cdk.aws_apigatewayv2.WebSocketStageProps |
![]() | aws-cdk-lib » aws_apigatewayv2 » WebSocketStageProps |
Properties to initialize an instance of WebSocketStage
.
Example
import { WebSocketLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi');
new apigwv2.WebSocketStage(this, 'mystage', {
webSocketApi,
stageName: 'dev',
autoDeploy: true,
});
declare const messageHandler: lambda.Function;
webSocketApi.addRoute('sendMessage', {
integration: new WebSocketLambdaIntegration('SendMessageIntegration', messageHandler),
});
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.