IntegrationProps Struct
Example
ts
import * as elbv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
const vpc = new ec2.Vpc(this, 'VPC');
const nlb = new elbv2.NetworkLoadBalancer(this, 'NLB', {
vpc,
});
const link = new apigateway.VpcLink(this, 'link', {
targets: [nlb],
});
const integration = new apigateway.Integration({
type: apigateway.IntegrationType.HTTP_PROXY,
integrationHttpMethod: 'ANY',
options: {
connectionType: apigateway.ConnectionType.VPC_LINK,
vpcLink: link,
},
});
Properties
integrationHttpMethodoptionalstringintegration_http_methodoptionalstrintegrationHttpMethodoptionalStringIntegrationHttpMethodoptionalstringIntegrationHttpMethodoptional*string#The integration's HTTP method type.
Required unless you use a MOCK integration.
optionsoptionalIntegrationOptionsoptionsoptionalIntegrationOptionsoptionsoptionalIntegrationOptionsOptionsoptionalIntegrationOptionsOptionsoptionalIntegrationOptions#Integration options.
typeIntegrationTypetypeIntegrationTypetypeIntegrationTypeTypeIntegrationTypeTypeIntegrationTyperequired#Specifies an API method integration type.
The Uniform Resource Identifier (URI) for the integration.
notes
- If you specify HTTP for the
typeproperty, specify the API endpoint URL. - If you specify MOCK for the
typeproperty, don't specify this property. - If you specify AWS for the
typeproperty, specify an AWS service that follows this form:arn:partition:apigateway:region:subdomain.service|service:path|action/service_api.For example, a Lambda function URI follows this form: arn:partition:apigateway:region:lambda:path/path. The path is usually in the form /2015-03-31/functions/LambdaFunctionARN/invocations.