Show / Hide Table of Contents

Class Integration

Base class for backend integrations for an API Gateway method.

Inheritance
object
Integration
AwsIntegration
HttpIntegration
MockIntegration
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Integration : DeputyBase
Syntax (vb)
Public Class Integration Inherits DeputyBase
Remarks

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

ExampleMetadata: infused

Examples
Resource books;
             User iamUser;


             var getBooks = books.AddMethod("GET", new HttpIntegration("http://amazon.com"), new MethodOptions {
                 AuthorizationType = AuthorizationType.IAM
             });

             iamUser.AttachInlinePolicy(new Policy(this, "AllowBooks", new PolicyProps {
                 Statements = new [] {
                     new PolicyStatement(new PolicyStatementProps {
                         Actions = new [] { "execute-api:Invoke" },
                         Effect = Effect.ALLOW,
                         Resources = new [] { getBooks.MethodArn }
                     }) }
             }));

Synopsis

Constructors

Integration(IIntegrationProps)

Base class for backend integrations for an API Gateway method.

Methods

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.

Constructors

Integration(IIntegrationProps)

Base class for backend integrations for an API Gateway method.

public Integration(IIntegrationProps props)
Parameters
props IIntegrationProps
Remarks

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

ExampleMetadata: infused

Examples
Resource books;
             User iamUser;


             var getBooks = books.AddMethod("GET", new HttpIntegration("http://amazon.com"), new MethodOptions {
                 AuthorizationType = AuthorizationType.IAM
             });

             iamUser.AttachInlinePolicy(new Policy(this, "AllowBooks", new PolicyProps {
                 Statements = new [] {
                     new PolicyStatement(new PolicyStatementProps {
                         Actions = new [] { "execute-api:Invoke" },
                         Effect = Effect.ALLOW,
                         Resources = new [] { getBooks.MethodArn }
                     }) }
             }));

Methods

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.

public virtual IIntegrationConfig Bind(Method method)
Parameters
method Method
Returns

IIntegrationConfig

Remarks

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

ExampleMetadata: infused

Back to top Generated by DocFX