is this documentation correct? <https://docs.serve...
# general
s
is this documentation correct? https://docs.serverless-stack.com/constructs/migration#rules it says
eventPattern
was moved to
cdk.rule.eventPattern
but then the example below it uses
cdk.eventPattern
. also, what’s the difference between
cdk.rule.eventPattern
and just
pattern
? this is all a bit confusing 🤔
t
we're basically hoping you never have to use the
cdk
option, I think this doc is technically correct but you don't have to use the cdk option.
Copy code
mybus.addRules(stack, {
  pattern: { detailType: ["blah"] }
})
s
hmm. I’m actually using
cdk
prop a lot
it seems to be required for
sst.Queue
for example
t
I think you tend to be one of our more advanced users so that makes sense. Basically we don't pull stuff up if we think it's advanced and keep it in cdk, if there's anything you think belongs at top level let us know https://docs.serverless-stack.com/constructs/v1/EventBus#examples
s
to set the queue name & retention period
ahh ok
I’m advanced.. I feel fancy 😆
ok. just wanted to make sure I’m doing this right!
t
yeah queue name for example we already generate it based off stage + app + construct name which probably mkes sense for 90% of people
retentionPeriod good argument to move that out of cdk I think, seems decently common
s
I do like to name stuff when I can, just so it’s easier to identify in the AWS console. instead of seeing things like “EventBusT8923971”
t
queue's actually don't have chaotic names by default I think, it's mostly just functions that have that
we generally call app.logicalPrefixedname under the hood for most things
some things we can't (like buckets)
s
ahh I see