HttpEventBridgeIntegrationProps
- class aws_cdk.aws_apigatewayv2_integrations.HttpEventBridgeIntegrationProps(*, event_bus_ref, parameter_mapping=None, subtype=None)
Bases:
objectProperties to initialize
HttpEventBridgeIntegration.- Parameters:
event_bus_ref (
Union[EventBusReference,Dict[str,Any]]) – EventBridge event bus that integrates with API Gateway.parameter_mapping (
Optional[ParameterMapping]) – 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 fieldsDetail,DetailType, andSource. Default: - setDetailto$request.body.Detail,DetailTypeto$request.body.DetailType, andSourceto$request.body.Source.subtype (
Optional[HttpIntegrationSubtype]) – The subtype of the HTTP integration. Only subtypes starting with EVENTBRIDGE_ can be specified. Default: HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_events as events from aws_cdk.aws_apigatewayv2_integrations import HttpEventBridgeIntegration # bus: events.IEventBus # http_api: apigwv2.HttpApi # default integration (PutEvents) http_api.add_routes( path="/default", methods=[apigwv2.HttpMethod.POST], integration=HttpEventBridgeIntegration("DefaultEventBridgeIntegration", event_bus_ref=bus.event_bus_ref ) ) # explicit subtype http_api.add_routes( path="/put-events", methods=[apigwv2.HttpMethod.POST], integration=HttpEventBridgeIntegration("ExplicitSubtypeIntegration", event_bus_ref=bus.event_bus_ref, subtype=apigwv2.HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS ) )
Attributes
- event_bus_ref
EventBridge event bus that integrates with API Gateway.
- parameter_mapping
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, andSource.- Default:
set
Detailto$request.body.Detail,
DetailTypeto$request.body.DetailType, andSourceto$request.body.Source.
- subtype
The subtype of the HTTP integration.
Only subtypes starting with EVENTBRIDGE_ can be specified.
- Default:
HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS