Skip to content
v2.277.0

TextWidgetProps Struct ​

Properties for a Text widget.

Example ​

ts
declare const dashboard: cloudwatch.Dashboard;

dashboard.addWidgets(new cloudwatch.TextWidget({
  markdown: '# Key Performance Indicators'
}));
python
# dashboard: cloudwatch.Dashboard


dashboard.add_widgets(cloudwatch.TextWidget(
    markdown="# Key Performance Indicators"
))
java
Dashboard dashboard;


dashboard.addWidgets(TextWidget.Builder.create()
        .markdown("# Key Performance Indicators")
        .build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
Dashboard dashboard;


dashboard.AddWidgets(new TextWidget(new TextWidgetProps {
    Markdown = "# Key Performance Indicators"
}));
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var dashboard Dashboard


dashboard.AddWidgets(cloudwatch.NewTextWidget(&TextWidgetProps{
	Markdown: jsii.String("# Key Performance Indicators"),
}))

Properties ​

backgroundoptionalTextWidgetBackgroundbackgroundoptionalTextWidgetBackgroundbackgroundoptionalTextWidgetBackgroundBackgroundoptionalTextWidgetBackgroundBackgroundoptionalTextWidgetBackground = TextWidgetBackground.TRANSPARENT #
Background for the widget.
heightoptionalnumberheightoptionalint | floatheightoptionalNumberHeightoptionaldoubleHeightoptional*float64 = 2 #
Height of the widget.
markdownstringmarkdownstrmarkdownStringMarkdownstringMarkdown*string required #
The text to display, in MarkDown format.
widthoptionalnumberwidthoptionalint | floatwidthoptionalNumberWidthoptionaldoubleWidthoptional*float64 = 6 #
Width of the widget, in a grid of 24 units wide.