@aws-cdk_aws-apigatewayv2-integrations-alpha.HttpUrlIntegration

class HttpUrlIntegration ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Integrations.Alpha.HttpUrlIntegration
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha/v2#HttpUrlIntegration
Javasoftware.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration
Pythonaws_cdk.aws_apigatewayv2_integrations_alpha.HttpUrlIntegration
TypeScript (source)@aws-cdk/aws-apigatewayv2-integrations-alpha ยป HttpUrlIntegration

Extends HttpRouteIntegration

The HTTP Proxy integration resource for HTTP API.

Example

import { HttpLambdaAuthorizer, HttpLambdaResponseType } from '@aws-cdk/aws-apigatewayv2-authorizers-alpha';
import { HttpUrlIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';

// This function handles your auth logic
declare const authHandler: lambda.Function;

const authorizer = new HttpLambdaAuthorizer('BooksAuthorizer', authHandler, {
  responseTypes: [HttpLambdaResponseType.SIMPLE], // Define if returns simple and/or iam response
});

const api = new apigwv2.HttpApi(this, 'HttpApi');

api.addRoutes({
  integration: new HttpUrlIntegration('BooksIntegration', 'https://get-books-proxy.example.com'),
  path: '/books',
  authorizer,
});

Initializer

new HttpUrlIntegration(id: string, url: string, props?: HttpUrlIntegrationProps)

Parameters

  • id string โ€” id of the underlying integration construct.
  • url string โ€” the URL to proxy to.
  • props HttpUrlIntegrationProps โ€” properties to configure the integration.

Methods

NameDescription
bind(_options)๐Ÿ”นBind this integration to the route.

bind(_options)๐Ÿ”น

public bind(_options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig

Parameters

  • _options HttpRouteIntegrationBindOptions

Returns

  • HttpRouteIntegrationConfig

Bind this integration to the route.