BusLambdaSubscriber
Reference doc for the `sst.aws.BusLambdaSubscriber` component.
The BusLambdaSubscriber
component is internally used by the Bus
component
to add subscriptions to Amazon EventBridge Event Bus.
You’ll find this component returned by the subscribe
method of the Bus
component.
Constructor
Parameters
-
name
string
-
args
Args
-
opts?
ComponentResourceOptions
Properties
nodes
Type Object
The underlying resources this component creates.
nodes.permission
Type Permission
The Lambda permission.
nodes.rule
Type EventRule
The EventBus rule.
nodes.target
Type EventTarget
The EventBus target.
nodes.function
Type Output
<
Function
>
The Lambda function that’ll be notified.
Args
bus
bus.arn
Type Input
<
string
>
The ARN of the bus.
bus.name
Type Input
<
string
>
The name of the bus.
pattern?
Type Input
<
Object
>
Filter the messages that’ll be processed by the subscriber.
If any single property in the pattern doesn’t match an attribute assigned to the message, then the pattern rejects the message.
For example, if your EventBus message contains this in a JSON format.
Then this pattern accepts the message.
pattern.detail?
Type Record
<
string
, any
>
A JSON object of “detail” values to match against. “detail” contains the actual data or information associated with the event.
pattern.detailType?
Type any
[]
A list of “detail-type” values to match against. “detail-type” typically defines the kind of event that is occurring.
pattern.source?
Type any
[]
A list of “source” values to match against. “source” indicates where the event originated.
subscriber
Type Input
<
string
|
FunctionArgs
>
The subscriber function.
transform?
transform.rule?
Type EventRuleArgs
|
(
args
:
EventRuleArgs
,
opts
:
ComponentResourceOptions
,
name
:
string
)
=>
void
Transform the EventBus rule resource.
transform.target?
Type EventTargetArgs
|
(
args
:
EventTargetArgs
,
opts
:
ComponentResourceOptions
,
name
:
string
)
=>
void
Transform the EventBus target resource.