aws-cdk-lib.aws_apigateway.IntegrationConfig

interface IntegrationConfig

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

Obtainable from AwsIntegration.bind(), Integration.bind(), LambdaIntegration.bind()

Result of binding an Integration to a Method.

Example

// 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',
    },
    timeout: cdk.Duration.minutes(30),
    vpcLink: vpcLink,
  },
  uri: 'uri',
};

Properties

NameTypeDescription
typeIntegrationTypeSpecifies an API method integration type.
deploymentToken?stringThis value is included in computing the Deployment's fingerprint.
integrationHttpMethod?stringThe integration's HTTP method type.
options?IntegrationOptionsIntegration options.
uri?stringThe Uniform Resource Identifier (URI) for the integration.

type

Type: IntegrationType

Specifies an API method integration type.


deploymentToken?

Type: string (optional, default: undefined deployments are not triggered for any change to this integration.)

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.


integrationHttpMethod?

Type: string (optional, default: no integration method specified.)

The integration's HTTP method type.


options?

Type: IntegrationOptions (optional, default: no integration options)

Integration options.


uri?

Type: string (optional, default: no URI. Usually applies to MOCK integration)

The Uniform Resource Identifier (URI) for the integration.

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