Class CfnTopicRule.CloudwatchMetricActionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.iot.CfnTopicRule.CloudwatchMetricActionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTopicRule.CloudwatchMetricActionProperty>
- Enclosing interface:
CfnTopicRule.CloudwatchMetricActionProperty
@Stability(Stable)
public static final class CfnTopicRule.CloudwatchMetricActionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTopicRule.CloudwatchMetricActionProperty>
A builder for
CfnTopicRule.CloudwatchMetricActionProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.metricName
(String metricName) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricName()
metricNamespace
(String metricNamespace) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricNamespace()
metricTimestamp
(String metricTimestamp) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricTimestamp()
metricUnit
(String metricUnit) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricUnit()
metricValue
(String metricValue) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricValue()
Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getRoleArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricName
@Stability(Stable) public CfnTopicRule.CloudwatchMetricActionProperty.Builder metricName(String metricName) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricName()
- Parameters:
metricName
- The CloudWatch metric name. This parameter is required.- Returns:
this
-
metricNamespace
@Stability(Stable) public CfnTopicRule.CloudwatchMetricActionProperty.Builder metricNamespace(String metricNamespace) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricNamespace()
- Parameters:
metricNamespace
- The CloudWatch metric namespace name. This parameter is required.- Returns:
this
-
metricUnit
@Stability(Stable) public CfnTopicRule.CloudwatchMetricActionProperty.Builder metricUnit(String metricUnit) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricUnit()
- Parameters:
metricUnit
- The metric unit supported by CloudWatch. This parameter is required.- Returns:
this
-
metricValue
@Stability(Stable) public CfnTopicRule.CloudwatchMetricActionProperty.Builder metricValue(String metricValue) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricValue()
- Parameters:
metricValue
- The CloudWatch metric value. This parameter is required.- Returns:
this
-
roleArn
@Stability(Stable) public CfnTopicRule.CloudwatchMetricActionProperty.Builder roleArn(String roleArn) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getRoleArn()
- Parameters:
roleArn
- The IAM role that allows access to the CloudWatch metric. This parameter is required.- Returns:
this
-
metricTimestamp
@Stability(Stable) public CfnTopicRule.CloudwatchMetricActionProperty.Builder metricTimestamp(String metricTimestamp) Sets the value ofCfnTopicRule.CloudwatchMetricActionProperty.getMetricTimestamp()
- Parameters:
metricTimestamp
- An optional Unix timestamp .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnTopicRule.CloudwatchMetricActionProperty>
- Returns:
- a new instance of
CfnTopicRule.CloudwatchMetricActionProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-