Class CfnAlarmPropsMixin.MetricProperty.Builder
java.lang.Object
software.amazon.awscdk.mixins.preview.services.cloudwatch.mixins.CfnAlarmPropsMixin.MetricProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAlarmPropsMixin.MetricProperty>
- Enclosing interface:
CfnAlarmPropsMixin.MetricProperty
@Stability(Stable)
public static final class CfnAlarmPropsMixin.MetricProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAlarmPropsMixin.MetricProperty>
A builder for
CfnAlarmPropsMixin.MetricProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.dimensions(List<? extends Object> dimensions) Sets the value ofCfnAlarmPropsMixin.MetricProperty.getDimensions()dimensions(IResolvable dimensions) Sets the value ofCfnAlarmPropsMixin.MetricProperty.getDimensions()metricName(String metricName) Sets the value ofCfnAlarmPropsMixin.MetricProperty.getMetricName()Sets the value ofCfnAlarmPropsMixin.MetricProperty.getNamespace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dimensions
@Stability(Stable) public CfnAlarmPropsMixin.MetricProperty.Builder dimensions(IResolvable dimensions) Sets the value ofCfnAlarmPropsMixin.MetricProperty.getDimensions()- Parameters:
dimensions- The metric dimensions that you want to be used for the metric that the alarm will watch.- Returns:
this
-
dimensions
@Stability(Stable) public CfnAlarmPropsMixin.MetricProperty.Builder dimensions(List<? extends Object> dimensions) Sets the value ofCfnAlarmPropsMixin.MetricProperty.getDimensions()- Parameters:
dimensions- The metric dimensions that you want to be used for the metric that the alarm will watch.- Returns:
this
-
metricName
Sets the value ofCfnAlarmPropsMixin.MetricProperty.getMetricName()- Parameters:
metricName- The name of the metric that you want the alarm to watch. This is a required field.- Returns:
this
-
namespace
Sets the value ofCfnAlarmPropsMixin.MetricProperty.getNamespace()- Parameters:
namespace- The namespace of the metric that the alarm will watch.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAlarmPropsMixin.MetricProperty>- Returns:
- a new instance of
CfnAlarmPropsMixin.MetricProperty - Throws:
NullPointerException- if any required attribute was not provided
-