class Integration
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.APIGateway.Integration |
Java | software.amazon.awscdk.services.apigateway.Integration |
Python | aws_cdk.aws_apigateway.Integration |
TypeScript (source) | @aws-cdk/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
Integration
Props
Methods
Name | Description |
---|---|
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
Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.