package awscdkiotactionsalpha import ( "github.com/aws/aws-cdk-go/awscdk/v2/awsiam" ) // Configuration properties of an action for CloudWatch metric. // // Example: // topicRule := iot.NewTopicRule(this, jsii.String("TopicRule"), &TopicRuleProps{ // Sql: iot.IotSql_FromStringAsVer20160323(jsii.String("SELECT topic(2) as device_id, namespace, unit, value, timestamp FROM 'device/+/data'")), // Actions: []iAction{ // actions.NewCloudWatchPutMetricAction(&CloudWatchPutMetricActionProps{ // MetricName: jsii.String("${topic(2)}"), // MetricNamespace: jsii.String("${namespace}"), // MetricUnit: jsii.String("${unit}"), // MetricValue: jsii.String("${value}"), // MetricTimestamp: jsii.String("${timestamp}"), // }), // }, // }) // // Experimental. type CloudWatchPutMetricActionProps struct { // The IAM role that allows access to AWS service. // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // The CloudWatch metric name. // // Supports substitution templates. // See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html // // Experimental. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // The CloudWatch metric namespace name. // // Supports substitution templates. // See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html // // Experimental. MetricNamespace *string `field:"required" json:"metricNamespace" yaml:"metricNamespace"` // The metric unit supported by CloudWatch. // // Supports substitution templates. // See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html // // Experimental. MetricUnit *string `field:"required" json:"metricUnit" yaml:"metricUnit"` // A string that contains the CloudWatch metric value. // // Supports substitution templates. // See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html // // Experimental. MetricValue *string `field:"required" json:"metricValue" yaml:"metricValue"` // A string that contains the timestamp, expressed in seconds in Unix epoch time. // // Supports substitution templates. // See: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html // // Experimental. MetricTimestamp *string `field:"optional" json:"metricTimestamp" yaml:"metricTimestamp"` }