Class CfnCustomMetric
A CloudFormation AWS::IoT::CustomMetric
.
Inherited Members
Namespace: Amazon.CDK.AWS.IoT
Assembly: Amazon.CDK.AWS.IoT.dll
Syntax (csharp)
public class CfnCustomMetric : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnCustomMetric
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Use the AWS::IoT::CustomMetric
resource to define a custom metric published by your devices to Device Defender. For API reference, see CreateCustomMetric and for general information, see Custom metrics .
CloudformationResource: AWS::IoT::CustomMetric
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-custommetric.html
ExampleMetadata: fixture=_generated
Examples
// 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 cfnCustomMetric = new CfnCustomMetric(this, "MyCfnCustomMetric", new CfnCustomMetricProps {
MetricType = "metricType",
// the properties below are optional
DisplayName = "displayName",
MetricName = "metricName",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnCustomMetric(Construct, String, ICfnCustomMetricProps) | Create a new |
CfnCustomMetric(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnCustomMetric(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrMetricArn | The Amazon Resource Number (ARN) of the custom metric; |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DisplayName | The friendly name in the console for the custom metric. |
MetricName | The name of the custom metric. |
MetricType | The type of the custom metric. Types include |
Tags | Metadata that can be used to manage the custom metric. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnCustomMetric(Construct, String, ICfnCustomMetricProps)
Create a new AWS::IoT::CustomMetric
.
public CfnCustomMetric(Construct scope, string id, ICfnCustomMetricProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnCustomMetricProps
- resource properties.
CfnCustomMetric(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnCustomMetric(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnCustomMetric(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnCustomMetric(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrMetricArn
The Amazon Resource Number (ARN) of the custom metric;
public virtual string AttrMetricArn { get; }
Property Value
System.String
Remarks
for example, arn: aws-partition :iot: region : accountId :custommetric/ metricName
.
CloudformationAttribute: MetricArn
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DisplayName
The friendly name in the console for the custom metric.
public virtual string DisplayName { get; set; }
Property Value
System.String
Remarks
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
The name of the custom metric.
public virtual string MetricName { get; set; }
Property Value
System.String
Remarks
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.
MetricType
The type of the custom metric. Types include string-list
, ip-address-list
, number-list
, and number
.
public virtual string MetricType { get; set; }
Property Value
System.String
Remarks
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.
Tags
Metadata that can be used to manage the custom metric.
public virtual TagManager Tags { get; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>