IntegrationConfig Struct
Result of binding an Integration to a Method.
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 integrationConfig: apigateway.IntegrationConfig = {
type: apigateway.IntegrationType.AWS,
// the properties below are optional
deploymentToken: 'deploymentToken',
integrationHttpMethod: 'integrationHttpMethod',
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,
},
uri: 'uri',
};
Properties
deploymentTokenstringdeployment_tokenstrdeploymentTokenStringDeploymentTokenstringDeploymentToken*string= undefined deployments are not tr…#This value is included in computing the Deployment's fingerprint.
When the fingerprint changes, a new deployment is triggered. This property should contain values associated with the Integration that upon changing should trigger a fresh the Deployment needs to be refreshed.
default
Default: undefined deployments are not triggered for any change to this integration.
integrationHttpMethodstringintegration_http_methodstrintegrationHttpMethodStringIntegrationHttpMethodstringIntegrationHttpMethod*string= no integration method specified.#The integration's HTTP method type.
Required unless you use a MOCK integration.
optionsIntegrationOptionsoptionsIntegrationOptionsoptionsIntegrationOptionsOptionsIntegrationOptionsOptionsIntegrationOptions= no integration options#Integration options.
typeIntegrationTypetypeIntegrationTypetypeIntegrationTypeTypeIntegrationTypeTypeIntegrationTyperequired#Specifies an API method integration type.
The Uniform Resource Identifier (URI) for the integration.
default
Default: no URI. Usually applies to MOCK integration