class CfnAssetModelPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.IoTSiteWise.Mixins.CfnAssetModelPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsiotsitewise/mixins#CfnAssetModelPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.iotsitewise.mixins.CfnAssetModelPropsMixin |
Python | aws_cdk.mixins_preview.aws_iotsitewise.mixins.CfnAssetModelPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_iotsitewise » mixins » CfnAssetModelPropsMixin |
Implements
IMixin
Extends
Mixin
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 .
You can create three types of asset models, ASSET_MODEL , COMPONENT_MODEL , or an INTERFACE .
- ASSET_MODEL – (default) An asset model that you can use to create assets. Can't be included as a component in another asset model.
- COMPONENT_MODEL – A reusable component that you can include in the composite models of other asset models. You can't create assets directly from this type of asset model.
- INTERFACE – An interface is a type of model that defines a standard structure that can be applied to different asset models.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as iotsitewise_mixins } from '@aws-cdk/mixins-preview/aws-iotsitewise';
const cfnAssetModelPropsMixin = new iotsitewise_mixins.CfnAssetModelPropsMixin({
assetModelCompositeModels: [{
composedAssetModelId: 'composedAssetModelId',
compositeModelProperties: [{
dataType: 'dataType',
dataTypeSpec: 'dataTypeSpec',
externalId: 'externalId',
id: 'id',
logicalId: 'logicalId',
name: 'name',
type: {
attribute: {
defaultValue: 'defaultValue',
},
metric: {
expression: 'expression',
variables: [{
name: 'name',
value: {
hierarchyExternalId: 'hierarchyExternalId',
hierarchyId: 'hierarchyId',
hierarchyLogicalId: 'hierarchyLogicalId',
propertyExternalId: 'propertyExternalId',
propertyId: 'propertyId',
propertyLogicalId: 'propertyLogicalId',
propertyPath: [{
name: 'name',
}],
},
}],
window: {
tumbling: {
interval: 'interval',
offset: 'offset',
},
},
},
transform: {
expression: 'expression',
variables: [{
name: 'name',
value: {
hierarchyExternalId: 'hierarchyExternalId',
hierarchyId: 'hierarchyId',
hierarchyLogicalId: 'hierarchyLogicalId',
propertyExternalId: 'propertyExternalId',
propertyId: 'propertyId',
propertyLogicalId: 'propertyLogicalId',
propertyPath: [{
name: 'name',
}],
},
}],
},
typeName: 'typeName',
},
unit: 'unit',
}],
description: 'description',
externalId: 'externalId',
id: 'id',
name: 'name',
parentAssetModelCompositeModelExternalId: 'parentAssetModelCompositeModelExternalId',
path: ['path'],
type: 'type',
}],
assetModelDescription: 'assetModelDescription',
assetModelExternalId: 'assetModelExternalId',
assetModelHierarchies: [{
childAssetModelId: 'childAssetModelId',
externalId: 'externalId',
id: 'id',
logicalId: 'logicalId',
name: 'name',
}],
assetModelName: 'assetModelName',
assetModelProperties: [{
dataType: 'dataType',
dataTypeSpec: 'dataTypeSpec',
externalId: 'externalId',
id: 'id',
logicalId: 'logicalId',
name: 'name',
type: {
attribute: {
defaultValue: 'defaultValue',
},
metric: {
expression: 'expression',
variables: [{
name: 'name',
value: {
hierarchyExternalId: 'hierarchyExternalId',
hierarchyId: 'hierarchyId',
hierarchyLogicalId: 'hierarchyLogicalId',
propertyExternalId: 'propertyExternalId',
propertyId: 'propertyId',
propertyLogicalId: 'propertyLogicalId',
propertyPath: [{
name: 'name',
}],
},
}],
window: {
tumbling: {
interval: 'interval',
offset: 'offset',
},
},
},
transform: {
expression: 'expression',
variables: [{
name: 'name',
value: {
hierarchyExternalId: 'hierarchyExternalId',
hierarchyId: 'hierarchyId',
hierarchyLogicalId: 'hierarchyLogicalId',
propertyExternalId: 'propertyExternalId',
propertyId: 'propertyId',
propertyLogicalId: 'propertyLogicalId',
propertyPath: [{
name: 'name',
}],
},
}],
},
typeName: 'typeName',
},
unit: 'unit',
}],
assetModelType: 'assetModelType',
enforcedAssetModelInterfaceRelationships: [{
interfaceAssetModelId: 'interfaceAssetModelId',
propertyMappings: [{
assetModelPropertyExternalId: 'assetModelPropertyExternalId',
assetModelPropertyLogicalId: 'assetModelPropertyLogicalId',
interfaceAssetModelPropertyExternalId: 'interfaceAssetModelPropertyExternalId',
}],
}],
tags: [{
key: 'key',
value: 'value',
}],
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnAssetModelPropsMixin(props: CfnAssetModelMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Asset Model Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::IoTSiteWise::AssetModel.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript