Metadata-Version: 2.1
Name: aws-cdk.aws-apigatewayv2-integrations
Version: 1.89.0
Summary: Integrations for AWS APIGateway V2
Home-page: https://github.com/aws/aws-cdk
Author: Amazon Web Services
License: Apache-2.0
Project-URL: Source, https://github.com/aws/aws-cdk.git
Description: # AWS APIGatewayv2 Integrations
        
        <!--BEGIN STABILITY BANNER-->---
        
        
        ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)
        
        > The APIs of higher level constructs in this module are experimental and under active development.
        > They are subject to non-backward compatible changes or removal in any future version. These are
        > not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
        > announced in the release notes. This means that while you may use them, you may need to update
        > your source code when upgrading to a newer version of this package.
        
        ---
        <!--END STABILITY BANNER-->
        
        ## Table of Contents
        
        * [HTTP APIs](#http-apis)
        
          * [Lambda Integration](#lambda)
          * [HTTP Proxy Integration](#http-proxy)
          * [Private Integration](#private-integration)
        
        ## HTTP APIs
        
        Integrations connect a route to backend resources. HTTP APIs support Lambda proxy, AWS service, and HTTP proxy integrations. HTTP proxy integrations are also known as private integrations.
        
        ### Lambda
        
        Lambda integrations enable integrating an HTTP API route with a Lambda function. When a client invokes the route, the
        API Gateway service forwards the request to the Lambda function and returns the function's response to the client.
        
        The API Gateway service will invoke the lambda function with an event payload of a specific format. The service expects
        the function to respond in a specific format. The details on this format is available at [Working with AWS Lambda
        proxy integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html).
        
        The following code configures a route `GET /books` with a Lambda proxy integration.
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        books_fn = lambda_.Function(stack, "BooksDefaultFn", ...)
        books_integration = LambdaProxyIntegration(
            handler=books_default_fn
        )
        
        http_api = HttpApi(stack, "HttpApi")
        
        http_api.add_routes(
            path="/books",
            methods=[HttpMethod.GET],
            integration=books_integration
        )
        ```
        
        ### HTTP Proxy
        
        HTTP Proxy integrations enables connecting an HTTP API route to a publicly routable HTTP endpoint. When a client
        invokes the route, the API Gateway service forwards the entire request and response between the API Gateway endpoint
        and the integrating HTTP endpoint. More information can be found at [Working with HTTP proxy
        integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html).
        
        The following code configures a route `GET /books` with an HTTP proxy integration to an HTTP endpoint
        `get-books-proxy.myproxy.internal`.
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        books_integration = HttpProxyIntegration(
            url="https://get-books-proxy.myproxy.internal"
        )
        
        http_api = HttpApi(stack, "HttpApi")
        
        http_api.add_routes(
            path="/books",
            methods=[HttpMethod.GET],
            integration=books_integration
        )
        ```
        
        ### Private Integration
        
        Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or
        Amazon ECS container-based applications.  Using private integrations, resources in a VPC can be exposed for access by
        clients outside of the VPC.
        
        The following integrations are supported for private resources in a VPC.
        
        #### Application Load Balancer
        
        The following code is a basic application load balancer private integration of HTTP API:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        vpc = ec2.Vpc(stack, "VPC")
        lb = elbv2.ALB(stack, "lb", vpc=vpc)
        listener = lb.add_listener("listener", port=80)
        listener.add_targets("target",
            port=80
        )
        
        http_endpoint = HttpApi(stack, "HttpProxyPrivateApi",
            default_integration=HttpAlbIntegration(
                listener=listener
            )
        )
        ```
        
        When an imported load balancer is used, the `vpc` option must be specified for `HttpAlbIntegration`.
        
        #### Network Load Balancer
        
        The following code is a basic network load balancer private integration of HTTP API:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        vpc = ec2.Vpc(stack, "VPC")
        lb = elbv2.NLB(stack, "lb", vpc=vpc)
        listener = lb.add_listener("listener", port=80)
        listener.add_targets("target",
            port=80
        )
        
        http_endpoint = HttpApi(stack, "HttpProxyPrivateApi",
            default_integration=HttpNlbIntegration(
                listener=listener
            )
        )
        ```
        
        When an imported load balancer is used, the `vpc` option must be specified for `HttpNlbIntegration`.
        
        #### Cloud Map Service Discovery
        
        The following code is a basic discovery service private integration of HTTP API:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        vpc = ec2.Vpc(stack, "VPC")
        vpc_link = VpcLink(stack, "VpcLink", vpc=vpc)
        namespace = servicediscovery.PrivateDnsNamespace(stack, "Namespace",
            name="boobar.com",
            vpc=vpc
        )
        service = namespace.create_service("Service")
        
        http_endpoint = HttpApi(stack, "HttpProxyPrivateApi",
            default_integration=HttpServiceDiscoveryIntegration(
                vpc_link=vpc_link,
                service=service
            )
        )
        ```
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Typing :: Typed
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved
Classifier: Framework :: AWS CDK
Classifier: Framework :: AWS CDK :: 1
Requires-Python: >=3.6
Description-Content-Type: text/markdown
