Class AlarmWidgetProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.AlarmWidgetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AlarmWidgetProps>
- Enclosing interface:
AlarmWidgetProps
@Stability(Stable)
public static final class AlarmWidgetProps.Builder
extends Object
implements software.amazon.jsii.Builder<AlarmWidgetProps>
A builder for
AlarmWidgetProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofMetricWidgetProps.getAccountId()Sets the value ofAlarmWidgetProps.getAlarm()build()Builds the configured instance.Sets the value ofMetricWidgetProps.getHeight()leftYAxis(YAxisProps leftYAxis) Sets the value ofAlarmWidgetProps.getLeftYAxis()Sets the value ofMetricWidgetProps.getRegion()Sets the value ofMetricWidgetProps.getTitle()Sets the value ofMetricWidgetProps.getWidth()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alarm
Sets the value ofAlarmWidgetProps.getAlarm()- Parameters:
alarm- The alarm to show. This parameter is required.- Returns:
this
-
leftYAxis
Sets the value ofAlarmWidgetProps.getLeftYAxis()- Parameters:
leftYAxis- Left Y axis.- Returns:
this
-
accountId
Sets the value ofMetricWidgetProps.getAccountId()- Parameters:
accountId- 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
- Returns:
this
-
height
Sets the value ofMetricWidgetProps.getHeight()- Parameters:
height- Height of the widget.- Returns:
this
-
region
Sets the value ofMetricWidgetProps.getRegion()- Parameters:
region- The region the metrics of this graph should be taken from.- Returns:
this
-
title
Sets the value ofMetricWidgetProps.getTitle()- Parameters:
title- Title for the graph.- Returns:
this
-
width
Sets the value ofMetricWidgetProps.getWidth()- Parameters:
width- Width of the widget, in a grid of 24 units wide.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AlarmWidgetProps>- Returns:
- a new instance of
AlarmWidgetProps - Throws:
NullPointerException- if any required attribute was not provided
-