Set up API with private integrations using OpenAPI
You can set up an API with the private integration by importing the API's OpenAPI file. The settings are similar to the OpenAPI definitions of an API with HTTP integrations, with the following exceptions:
-
You must explicitly set
connectionTypetoVPC_LINK. -
You must explicitly set
connectionIdto the ID of aVpcLinkor to a stage variable referencing the ID of aVpcLink. -
The
uriparameter in the private integration points to an HTTP/HTTPS endpoint in the VPC, but is used instead to set up the integration request'sHostheader. -
The
uriparameter in the private integration with an HTTPS endpoint in the VPC is used to verify the stated domain name against the one in the certificate installed on the VPC endpoint.
You can use a stage variable to reference the VpcLink ID.
Or you can assign the ID value directly to connectionId.
The following JSON-formatted OpenAPI file shows an example of an API with a VPC link
as referenced by a stage variable (${stageVariables.vpcLinkId}):