mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
1.1 KiB
1.1 KiB
Read this on the main serverless docs site
Emit
The emit command emits an event to a serverless service
serverless emit -n my.event -d '{"foo":"bar"}'
# Shorthand
sls emit -n my.event -d '{"foo":"bar"}'
Options
--nameor-nThe event name. Required.--dataor-dThe event data--pathor-pPath to JSON or YAML file holding event data',--urlor-uEvent Gateway address--datatypeor-tData type for the event data. By default set to application/json
Provided lifecycle Events
emit:emit
Examples
Emitting an Event to locally running Event Gateway
serverless emit -n my.event -d '{"foo":"bar"}'
Emitting an Event to a remote Event Gateway
serverless emit -n foo.bar -d '{"foo":"bar"}' -u https://mygateway.com