Class CfnAlarm.MetricProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.CfnAlarm.MetricProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAlarm.MetricProperty>
- Enclosing interface:
- CfnAlarm.MetricProperty
@Stability(Stable)
public static final class CfnAlarm.MetricProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAlarm.MetricProperty>
A builder for
CfnAlarm.MetricProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.dimensions(List<? extends Object> dimensions) Sets the value ofCfnAlarm.MetricProperty.getDimensions()dimensions(IResolvable dimensions) Sets the value ofCfnAlarm.MetricProperty.getDimensions()metricName(String metricName) Sets the value ofCfnAlarm.MetricProperty.getMetricName()Sets the value ofCfnAlarm.MetricProperty.getNamespace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dimensions
Sets the value ofCfnAlarm.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 CfnAlarm.MetricProperty.Builder dimensions(List<? extends Object> dimensions) Sets the value ofCfnAlarm.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 ofCfnAlarm.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 ofCfnAlarm.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<CfnAlarm.MetricProperty>- Returns:
- a new instance of
CfnAlarm.MetricProperty - Throws:
NullPointerException- if any required attribute was not provided
-