HttpIntegrationProps Struct
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
declare const role: iam.Role;
declare const vpcLink: apigateway.VpcLink;
const httpIntegrationProps: apigateway.HttpIntegrationProps = {
httpMethod: 'httpMethod',
options: {
cacheKeyParameters: ['cacheKeyParameters'],
cacheNamespace: 'cacheNamespace',
connectionType: apigateway.ConnectionType.INTERNET,
contentHandling: apigateway.ContentHandling.CONVERT_TO_BINARY,
credentialsPassthrough: false,
credentialsRole: role,
integrationResponses: [{
statusCode: 'statusCode',
// the properties below are optional
contentHandling: apigateway.ContentHandling.CONVERT_TO_BINARY,
responseParameters: {
responseParametersKey: 'responseParameters',
},
responseTemplates: {
responseTemplatesKey: 'responseTemplates',
},
selectionPattern: 'selectionPattern',
}],
passthroughBehavior: apigateway.PassthroughBehavior.WHEN_NO_MATCH,
requestParameters: {
requestParametersKey: 'requestParameters',
},
requestTemplates: {
requestTemplatesKey: 'requestTemplates',
},
responseTransferMode: apigateway.ResponseTransferMode.BUFFERED,
timeout: cdk.Duration.minutes(30),
vpcLink: vpcLink,
},
proxy: false,
};
Properties
HTTP method to use when invoking the backend URL.
optionsIntegrationOptionsoptionsIntegrationOptionsoptionsIntegrationOptionsOptionsIntegrationOptionsOptionsIntegrationOptions= defaults based on `IntegrationOp…#Integration options, such as request/resopnse mapping, content handling, etc.
default
Default: defaults based on IntegrationOptions defaults
Determines whether to use proxy integration or custom integration.