HttpIntegrationProps

class aws_cdk.aws_apigateway.HttpIntegrationProps(*, http_method=None, options=None, proxy=None)

Bases: object

Parameters:
  • http_method (Optional[str]) – HTTP method to use when invoking the backend URL. Default: GET

  • options (Union[IntegrationOptions, Dict[str, Any], None]) – Integration options, such as request/resopnse mapping, content handling, etc. Default: defaults based on IntegrationOptions defaults

  • proxy (Optional[bool]) – Determines whether to use proxy integration or custom integration. Default: true

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_apigateway as apigateway
from aws_cdk import aws_iam as iam

# role: iam.Role
# vpc_link: apigateway.VpcLink

http_integration_props = apigateway.HttpIntegrationProps(
    http_method="httpMethod",
    options=apigateway.IntegrationOptions(
        cache_key_parameters=["cacheKeyParameters"],
        cache_namespace="cacheNamespace",
        connection_type=apigateway.ConnectionType.INTERNET,
        content_handling=apigateway.ContentHandling.CONVERT_TO_BINARY,
        credentials_passthrough=False,
        credentials_role=role,
        integration_responses=[apigateway.IntegrationResponse(
            status_code="statusCode",

            # the properties below are optional
            content_handling=apigateway.ContentHandling.CONVERT_TO_BINARY,
            response_parameters={
                "response_parameters_key": "responseParameters"
            },
            response_templates={
                "response_templates_key": "responseTemplates"
            },
            selection_pattern="selectionPattern"
        )],
        passthrough_behavior=apigateway.PassthroughBehavior.WHEN_NO_MATCH,
        request_parameters={
            "request_parameters_key": "requestParameters"
        },
        request_templates={
            "request_templates_key": "requestTemplates"
        },
        timeout=cdk.Duration.minutes(30),
        vpc_link=vpc_link
    ),
    proxy=False
)

Attributes

http_method

HTTP method to use when invoking the backend URL.

Default:

GET

options

Integration options, such as request/resopnse mapping, content handling, etc.

Default:

defaults based on IntegrationOptions defaults

proxy

Determines whether to use proxy integration or custom integration.

Default:

true