Class: AWSCDK::APIGatewayv2Integrations::HttpEventBridgeIntegrationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2Integrations::HttpEventBridgeIntegrationProps
- Defined in:
- api_gatewayv2_integrations/http_event_bridge_integration_props.rb
Overview
Properties to initialize HttpEventBridgeIntegration.
Instance Attribute Summary collapse
-
#event_bus_ref ⇒ AWSCDK::Interfaces::AWSEvents::EventBusReference
readonly
EventBridge event bus that integrates with API Gateway.
-
#parameter_mapping ⇒ AWSCDK::APIGatewayv2::ParameterMapping?
readonly
Specifies how to transform HTTP requests before sending them to the backend.
-
#subtype ⇒ AWSCDK::APIGatewayv2::HttpIntegrationSubtype?
readonly
The subtype of the HTTP integration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event_bus_ref:, parameter_mapping: nil, subtype: nil) ⇒ HttpEventBridgeIntegrationProps
constructor
A new instance of HttpEventBridgeIntegrationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event_bus_ref:, parameter_mapping: nil, subtype: nil) ⇒ HttpEventBridgeIntegrationProps
Returns a new instance of HttpEventBridgeIntegrationProps.
10 11 12 13 14 15 16 17 |
# File 'api_gatewayv2_integrations/http_event_bridge_integration_props.rb', line 10 def initialize(event_bus_ref:, parameter_mapping: nil, subtype: nil) @event_bus_ref = event_bus_ref.is_a?(Hash) ? ::AWSCDK::Interfaces::AWSEvents::EventBusReference.new(**event_bus_ref.transform_keys(&:to_sym)) : event_bus_ref Jsii::Type.check_type(@event_bus_ref, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19ldmVudHMuRXZlbnRCdXNSZWZlcmVuY2UifQ==")), "eventBusRef") @parameter_mapping = parameter_mapping Jsii::Type.check_type(@parameter_mapping, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLlBhcmFtZXRlck1hcHBpbmcifQ==")), "parameterMapping") unless @parameter_mapping.nil? @subtype = subtype Jsii::Type.check_type(@subtype, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkh0dHBJbnRlZ3JhdGlvblN1YnR5cGUifQ==")), "subtype") unless @subtype.nil? end |
Instance Attribute Details
#event_bus_ref ⇒ AWSCDK::Interfaces::AWSEvents::EventBusReference (readonly)
EventBridge event bus that integrates with API Gateway.
22 23 24 |
# File 'api_gatewayv2_integrations/http_event_bridge_integration_props.rb', line 22 def event_bus_ref @event_bus_ref end |
#parameter_mapping ⇒ AWSCDK::APIGatewayv2::ParameterMapping? (readonly)
Default: - set Detail to $request.body.Detail, DetailType to $request.body.DetailType, Source to $request.body.Source, and EventBusName to the event bus name from eventBusRef.
Specifies how to transform HTTP requests before sending them to the backend.
When not provided, a default mapping will be used that expects the
incoming request body to contain the fields Detail, DetailType, and
Source.
The EventBusName is automatically included from event_bus_ref in all cases,
even when a custom parameter_mapping is provided (unless explicitly overridden).
This ensures consistency and eliminates redundant configuration.
36 37 38 |
# File 'api_gatewayv2_integrations/http_event_bridge_integration_props.rb', line 36 def parameter_mapping @parameter_mapping end |
#subtype ⇒ AWSCDK::APIGatewayv2::HttpIntegrationSubtype? (readonly)
Default: HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS
The subtype of the HTTP integration.
Only subtypes starting with EVENTBRIDGE_ can be specified.
43 44 45 |
# File 'api_gatewayv2_integrations/http_event_bridge_integration_props.rb', line 43 def subtype @subtype end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 |
# File 'api_gatewayv2_integrations/http_event_bridge_integration_props.rb', line 45 def self.jsii_properties { :event_bus_ref => "eventBusRef", :parameter_mapping => "parameterMapping", :subtype => "subtype", } end |
Instance Method Details
#to_jsii ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'api_gatewayv2_integrations/http_event_bridge_integration_props.rb', line 53 def to_jsii result = {} result.merge!({ "eventBusRef" => @event_bus_ref, "parameterMapping" => @parameter_mapping, "subtype" => @subtype, }) result.compact end |