aws-cdk-lib.aws_apigateway.IntegrationProps

interface IntegrationProps

LanguageType name
.NETAmazon.CDK.AWS.APIGateway.IntegrationProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#IntegrationProps
Javasoftware.amazon.awscdk.services.apigateway.IntegrationProps
Pythonaws_cdk.aws_apigateway.IntegrationProps
TypeScript (source)aws-cdk-lib » aws_apigateway » IntegrationProps

Example

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,
  options: {
    connectionType: apigateway.ConnectionType.VPC_LINK,
    vpcLink: link,
  },
});

Properties

NameTypeDescription
typeIntegrationTypeSpecifies an API method integration type.
integrationHttpMethod?stringThe integration's HTTP method type.
options?IntegrationOptionsIntegration options.
uri?anyThe Uniform Resource Identifier (URI) for the integration.

type

Type: IntegrationType

Specifies an API method integration type.


integrationHttpMethod?

Type: string (optional)

The integration's HTTP method type.

Required unless you use a MOCK integration.


options?

Type: IntegrationOptions (optional)

Integration options.


uri?

Type: any (optional)

The Uniform Resource Identifier (URI) for the integration.

  • If you specify HTTP for the type property, specify the API endpoint URL.
  • If you specify MOCK for the type property, don't specify this property.
  • If you specify AWS for the type property, 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.

See also: https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#uri