Class CfnAssetModel
Creates an asset model from specified property and hierarchy definitions.
Inherited Members
Namespace: Amazon.CDK.AWS.IoTSiteWise
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAssetModel : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnAssetModel
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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 .
You can create two types of asset models, ASSET_MODEL
or COMPONENT_MODEL
.
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
ComposedAssetModelId = "composedAssetModelId",
CompositeModelProperties = new [] { new AssetModelPropertyProperty {
DataType = "dataType",
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 {
HierarchyExternalId = "hierarchyExternalId",
HierarchyId = "hierarchyId",
HierarchyLogicalId = "hierarchyLogicalId",
PropertyExternalId = "propertyExternalId",
PropertyId = "propertyId",
PropertyLogicalId = "propertyLogicalId",
PropertyPath = new [] { new PropertyPathDefinitionProperty {
Name = "name"
} }
}
} },
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 {
HierarchyExternalId = "hierarchyExternalId",
HierarchyId = "hierarchyId",
HierarchyLogicalId = "hierarchyLogicalId",
PropertyExternalId = "propertyExternalId",
PropertyId = "propertyId",
PropertyLogicalId = "propertyLogicalId",
PropertyPath = new [] { new PropertyPathDefinitionProperty {
Name = "name"
} }
}
} }
}
},
// the properties below are optional
DataTypeSpec = "dataTypeSpec",
ExternalId = "externalId",
Id = "id",
LogicalId = "logicalId",
Unit = "unit"
} },
Description = "description",
ExternalId = "externalId",
Id = "id",
ParentAssetModelCompositeModelExternalId = "parentAssetModelCompositeModelExternalId",
Path = new [] { "path" }
} },
AssetModelDescription = "assetModelDescription",
AssetModelExternalId = "assetModelExternalId",
AssetModelHierarchies = new [] { new AssetModelHierarchyProperty {
ChildAssetModelId = "childAssetModelId",
Name = "name",
// the properties below are optional
ExternalId = "externalId",
Id = "id",
LogicalId = "logicalId"
} },
AssetModelProperties = new [] { new AssetModelPropertyProperty {
DataType = "dataType",
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 {
HierarchyExternalId = "hierarchyExternalId",
HierarchyId = "hierarchyId",
HierarchyLogicalId = "hierarchyLogicalId",
PropertyExternalId = "propertyExternalId",
PropertyId = "propertyId",
PropertyLogicalId = "propertyLogicalId",
PropertyPath = new [] { new PropertyPathDefinitionProperty {
Name = "name"
} }
}
} },
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 {
HierarchyExternalId = "hierarchyExternalId",
HierarchyId = "hierarchyId",
HierarchyLogicalId = "hierarchyLogicalId",
PropertyExternalId = "propertyExternalId",
PropertyId = "propertyId",
PropertyLogicalId = "propertyLogicalId",
PropertyPath = new [] { new PropertyPathDefinitionProperty {
Name = "name"
} }
}
} }
}
},
// the properties below are optional
DataTypeSpec = "dataTypeSpec",
ExternalId = "externalId",
Id = "id",
LogicalId = "logicalId",
Unit = "unit"
} },
AssetModelType = "assetModelType",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
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 |
CfnAssetModel(Construct, String, ICfnAssetModelProps) |
Properties
AssetModelCompositeModels | The composite models that are part of this asset model. |
AssetModelDescription | A description for the asset model. |
AssetModelExternalId | The external ID of the asset model. |
AssetModelHierarchies | The hierarchy definitions of the asset model. |
AssetModelName | A unique name for the asset model. |
AssetModelProperties | The property definitions of the asset model. |
AssetModelType | The type of asset model. |
AttrAssetModelArn | The ARN of the asset model, which has the following format. |
AttrAssetModelId | The ID of the asset model. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | 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(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
CfnAssetModel(Construct, String, ICfnAssetModelProps)
public CfnAssetModel(Construct scope, string id, ICfnAssetModelProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAssetModelProps
Resource properties.
Properties
AssetModelCompositeModels
The composite models that are part of this asset model.
public virtual object AssetModelCompositeModels { get; set; }
Property Value
System.Object
AssetModelDescription
A description for the asset model.
public virtual string AssetModelDescription { get; set; }
Property Value
System.String
AssetModelExternalId
The external ID of the asset model.
public virtual string AssetModelExternalId { get; set; }
Property Value
System.String
AssetModelHierarchies
The hierarchy definitions of the asset model.
public virtual object AssetModelHierarchies { get; set; }
Property Value
System.Object
AssetModelName
A unique name for the asset model.
public virtual string AssetModelName { get; set; }
Property Value
System.String
AssetModelProperties
The property definitions of the asset model.
public virtual object AssetModelProperties { get; set; }
Property Value
System.Object
AssetModelType
The type of asset model.
public virtual string AssetModelType { get; set; }
Property Value
System.String
AttrAssetModelArn
The ARN of the asset model, which has the following format.
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
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
A list of key-value pairs that contain metadata for the asset.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
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>