Class Integration
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
Base class for backend integrations for an API Gateway method.
public class Integration : DeputyBase
- Inheritance
-
Integration
- Derived
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 }
}) }
}));
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
Constructors
Integration(IIntegrationProps)
public Integration(IIntegrationProps props)
Parameters
props
IIntegrationProps
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