Class CloudWatchPutMetricActionProps
(experimental) Configuration properties of an action for CloudWatch metric.
Inheritance
Namespace: Amazon.CDK.AWS.IoT.Actions.Alpha
Assembly: Amazon.CDK.AWS.IoT.Actions.Alpha.dll
Syntax (csharp)
public class CloudWatchPutMetricActionProps : Object, ICloudWatchPutMetricActionProps, ICommonActionProps
Syntax (vb)
Public Class CloudWatchPutMetricActionProps
Inherits Object
Implements ICloudWatchPutMetricActionProps, ICommonActionProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
var topicRule = new TopicRule(this, "TopicRule", new TopicRuleProps {
Sql = IotSql.FromStringAsVer20160323("SELECT topic(2) as device_id, namespace, unit, value, timestamp FROM 'device/+/data'"),
Actions = new [] {
new CloudWatchPutMetricAction(new CloudWatchPutMetricActionProps {
MetricName = "${topic(2)}",
MetricNamespace = "${namespace}",
MetricUnit = "${unit}",
MetricValue = "${value}",
MetricTimestamp = "${timestamp}"
}) }
});
Synopsis
Constructors
CloudWatchPutMetricActionProps() |
Properties
MetricName | (experimental) The CloudWatch metric name. |
MetricNamespace | (experimental) The CloudWatch metric namespace name. |
MetricTimestamp | (experimental) A string that contains the timestamp, expressed in seconds in Unix epoch time. |
MetricUnit | (experimental) The metric unit supported by CloudWatch. |
MetricValue | (experimental) A string that contains the CloudWatch metric value. |
Role | (experimental) The IAM role that allows access to AWS service. |
Constructors
CloudWatchPutMetricActionProps()
public CloudWatchPutMetricActionProps()
Properties
MetricName
(experimental) The CloudWatch metric name.
public string MetricName { get; set; }
Property Value
System.String
Remarks
Supports substitution templates.
Stability: Experimental
See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html
MetricNamespace
(experimental) The CloudWatch metric namespace name.
public string MetricNamespace { get; set; }
Property Value
System.String
Remarks
Supports substitution templates.
Stability: Experimental
See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html
MetricTimestamp
(experimental) A string that contains the timestamp, expressed in seconds in Unix epoch time.
public string MetricTimestamp { get; set; }
Property Value
System.String
Remarks
Supports substitution templates.
Default: - none -- Defaults to the current Unix epoch time.
Stability: Experimental
See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html
MetricUnit
(experimental) The metric unit supported by CloudWatch.
public string MetricUnit { get; set; }
Property Value
System.String
Remarks
Supports substitution templates.
Stability: Experimental
See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html
MetricValue
(experimental) A string that contains the CloudWatch metric value.
public string MetricValue { get; set; }
Property Value
System.String
Remarks
Supports substitution templates.
Stability: Experimental
See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html
Role
(experimental) The IAM role that allows access to AWS service.
public IRole Role { get; set; }
Property Value
Remarks
Default: a new role will be created
Stability: Experimental