aws-cdk-lib.aws_apigateway.Integration

class Integration

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

Base class for backend integrations for an API Gateway method.

Use one of the concrete classes such as MockIntegration, AwsIntegration, LambdaIntegration or implement on your own by specifying the set of props.

Example

declare const books: apigateway.Resource;
declare const iamUser: iam.User;

const getBooks = books.addMethod('GET', new apigateway.HttpIntegration('http://amazon.com'), {
  authorizationType: apigateway.AuthorizationType.IAM
});

iamUser.attachInlinePolicy(new iam.Policy(this, 'AllowBooks', {
  statements: [
    new iam.PolicyStatement({
      actions: [ 'execute-api:Invoke' ],
      effect: iam.Effect.ALLOW,
      resources: [ getBooks.methodArn ]
    })
  ]
}))

Initializer

new Integration(props: IntegrationProps)

Parameters

  • props IntegrationProps

Methods

NameDescription
bind(_method)Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.

bind(_method)

public bind(_method: Method): IntegrationConfig

Parameters

  • _method Method

Returns

  • IntegrationConfig

Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.