HttpEventBridgeIntegration
- class aws_cdk.aws_apigatewayv2_integrations.HttpEventBridgeIntegration(id, *, event_bus_ref, parameter_mapping=None, subtype=None)
Bases:
HttpRouteIntegrationThe EventBridge PutEvents integration resource for HTTP API.
- 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 ) )
- Parameters:
id (
str) – id of the underlying integration construct.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
Methods
- bind(*, route, scope)
Bind this integration to the route.
- Parameters:
route (
IHttpRoute) – The route to which this is being bound.scope (
Construct) – The current scope in which the bind is occurring. If theHttpRouteIntegrationbeing bound creates additional constructs, this will be used as their parent scope.
- Return type: