class HttpRouteIntegration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Apigatewayv2.HttpRouteIntegration |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#HttpRouteIntegration |
Java | software.amazon.awscdk.services.apigatewayv2.HttpRouteIntegration |
Python | aws_cdk.aws_apigatewayv2.HttpRouteIntegration |
TypeScript (source) | aws-cdk-lib » aws_apigatewayv2 » HttpRouteIntegration |
Implemented by
Http, Http, Http, Http, Http, Http, Http
The interface that various route integration classes will inherit.
Example
import { HttpUrlIntegration, HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
const getBooksIntegration = new HttpUrlIntegration('GetBooksIntegration', 'https://get-books-proxy.example.com');
declare const bookStoreDefaultFn: lambda.Function;
const bookStoreDefaultIntegration = new HttpLambdaIntegration('BooksIntegration', bookStoreDefaultFn);
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.GET ],
integration: getBooksIntegration,
});
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.ANY ],
integration: bookStoreDefaultIntegration,
});
Initializer
new HttpRouteIntegration(id: string)
Parameters
- id
string— id of the underlyingHttpIntegrationconstruct.
Initialize an integration for a route on http api.
Methods
| Name | Description |
|---|---|
| bind(options) | Bind this integration to the route. |
| protected complete | Complete the binding of the integration to the route. |
bind(options)
public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig
Parameters
- options
HttpRoute Integration Bind Options
Returns
Bind this integration to the route.
protected completeBind(_options)
protected completeBind(_options: HttpRouteIntegrationBindOptions): void
Parameters
- _options
HttpRoute Integration Bind Options
Complete the binding of the integration to the route.
In some cases, there is some additional work to do, such as adding permissions for the API to access the target. This work is necessary whether the integration has just been created for this route or it is an existing one, previously created for other routes. In most cases, however, concrete implementations do not need to override this method.

.NET
Go
Java
Python
TypeScript (