# ConnectionType

- Source: [`aws-apigateway/lib/integration.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigateway/lib/integration.ts#L368)

## 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,
  },
});
```

## Members

| Member | Description |
| --- | --- |
| `INTERNET` | For connections through the public routable internet. |
| `VPC_LINK` | For private connections between API Gateway and a network load balancer in a VPC. |

## Referenced by

- [`IntegrationOptions`](/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationOptions).connectionType
