Class: AWSCDK::APIGateway::Integration
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::APIGateway::Integration
- Defined in:
- api_gateway/integration.rb
Overview
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.
Direct Known Subclasses
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(props) ⇒ Integration
constructor
A new instance of Integration.
Constructor Details
#initialize(props) ⇒ Integration
Returns a new instance of Integration.
12 13 14 15 16 |
# File 'api_gateway/integration.rb', line 12 def initialize(props) props = props.is_a?(Hash) ? ::AWSCDK::APIGateway::IntegrationProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JbnRlZ3JhdGlvblByb3BzIn0=")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
18 19 20 21 22 |
# File 'api_gateway/integration.rb', line 18 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.
28 29 30 31 |
# File 'api_gateway/integration.rb', line 28 def bind(method) Jsii::Type.check_type(method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5NZXRob2QifQ==")), "method") jsii_call_method("bind", [method]) end |