Class: AWSCDK::APIGatewayv2::HttpRouteIntegration

Inherits:
Jsii::Object
  • Object
show all
Defined in:
api_gatewayv2/http_route_integration.rb

Overview

The interface that various route integration classes will inherit.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ HttpRouteIntegration

Initialize an integration for a route on http api.

Parameters:

  • id (String)

    id of the underlying HttpIntegration construct.



11
12
13
14
# File 'api_gatewayv2/http_route_integration.rb', line 11

def initialize(id)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Object.instance_method(:initialize).bind(self).call(id)
end

Class Method Details

.jsii_overridable_methodsObject



16
17
18
19
20
21
# File 'api_gatewayv2/http_route_integration.rb', line 16

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
    :complete_bind => { kind: :method, name: "completeBind", is_optional: false },
  }
end

Instance Method Details

#bind(options) ⇒ AWSCDK::APIGatewayv2::HttpRouteIntegrationConfig

Bind this integration to the route.



27
28
29
30
31
# File 'api_gatewayv2/http_route_integration.rb', line 27

def bind(options)
  options = options.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::HttpRouteIntegrationBindOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkh0dHBSb3V0ZUludGVncmF0aW9uQmluZE9wdGlvbnMifQ==")), "options")
  jsii_call_method("bind", [options])
end

#complete_bind(_options) ⇒ void

This method returns an undefined value.

Complete the binding of the integration to the route.

In some cases, there is some additional work to do, such as adding permissions for the API to access the target. This work is necessary whether the integration has just been created for this route or it is an existing one, previously created for other routes. In most cases, however, concrete implementations do not need to override this method.



44
45
46
47
48
# File 'api_gatewayv2/http_route_integration.rb', line 44

def complete_bind(_options)
  _options = _options.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::HttpRouteIntegrationBindOptions.new(**_options.transform_keys(&:to_sym)) : _options
  Jsii::Type.check_type(_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkh0dHBSb3V0ZUludGVncmF0aW9uQmluZE9wdGlvbnMifQ==")), "_options")
  jsii_call_method("completeBind", [_options])
end