Class CfnAssetModel.AssetModelCompositeModelProperty
Contains information about a composite model in an asset model.
Inheritance
Namespace: Amazon.CDK.AWS.IoTSiteWise
Assembly: Amazon.CDK.AWS.IoTSiteWise.dll
Syntax (csharp)
public class AssetModelCompositeModelProperty : Object, CfnAssetModel.IAssetModelCompositeModelProperty
Syntax (vb)
Public Class AssetModelCompositeModelProperty
Inherits Object
Implements CfnAssetModel.IAssetModelCompositeModelProperty
Remarks
This object contains the asset property definitions that you define in the composite model. You can use composite asset models to define alarms on this asset model.
If you use the AssetModelCompositeModel
property to create an alarm, you must use the following information to define three asset model properties:
For the ARN of the alarm model, you can use the <code>Fn::Sub</code> intrinsic function to substitute the <code>AWS::Partition</code> , <code>AWS::Region</code> , and <code>AWS::AccountId</code> variables in an input string with values that you specify.
For example, Fn::Sub: "arn:${AWS::Partition}:iotevents:${AWS::Region}:${AWS::AccountId}:alarmModel/TestAlarmModel"
.
Replace TestAlarmModel
with the name of your alarm model.
For more information about using the Fn::Sub
intrinsic function, see Fn::Sub .
At the bottom of this page, we provide a YAML example that you can modify to create an alarm.
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.IoTSiteWise;
var assetModelCompositeModelProperty = new AssetModelCompositeModelProperty {
Name = "name",
Type = "type",
// the properties below are optional
CompositeModelProperties = new [] { new AssetModelPropertyProperty {
DataType = "dataType",
LogicalId = "logicalId",
Name = "name",
Type = new PropertyTypeProperty {
TypeName = "typeName",
// the properties below are optional
Attribute = new AttributeProperty {
DefaultValue = "defaultValue"
},
Metric = new MetricProperty {
Expression = "expression",
Variables = new [] { new ExpressionVariableProperty {
Name = "name",
Value = new VariableValueProperty {
PropertyLogicalId = "propertyLogicalId",
// the properties below are optional
HierarchyLogicalId = "hierarchyLogicalId"
}
} },
Window = new MetricWindowProperty {
Tumbling = new TumblingWindowProperty {
Interval = "interval",
// the properties below are optional
Offset = "offset"
}
}
},
Transform = new TransformProperty {
Expression = "expression",
Variables = new [] { new ExpressionVariableProperty {
Name = "name",
Value = new VariableValueProperty {
PropertyLogicalId = "propertyLogicalId",
// the properties below are optional
HierarchyLogicalId = "hierarchyLogicalId"
}
} }
}
},
// the properties below are optional
DataTypeSpec = "dataTypeSpec",
Unit = "unit"
} },
Description = "description"
};
Synopsis
Constructors
AssetModelCompositeModelProperty() |
Properties
CompositeModelProperties | The asset property definitions for this composite model. |
Description | The description of the composite model. |
Name | The name of the composite model. |
Type | The type of the composite model. |
Constructors
AssetModelCompositeModelProperty()
public AssetModelCompositeModelProperty()
Properties
CompositeModelProperties
The asset property definitions for this composite model.
public object CompositeModelProperties { get; set; }
Property Value
System.Object
Remarks
Description
The description of the composite model.
public string Description { get; set; }
Property Value
System.String
Remarks
Name
The name of the composite model.
public string Name { get; set; }
Property Value
System.String
Remarks
Type
The type of the composite model.
public string Type { get; set; }
Property Value
System.String
Remarks
For alarm composite models, this type is AWS/ALARM
.