@aws-cdk_aws-apigatewayv2-integrations-alpha.HttpUrlIntegration
class HttpUrlIntegration
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Apigatewayv2.Integrations.Alpha.HttpUrlIntegration |
![]() | github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha/v2#HttpUrlIntegration |
![]() | software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration |
![]() | aws_cdk.aws_apigatewayv2_integrations_alpha.HttpUrlIntegration |
![]() | @aws-cdk/aws-apigatewayv2-integrations-alpha ยป HttpUrlIntegration |
Extends
Http
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
Http
โ properties to configure the integration.Url Integration Props
Methods
Name | Description |
---|---|
bind(_options) | Bind this integration to the route. |
bind(_options)
public bind(_options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig
Parameters
- _options
Http
Route Integration Bind Options
Returns
Bind this integration to the route.