aws-cdk-lib.aws_cloudwatch.MetricWidgetProps

interface MetricWidgetProps

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.MetricWidgetProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#MetricWidgetProps
Javasoftware.amazon.awscdk.services.cloudwatch.MetricWidgetProps
Pythonaws_cdk.aws_cloudwatch.MetricWidgetProps
TypeScript (source)aws-cdk-lib » aws_cloudwatch » MetricWidgetProps

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 { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const metricWidgetProps: cloudwatch.MetricWidgetProps = {
  height: 123,
  region: 'region',
  title: 'title',
  width: 123,
};

Properties

NameTypeDescription
height?numberHeight of the widget.
region?stringThe region the metrics of this graph should be taken from.
title?stringTitle for the graph.
width?numberWidth of the widget, in a grid of 24 units wide.

height?

Type: number (optional, default: 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.)

Height of the widget.


region?

Type: string (optional, default: Current region)

The region the metrics of this graph should be taken from.


title?

Type: string (optional, default: None)

Title for the graph.


width?

Type: number (optional, default: 6)

Width of the widget, in a grid of 24 units wide.