BusQueueSubscriber
The BusQueueSubscriber component is internally used by the Bus component
to add subscriptions to Amazon EventBridge Event Bus.
You’ll find this component returned by the subscribeQueue method of the Bus component.
Constructor
new BusQueueSubscriber(name, args, opts?)Parameters
-
namestring -
argsArgs -
opts?ComponentResourceOptions
Properties
nodes
nodes.policy
Type QueuePolicy
The SQS Queue policy.
nodes.rule
Type EventRule
The EventBus rule.
nodes.target
Type EventTarget
The EventBus target.
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.
{ source: "my.source", detail: { price_usd: 210.75 }, "detail-type": "orderPlaced"}Then this pattern accepts the message.
{ pattern: { source: ["my.source", "my.source2"] }}pattern.detail?
Type Record<string, any>
An object of detail values to match against, where the key is the name and
the value is the pattern to match. The detail contains the actual
data associated with the event.
{ pattern: { detail: { price_usd: [{numeric: [">=", 100]}] } }}pattern.detailType?
Type any[]
A list of detail-type values to match against. The detail-type typically
defines the kind of event that is emitted.
{ pattern: { detailType: ["orderPlaced"] }}pattern.source?
Type any[]
A list of source values to match against. The source indicates where the
event originated.
{ pattern: { source: ["my.source", "my.source2"] }}queue
Type Input<string | Queue>
The ARN of the SQS Queue.
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.