Skip to content
v2.273.0

Column Class ​

A widget that contains other widgets in a vertical column.

Widgets will be laid out next to each other

Example ​

ts
declare const widgetA: cloudwatch.IWidget;
declare const widgetB: cloudwatch.IWidget;

new cloudwatch.Column(widgetA, widgetB);
python
# widget_a: cloudwatch.IWidget
# widget_b: cloudwatch.IWidget


cloudwatch.Column(widget_a, widget_b)
java
IWidget widgetA;
IWidget widgetB;


new Column(widgetA, widgetB);
csharp
// Install: dotnet add package Amazon.CDK.Lib
IWidget widgetA;
IWidget widgetB;


new Column(widgetA, widgetB);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var widgetA IWidget
var widgetB IWidget


cloudwatch.NewColumn(widgetA, widgetB)

Initializer ​

ts
new Column(widgets: IWidget)
python
Column(widgets: IWidget)
java
new Column(IWidget widgets)
csharp
new Column(IWidget widgets)
go
NewColumn(Widgets IWidget)

Properties ​

heightnumberheightint | floatheightNumberHeightdoubleHeight*float64required#
The amount of vertical grid units the widget will take up.
widgetsIWidget[]widgetstyping.List[IWidget]widgetsList<IWidget>WidgetsIWidget[]Widgets*[]IWidgetrequired#
List of contained widgets.
widthnumberwidthint | floatwidthNumberWidthdoubleWidth*float64required#
The amount of horizontal grid units the widget will take up.

Methods ​

addWidget(w: IWidget): voiddef add_widget(self, w: IWidget) -> Nonepublic void addWidget(IWidget w)public void AddWidget(IWidget w)func AddWidget(W IWidget)#
Add the widget to this container.
position(x: number, y: number): voiddef position(self, x: int | float, y: int | float) -> Nonepublic void position(Number x, Number y)public void Position(double x, double y)func Position(X *float64, Y *float64)#
Place the widget at a given position.
toJson(): any[]def to_json(self, ) -> typing.List[Any]public List<Object> toJson()public object[] ToJson()func ToJson() *[]interface{}#
Return the widget JSON for use in the dashboard.