Class: AWSCDK::APIGateway::LambdaIntegration
- Inherits:
-
AWSIntegration
- Object
- AWSIntegration
- AWSCDK::APIGateway::LambdaIntegration
- Defined in:
- api_gateway/lambda_integration.rb
Overview
Integrates an AWS Lambda function to an API Gateway method.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(method) ⇒ AWSCDK::APIGateway::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.
-
#initialize(handler, options = nil) ⇒ LambdaIntegration
constructor
A new instance of LambdaIntegration.
Constructor Details
#initialize(handler, options = nil) ⇒ LambdaIntegration
Returns a new instance of LambdaIntegration.
16 17 18 19 20 21 |
# File 'api_gateway/lambda_integration.rb', line 16 def initialize(handler, = nil) = .is_a?(Hash) ? ::AWSCDK::APIGateway::LambdaIntegrationOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(handler, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "handler") Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5MYW1iZGFJbnRlZ3JhdGlvbk9wdGlvbnMifQ==")), "options") unless .nil? Jsii::Object.instance_method(:initialize).bind(self).call(handler, ) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
23 24 25 26 27 |
# File 'api_gateway/lambda_integration.rb', line 23 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(method) ⇒ AWSCDK::APIGateway::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.
33 34 35 36 |
# File 'api_gateway/lambda_integration.rb', line 33 def bind(method) Jsii::Type.check_type(method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5NZXRob2QifQ==")), "method") jsii_call_method("bind", [method]) end |