aws-cdk-lib.aws_iot.CfnCustomMetricProps

interface CfnCustomMetricProps

LanguageType name
.NETAmazon.CDK.AWS.IoT.CfnCustomMetricProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsiot#CfnCustomMetricProps
Javasoftware.amazon.awscdk.services.iot.CfnCustomMetricProps
Pythonaws_cdk.aws_iot.CfnCustomMetricProps
TypeScript aws-cdk-lib » aws_iot » CfnCustomMetricProps

Properties for defining a CfnCustomMetric.

Example

// 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 cfnCustomMetricProps: iot.CfnCustomMetricProps = {
  metricType: 'metricType',

  // the properties below are optional
  displayName: 'displayName',
  metricName: 'metricName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
metricTypestringThe type of the custom metric. Types include string-list , ip-address-list , number-list , and number .
displayName?stringThe friendly name in the console for the custom metric.
metricName?stringThe name of the custom metric.
tags?CfnTag[]Metadata that can be used to manage the custom metric.

metricType

Type: string

The type of the custom metric. Types include string-list , ip-address-list , number-list , and number .

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.


displayName?

Type: string (optional)

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.


metricName?

Type: string (optional)

The name of the custom metric.

This will be used in the metric report submitted from the device/thing. The name can't begin with aws: . You can’t change the name after you define it.


tags?

Type: CfnTag[] (optional)

Metadata that can be used to manage the custom metric.