Class CfnCustomMetricProps.Builder
java.lang.Object
software.amazon.awscdk.services.iot.CfnCustomMetricProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCustomMetricProps>
- Enclosing interface:
- CfnCustomMetricProps
@Stability(Stable)
public static final class CfnCustomMetricProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCustomMetricProps>
A builder for
CfnCustomMetricProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.displayName
(String displayName) Sets the value ofCfnCustomMetricProps.getDisplayName()
metricName
(String metricName) Sets the value ofCfnCustomMetricProps.getMetricName()
metricType
(String metricType) Sets the value ofCfnCustomMetricProps.getMetricType()
Sets the value ofCfnCustomMetricProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricType
Sets the value ofCfnCustomMetricProps.getMetricType()
- Parameters:
metricType
- The type of the custom metric. Types includestring-list
,ip-address-list
,number-list
, andnumber
. This parameter is required.The type
number
only takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.- Returns:
this
-
displayName
Sets the value ofCfnCustomMetricProps.getDisplayName()
- Parameters:
displayName
- The friendly name in the console for the custom metric. This name doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.- Returns:
this
-
metricName
Sets the value ofCfnCustomMetricProps.getMetricName()
- Parameters:
metricName
- The name of the custom metric. This will be used in the metric report submitted from the device/thing. The name can't begin withaws:
. You can’t change the name after you define it.- Returns:
this
-
tags
Sets the value ofCfnCustomMetricProps.getTags()
- Parameters:
tags
- Metadata that can be used to manage the custom metric.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnCustomMetricProps>
- Returns:
- a new instance of
CfnCustomMetricProps
- Throws:
NullPointerException
- if any required attribute was not provided
-