Interface MetricWidgetProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
AlarmWidgetProps
,GaugeWidgetProps
,GraphWidgetProps
,SingleValueWidgetProps
,TableWidgetProps
- All Known Implementing Classes:
AlarmWidgetProps.Jsii$Proxy
,GaugeWidgetProps.Jsii$Proxy
,GraphWidgetProps.Jsii$Proxy
,MetricWidgetProps.Jsii$Proxy
,SingleValueWidgetProps.Jsii$Proxy
,TableWidgetProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-07-29T17:50:57.114Z")
@Stability(Stable)
public interface MetricWidgetProps
extends software.amazon.jsii.JsiiSerializable
Basic properties for widgets that display metrics.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.cloudwatch.*; MetricWidgetProps metricWidgetProps = MetricWidgetProps.builder() .accountId("accountId") .height(123) .region("region") .title("title") .width(123) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forMetricWidgetProps
static final class
An implementation forMetricWidgetProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic MetricWidgetProps.Builder
builder()
default String
The AWS account ID where the metrics are located.default Number
Height of the widget.default String
The region the metrics of this graph should be taken from.default String
getTitle()
Title for the graph.default Number
getWidth()
Width of the widget, in a grid of 24 units wide.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAccountId
The AWS account ID where the metrics are located.This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account.
For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
Default: - Current account
-
getHeight
Height of the widget.Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
-
getRegion
The region the metrics of this graph should be taken from.Default: - Current region
-
getTitle
Title for the graph.Default: - None
-
getWidth
Width of the widget, in a grid of 24 units wide.Default: 6
-
builder
- Returns:
- a
MetricWidgetProps.Builder
ofMetricWidgetProps
-