Interface WebSocketAwsIntegrationProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
WebSocketAwsIntegrationProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.94.0 (build b380f01)",
date="2024-03-14T22:21:49.772Z")
@Stability(Stable)
public interface WebSocketAwsIntegrationProps
extends software.amazon.jsii.JsiiSerializable
Props for AWS type integration for an HTTP Api.
Example:
import software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketAwsIntegration;
import software.amazon.awscdk.services.dynamodb.*;
import software.amazon.awscdk.services.iam.*;
Role apiRole;
Table table;
WebSocketApi webSocketApi = new WebSocketApi(this, "mywsapi");
WebSocketStage.Builder.create(this, "mystage")
.webSocketApi(webSocketApi)
.stageName("dev")
.autoDeploy(true)
.build();
webSocketApi.addRoute("$connect", WebSocketRouteOptions.builder()
.integration(WebSocketAwsIntegration.Builder.create("DynamodbPutItem")
.integrationUri(String.format("arn:aws:apigateway:%s:dynamodb:action/PutItem", this.region))
.integrationMethod(HttpMethod.POST)
.credentialsRole(apiRole)
.requestTemplates(Map.of(
"application/json", JSON.stringify(Map.of(
"TableName", table.getTableName(),
"Item", Map.of(
"id", Map.of(
"S", "$context.requestId"))))))
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forWebSocketAwsIntegrationPropsstatic final classAn implementation forWebSocketAwsIntegrationProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default IRoleSpecifies the credentials role required for the integration.Specifies the integration's HTTP method type.Integration URI.default PassthroughBehaviorSpecifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.The request parameters that API Gateway sends with the backend request.A map of Apache Velocity templates that are applied on the request payload.default StringThe template selection expression for the integration.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getIntegrationMethod
Specifies the integration's HTTP method type. -
getIntegrationUri
Integration URI. -
getCredentialsRole
Specifies the credentials role required for the integration.Default: - No credential role provided.
-
getPassthroughBehavior
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
Default: - No passthrough behavior required.
-
getRequestParameters
The request parameters that API Gateway sends with the backend request.Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value.
Default: - No request parameter provided to the integration.
-
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.
-
getTemplateSelectionExpression
The template selection expression for the integration.Default: - No template selection expression provided.
-
builder
-