class ConcreteWidget
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CloudWatch.ConcreteWidget |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#ConcreteWidget |
Java | software.amazon.awscdk.services.cloudwatch.ConcreteWidget |
Python | aws_cdk.aws_cloudwatch.ConcreteWidget |
TypeScript (source) | aws-cdk-lib » aws_cloudwatch » ConcreteWidget |
Implements
IWidget
Implemented by
Alarm, Alarm, Custom, Gauge, Graph, Log, Single, Table, Text
A real CloudWatch widget that has its own fixed size and remembers its position.
This is in contrast to other widgets which exist for layout purposes.
Initializer
new ConcreteWidget(width: number, height: number)
Parameters
- width
number— The amount of horizontal grid units the widget will take up. - height
number— The amount of vertical grid units the widget will take up.
Properties
| Name | Type | Description |
|---|---|---|
| height | number | The amount of vertical grid units the widget will take up. |
| width | number | The amount of horizontal grid units the widget will take up. |
| warnings? | string[] | Any warnings that are produced as a result of putting together this widget. |
| warnings | { [string]: string } | Any warnings that are produced as a result of putting together this widget. |
| x? | number | |
| y? | number |
height
Type:
number
The amount of vertical grid units the widget will take up.
width
Type:
number
The amount of horizontal grid units the widget will take up.
warnings?
Type:
string[]
(optional)
Any warnings that are produced as a result of putting together this widget.
warningsV2?
Type:
{ [string]: string }
(optional)
Any warnings that are produced as a result of putting together this widget.
x?
Type:
number
(optional)
y?
Type:
number
(optional)
Methods
| Name | Description |
|---|---|
| position(x, y) | Place the widget at a given position. |
| to | Return the widget JSON for use in the dashboard. |
| protected copy | Copy the warnings from the given metric. |
position(x, y)
public position(x: number, y: number): void
Parameters
- x
number - y
number
Place the widget at a given position.
toJson()
public toJson(): any[]
Returns
any[]
Return the widget JSON for use in the dashboard.
protected copyMetricWarnings(...ms)
protected copyMetricWarnings(...ms: IMetric[]): void
Parameters
- ms
IMetric
Copy the warnings from the given metric.

.NET
Go
Java
Python
TypeScript (