aws-cdk-lib.aws_apigateway.HttpIntegrationProps

interface HttpIntegrationProps

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

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

Properties

NameTypeDescription
httpMethod?stringHTTP method to use when invoking the backend URL.
options?IntegrationOptionsIntegration options, such as request/resopnse mapping, content handling, etc.
proxy?booleanDetermines whether to use proxy integration or custom integration.

httpMethod?

Type: string (optional, default: GET)

HTTP method to use when invoking the backend URL.


options?

Type: IntegrationOptions (optional, default: defaults based on IntegrationOptions defaults)

Integration options, such as request/resopnse mapping, content handling, etc.


proxy?

Type: boolean (optional, default: true)

Determines whether to use proxy integration or custom integration.