WebSocketRouteIntegrationConfig

class aws_cdk.aws_apigatewayv2.WebSocketRouteIntegrationConfig(*, type, uri, content_handling=None, credentials_role=None, method=None, passthrough_behavior=None, request_parameters=None, request_templates=None, template_selection_expression=None, timeout=None)

Bases: object

Config returned back as a result of the bind.

Parameters:
  • type (WebSocketIntegrationType) – Integration type.

  • uri (str) – Integration URI.

  • content_handling (Optional[ContentHandling]) – Specifies how to handle response payload content type conversions. Default: - The response payload will be passed through from the integration response to the route response or method response without modification.

  • credentials_role (Optional[IRole]) – Credentials role. Default: - No role provided.

  • method (Optional[str]) – Integration method. Default: - No integration method.

  • passthrough_behavior (Optional[PassthroughBehavior]) – Integration passthrough behaviors. Default: - No pass through bahavior.

  • request_parameters (Optional[Mapping[str, str]]) – Request parameters. Default: - No request parameters provided.

  • request_templates (Optional[Mapping[str, str]]) – Request template. Default: - No request template provided.

  • template_selection_expression (Optional[str]) – Template selection expression. Default: - No template selection expression.

  • timeout (Optional[Duration]) – The maximum amount of time an integration will run before it returns without a response. Must be between 50 milliseconds and 29 seconds. Default: Duration.seconds(29)

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_apigatewayv2 as apigatewayv2
from aws_cdk import aws_iam as iam

# role: iam.Role

web_socket_route_integration_config = apigatewayv2.WebSocketRouteIntegrationConfig(
    type=apigatewayv2.WebSocketIntegrationType.AWS_PROXY,
    uri="uri",

    # the properties below are optional
    content_handling=apigatewayv2.ContentHandling.CONVERT_TO_BINARY,
    credentials_role=role,
    method="method",
    passthrough_behavior=apigatewayv2.PassthroughBehavior.WHEN_NO_MATCH,
    request_parameters={
        "request_parameters_key": "requestParameters"
    },
    request_templates={
        "request_templates_key": "requestTemplates"
    },
    template_selection_expression="templateSelectionExpression",
    timeout=cdk.Duration.minutes(30)
)

Attributes

content_handling

Specifies how to handle response payload content type conversions.

Default:

  • The response payload will be passed through from the integration response to

the route response or method response without modification.

credentials_role

Credentials role.

Default:
  • No role provided.

method

Integration method.

Default:
  • No integration method.

passthrough_behavior

Integration passthrough behaviors.

Default:
  • No pass through bahavior.

request_parameters

Request parameters.

Default:
  • No request parameters provided.

request_templates

Request template.

Default:
  • No request template provided.

template_selection_expression

Template selection expression.

Default:
  • No template selection expression.

timeout

The maximum amount of time an integration will run before it returns without a response.

Must be between 50 milliseconds and 29 seconds.

Default:

Duration.seconds(29)

type

Integration type.

uri

Integration URI.