Interface WebSocketMockIntegrationProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
WebSocketMockIntegrationProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:31.824Z")
@Stability(Stable)
public interface WebSocketMockIntegrationProps
extends software.amazon.jsii.JsiiSerializable
Props for Mock type integration for a WebSocket Api.
Example:
import software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketMockIntegration;
WebSocketApi webSocketApi = new WebSocketApi(this, "mywsapi");
WebSocketStage.Builder.create(this, "mystage")
.webSocketApi(webSocketApi)
.stageName("dev")
.autoDeploy(true)
.build();
webSocketApi.addRoute("sendMessage", WebSocketRouteOptions.builder()
.integration(WebSocketMockIntegration.Builder.create("DefaultIntegration")
.requestTemplates(Map.of("application/json", JSON.stringify(Map.of("statusCode", 200))))
.templateSelectionExpression("\\$default")
.build())
.returnResponse(true)
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forWebSocketMockIntegrationPropsstatic final classAn implementation forWebSocketMockIntegrationProps -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getRequestTemplates
A map of Apache Velocity templates that are applied on the request payload.{ "application/json": "{ \"statusCode\": 200 }" }Default: - No request template provided to the integration.
- See Also:
-
getTemplateSelectionExpression
The template selection expression for the integration.Default: - No template selection expression provided.
-
builder
-