Class CfnAssetModel
A CloudFormation AWS::IoTSiteWise::AssetModel
.
Inherited Members
Namespace: Amazon.CDK.AWS.IoTSiteWise
Assembly: Amazon.CDK.AWS.IoTSiteWise.dll
Syntax (csharp)
public class CfnAssetModel : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnAssetModel
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Creates an asset model from specified property and hierarchy definitions. You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see Defining asset models in the AWS IoT SiteWise User Guide .
CloudformationResource: AWS::IoTSiteWise::AssetModel
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 cfnAssetModel = new CfnAssetModel(this, "MyCfnAssetModel", new CfnAssetModelProps {
AssetModelName = "assetModelName",
// the properties below are optional
AssetModelCompositeModels = new [] { 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"
} },
AssetModelDescription = "assetModelDescription",
AssetModelHierarchies = new [] { new AssetModelHierarchyProperty {
ChildAssetModelId = "childAssetModelId",
LogicalId = "logicalId",
Name = "name"
} },
AssetModelProperties = 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"
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnAssetModel(Construct, String, ICfnAssetModelProps) | Create a new |
CfnAssetModel(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAssetModel(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AssetModelCompositeModels | The composite asset models that are part of this asset model. |
AssetModelDescription | A description for the asset model. |
AssetModelHierarchies | The hierarchy definitions of the asset model. |
AssetModelName | A unique, friendly name for the asset model. |
AssetModelProperties | The property definitions of the asset model. |
AttrAssetModelArn | |
AttrAssetModelId | The ID of the asset model. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Tags | A list of key-value pairs that contain metadata for the asset. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAssetModel(Construct, String, ICfnAssetModelProps)
Create a new AWS::IoTSiteWise::AssetModel
.
public CfnAssetModel(Construct scope, string id, ICfnAssetModelProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnAssetModelProps
- resource properties.
CfnAssetModel(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAssetModel(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAssetModel(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAssetModel(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AssetModelCompositeModels
The composite asset models that are part of this asset model.
public virtual object AssetModelCompositeModels { get; set; }
Property Value
System.Object
Remarks
Composite asset models are asset models that contain specific properties. Each composite model has a type that defines the properties that the composite model supports. You can use composite asset models to define alarms on this asset model.
AssetModelDescription
A description for the asset model.
public virtual string AssetModelDescription { get; set; }
Property Value
System.String
Remarks
AssetModelHierarchies
The hierarchy definitions of the asset model.
public virtual object AssetModelHierarchies { get; set; }
Property Value
System.Object
Remarks
Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Defining relationships between assets in the AWS IoT SiteWise User Guide .
You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
AssetModelName
A unique, friendly name for the asset model.
public virtual string AssetModelName { get; set; }
Property Value
System.String
Remarks
The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+
.
AssetModelProperties
The property definitions of the asset model.
public virtual object AssetModelProperties { get; set; }
Property Value
System.Object
Remarks
For more information, see Defining data properties in the AWS IoT SiteWise User Guide .
You can specify up to 200 properties per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
AttrAssetModelArn
public virtual string AttrAssetModelArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: AssetModelArn
AttrAssetModelId
The ID of the asset model.
public virtual string AttrAssetModelId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: AssetModelId
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
Tags
A list of key-value pairs that contain metadata for the asset.
public virtual TagManager Tags { get; }
Property Value
Remarks
For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide .
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>