CfnFleetMetricProps Struct
Properties for defining a CfnFleetMetric.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const cfnFleetMetricProps: iot.CfnFleetMetricProps = {
metricName: 'metricName',
// the properties below are optional
aggregationField: 'aggregationField',
aggregationType: {
name: 'name',
values: ['values'],
},
description: 'description',
indexName: 'indexName',
period: 123,
queryString: 'queryString',
queryVersion: 'queryVersion',
tags: [{
key: 'key',
value: 'value',
}],
unit: 'unit',
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot
cfn_fleet_metric_props = iot.CfnFleetMetricProps(
metric_name="metricName",
# the properties below are optional
aggregation_field="aggregationField",
aggregation_type=iot.CfnFleetMetric.AggregationTypeProperty(
name="name",
values=["values"]
),
description="description",
index_name="indexName",
period=123,
query_string="queryString",
query_version="queryVersion",
tags=[CfnTag(
key="key",
value="value"
)],
unit="unit"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;
CfnFleetMetricProps cfnFleetMetricProps = CfnFleetMetricProps.builder()
.metricName("metricName")
// the properties below are optional
.aggregationField("aggregationField")
.aggregationType(AggregationTypeProperty.builder()
.name("name")
.values(List.of("values"))
.build())
.description("description")
.indexName("indexName")
.period(123)
.queryString("queryString")
.queryVersion("queryVersion")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.unit("unit")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;
var cfnFleetMetricProps = new CfnFleetMetricProps {
MetricName = "metricName",
// the properties below are optional
AggregationField = "aggregationField",
AggregationType = new AggregationTypeProperty {
Name = "name",
Values = new [] { "values" }
},
Description = "description",
IndexName = "indexName",
Period = 123,
QueryString = "queryString",
QueryVersion = "queryVersion",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Unit = "unit"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnFleetMetricProps := &CfnFleetMetricProps{
MetricName: jsii.String("metricName"),
// the properties below are optional
AggregationField: jsii.String("aggregationField"),
AggregationType: &AggregationTypeProperty{
Name: jsii.String("name"),
Values: []*string{
jsii.String("values"),
},
},
Description: jsii.String("description"),
IndexName: jsii.String("indexName"),
Period: jsii.Number(123),
QueryString: jsii.String("queryString"),
QueryVersion: jsii.String("queryVersion"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
Unit: jsii.String("unit"),
}
Properties
aggregationFieldoptionalstringaggregation_fieldoptionalstraggregationFieldoptionalStringAggregationFieldoptionalstringAggregationFieldoptional*string#The field to aggregate.
aggregationTypeoptionalIResolvable | CfnFleetMetric.AggregationTypePropertyaggregation_typeoptionaltyping.Union[IResolvable, AggregationTypeProperty]aggregationTypeoptionalIResolvableAggregationTypeoptionalIResolvableAggregationTypeoptionalinterface{}#The type of the aggregation query.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#The fleet metric description.
indexNameoptionalstringindex_nameoptionalstrindexNameoptionalStringIndexNameoptionalstringIndexNameoptional*string#The name of the index to search.
The name of the fleet metric to create.
periodoptionalnumberperiodoptionalint | floatperiodoptionalNumberPeriodoptionaldoublePeriodoptional*float64#The time in seconds between fleet metric emissions.
Range [60(1 min), 86400(1 day)] and must be multiple of 60.
queryStringoptionalstringquery_stringoptionalstrqueryStringoptionalStringQueryStringoptionalstringQueryStringoptional*string#The search query string.
queryVersionoptionalstringquery_versionoptionalstrqueryVersionoptionalStringQueryVersionoptionalstringQueryVersionoptional*string#The query version.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#Metadata which can be used to manage the fleet metric.
Used to support unit transformation such as milliseconds to seconds.
Must be a unit supported by CW metric. Default to null.