Skip to content

Commit 41f8df5

Browse files
docs(data_classes): document CW dashboard widget return types
Co-authored-by: Ruben Fonseca <[email protected]>
1 parent 8b3dbfe commit 41f8df5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/utilities/data_classes.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,10 @@ In this example, we also use the new Logger `correlation_id` and built-in `corre
471471
if event.describe:
472472
return DOCS
473473

474-
# alternatively you can also do
475-
# event.widget_context.params["echo"]
476-
# event.raw_event["echo"]
477-
return event["echo"]
474+
# You can directly return HTML or JSON content
475+
# Alternatively, you can return markdown that will be rendered by CloudWatch
476+
echo = event.widget_context.params["echo"]
477+
return { "markdown": f"# {echo}" }
478478
```
479479

480480
### CloudWatch Logs

0 commit comments

Comments
 (0)