Class CfnFleetMetricProps.Builder
java.lang.Object
software.amazon.awscdk.services.iot.CfnFleetMetricProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFleetMetricProps>
- Enclosing interface:
CfnFleetMetricProps
@Stability(Stable)
public static final class CfnFleetMetricProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFleetMetricProps>
A builder for
CfnFleetMetricProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaggregationField
(String aggregationField) Sets the value ofCfnFleetMetricProps.getAggregationField()
aggregationType
(IResolvable aggregationType) Sets the value ofCfnFleetMetricProps.getAggregationType()
aggregationType
(CfnFleetMetric.AggregationTypeProperty aggregationType) Sets the value ofCfnFleetMetricProps.getAggregationType()
build()
Builds the configured instance.description
(String description) Sets the value ofCfnFleetMetricProps.getDescription()
Sets the value ofCfnFleetMetricProps.getIndexName()
metricName
(String metricName) Sets the value ofCfnFleetMetricProps.getMetricName()
Sets the value ofCfnFleetMetricProps.getPeriod()
queryString
(String queryString) Sets the value ofCfnFleetMetricProps.getQueryString()
queryVersion
(String queryVersion) Sets the value ofCfnFleetMetricProps.getQueryVersion()
Sets the value ofCfnFleetMetricProps.getTags()
Sets the value ofCfnFleetMetricProps.getUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricName
Sets the value ofCfnFleetMetricProps.getMetricName()
- Parameters:
metricName
- The name of the fleet metric to create. This parameter is required.- Returns:
this
-
aggregationField
Sets the value ofCfnFleetMetricProps.getAggregationField()
- Parameters:
aggregationField
- The field to aggregate.- Returns:
this
-
aggregationType
Sets the value ofCfnFleetMetricProps.getAggregationType()
- Parameters:
aggregationType
- The type of the aggregation query.- Returns:
this
-
aggregationType
@Stability(Stable) public CfnFleetMetricProps.Builder aggregationType(CfnFleetMetric.AggregationTypeProperty aggregationType) Sets the value ofCfnFleetMetricProps.getAggregationType()
- Parameters:
aggregationType
- The type of the aggregation query.- Returns:
this
-
description
Sets the value ofCfnFleetMetricProps.getDescription()
- Parameters:
description
- The fleet metric description.- Returns:
this
-
indexName
Sets the value ofCfnFleetMetricProps.getIndexName()
- Parameters:
indexName
- The name of the index to search.- Returns:
this
-
period
Sets the value ofCfnFleetMetricProps.getPeriod()
- Parameters:
period
- The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.- Returns:
this
-
queryString
Sets the value ofCfnFleetMetricProps.getQueryString()
- Parameters:
queryString
- The search query string.- Returns:
this
-
queryVersion
Sets the value ofCfnFleetMetricProps.getQueryVersion()
- Parameters:
queryVersion
- The query version.- Returns:
this
-
tags
Sets the value ofCfnFleetMetricProps.getTags()
- Parameters:
tags
- Metadata which can be used to manage the fleet metric.- Returns:
this
-
unit
Sets the value ofCfnFleetMetricProps.getUnit()
- Parameters:
unit
- Used to support unit transformation such as milliseconds to seconds. Must be a unit supported by CW metric. Default to null.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnFleetMetricProps>
- Returns:
- a new instance of
CfnFleetMetricProps
- Throws:
NullPointerException
- if any required attribute was not provided
-