Class WebSocketIntegrationProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.WebSocketIntegrationProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WebSocketIntegrationProps>
- Enclosing interface:
WebSocketIntegrationProps
@Stability(Stable)
public static final class WebSocketIntegrationProps.Builder
extends Object
implements software.amazon.jsii.Builder<WebSocketIntegrationProps>
A builder for
WebSocketIntegrationProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.contentHandling(ContentHandling contentHandling) Sets the value ofWebSocketIntegrationProps.getContentHandling()credentialsRole(IRole credentialsRole) Sets the value ofWebSocketIntegrationProps.getCredentialsRole()integrationMethod(String integrationMethod) Sets the value ofWebSocketIntegrationProps.getIntegrationMethod()integrationType(WebSocketIntegrationType integrationType) Sets the value ofWebSocketIntegrationProps.getIntegrationType()integrationUri(String integrationUri) Sets the value ofWebSocketIntegrationProps.getIntegrationUri()passthroughBehavior(PassthroughBehavior passthroughBehavior) Sets the value ofWebSocketIntegrationProps.getPassthroughBehavior()requestParameters(Map<String, String> requestParameters) Sets the value ofWebSocketIntegrationProps.getRequestParameters()requestTemplates(Map<String, String> requestTemplates) Sets the value ofWebSocketIntegrationProps.getRequestTemplates()templateSelectionExpression(String templateSelectionExpression) Sets the value ofWebSocketIntegrationProps.getTemplateSelectionExpression()Sets the value ofWebSocketIntegrationProps.getTimeout()webSocketApi(IWebSocketApi webSocketApi) Sets the value ofWebSocketIntegrationProps.getWebSocketApi()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
integrationType
@Stability(Stable) public WebSocketIntegrationProps.Builder integrationType(WebSocketIntegrationType integrationType) Sets the value ofWebSocketIntegrationProps.getIntegrationType()- Parameters:
integrationType- Integration type. This parameter is required.- Returns:
this
-
integrationUri
Sets the value ofWebSocketIntegrationProps.getIntegrationUri()- Parameters:
integrationUri- Integration URI. This parameter is required.- Returns:
this
-
webSocketApi
@Stability(Stable) public WebSocketIntegrationProps.Builder webSocketApi(IWebSocketApi webSocketApi) Sets the value ofWebSocketIntegrationProps.getWebSocketApi()- Parameters:
webSocketApi- The WebSocket API to which this integration should be bound. This parameter is required.- Returns:
this
-
contentHandling
@Stability(Stable) public WebSocketIntegrationProps.Builder contentHandling(ContentHandling contentHandling) Sets the value ofWebSocketIntegrationProps.getContentHandling()- Parameters:
contentHandling- Specifies how to handle response payload content type conversions.- Returns:
this
-
credentialsRole
Sets the value ofWebSocketIntegrationProps.getCredentialsRole()- Parameters:
credentialsRole- Specifies the IAM role required for the integration.- Returns:
this
-
integrationMethod
@Stability(Stable) public WebSocketIntegrationProps.Builder integrationMethod(String integrationMethod) Sets the value ofWebSocketIntegrationProps.getIntegrationMethod()- Parameters:
integrationMethod- Specifies the integration's HTTP method type.- Returns:
this
-
passthroughBehavior
@Stability(Stable) public WebSocketIntegrationProps.Builder passthroughBehavior(PassthroughBehavior passthroughBehavior) Sets the value ofWebSocketIntegrationProps.getPassthroughBehavior()- Parameters:
passthroughBehavior- 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.- Returns:
this
-
requestParameters
@Stability(Stable) public WebSocketIntegrationProps.Builder requestParameters(Map<String, String> requestParameters) Sets the value ofWebSocketIntegrationProps.getRequestParameters()- Parameters:
requestParameters- 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.- Returns:
this
-
requestTemplates
@Stability(Stable) public WebSocketIntegrationProps.Builder requestTemplates(Map<String, String> requestTemplates) Sets the value ofWebSocketIntegrationProps.getRequestTemplates()- Parameters:
requestTemplates- A map of Apache Velocity templates that are applied on the request payload.{ "application/json": "{ \"statusCode\": 200 }" }- Returns:
this
-
templateSelectionExpression
@Stability(Stable) public WebSocketIntegrationProps.Builder templateSelectionExpression(String templateSelectionExpression) Sets the value ofWebSocketIntegrationProps.getTemplateSelectionExpression()- Parameters:
templateSelectionExpression- The template selection expression for the integration.- Returns:
this
-
timeout
Sets the value ofWebSocketIntegrationProps.getTimeout()- Parameters:
timeout- The maximum amount of time an integration will run before it returns without a response. Must be between 50 milliseconds and 29 seconds.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<WebSocketIntegrationProps>- Returns:
- a new instance of
WebSocketIntegrationProps - Throws:
NullPointerException- if any required attribute was not provided
-