Class WebSocketMockIntegration
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.WebSocketRouteIntegration
software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketMockIntegration
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:04.456Z")
@Stability(Stable)
public class WebSocketMockIntegration
extends WebSocketRouteIntegration
Mock WebSocket Integration.
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 TypeClassDescriptionstatic final classA fluent builder forWebSocketMockIntegration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWebSocketMockIntegration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedWebSocketMockIntegration(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind(WebSocketRouteIntegrationBindOptions options) Bind this integration to the route.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
WebSocketMockIntegration
protected WebSocketMockIntegration(software.amazon.jsii.JsiiObjectRef objRef) -
WebSocketMockIntegration
protected WebSocketMockIntegration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
WebSocketMockIntegration
@Stability(Stable) public WebSocketMockIntegration(@NotNull String id, @Nullable WebSocketMockIntegrationProps props) - Parameters:
id- id of the underlying integration construct. This parameter is required.props-
-
WebSocketMockIntegration
- Parameters:
id- id of the underlying integration construct. This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public WebSocketRouteIntegrationConfig bind(@NotNull WebSocketRouteIntegrationBindOptions options) Bind this integration to the route.- Specified by:
bindin classWebSocketRouteIntegration- Parameters:
options- This parameter is required.
-