CfnAssetModelPropsMixin
- class aws_cdk.mixins_preview.aws_iotsitewise.mixins.CfnAssetModelPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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 anINTERFACE.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.
- See:
- CloudformationResource:
AWS::IoTSiteWise::AssetModel
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins cfn_asset_model_props_mixin = iotsitewise_mixins.CfnAssetModelPropsMixin(iotsitewise_mixins.CfnAssetModelMixinProps( asset_model_composite_models=[iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelCompositeModelProperty( composed_asset_model_id="composedAssetModelId", composite_model_properties=[iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelPropertyProperty( data_type="dataType", data_type_spec="dataTypeSpec", external_id="externalId", id="id", logical_id="logicalId", name="name", type=iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyTypeProperty( attribute=iotsitewise_mixins.CfnAssetModelPropsMixin.AttributeProperty( default_value="defaultValue" ), metric=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )], window=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricWindowProperty( tumbling=iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" ) ) ), transform=iotsitewise_mixins.CfnAssetModelPropsMixin.TransformProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )] ), type_name="typeName" ), unit="unit" )], description="description", external_id="externalId", id="id", name="name", parent_asset_model_composite_model_external_id="parentAssetModelCompositeModelExternalId", path=["path"], type="type" )], asset_model_description="assetModelDescription", asset_model_external_id="assetModelExternalId", asset_model_hierarchies=[iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelHierarchyProperty( child_asset_model_id="childAssetModelId", external_id="externalId", id="id", logical_id="logicalId", name="name" )], asset_model_name="assetModelName", asset_model_properties=[iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelPropertyProperty( data_type="dataType", data_type_spec="dataTypeSpec", external_id="externalId", id="id", logical_id="logicalId", name="name", type=iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyTypeProperty( attribute=iotsitewise_mixins.CfnAssetModelPropsMixin.AttributeProperty( default_value="defaultValue" ), metric=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )], window=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricWindowProperty( tumbling=iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" ) ) ), transform=iotsitewise_mixins.CfnAssetModelPropsMixin.TransformProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )] ), type_name="typeName" ), unit="unit" )], asset_model_type="assetModelType", enforced_asset_model_interface_relationships=[iotsitewise_mixins.CfnAssetModelPropsMixin.EnforcedAssetModelInterfaceRelationshipProperty( interface_asset_model_id="interfaceAssetModelId", property_mappings=[iotsitewise_mixins.CfnAssetModelPropsMixin.EnforcedAssetModelInterfacePropertyMappingProperty( asset_model_property_external_id="assetModelPropertyExternalId", asset_model_property_logical_id="assetModelPropertyLogicalId", interface_asset_model_property_external_id="interfaceAssetModelPropertyExternalId" )] )], tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::IoTSiteWise::AssetModel.- Parameters:
props (
Union[CfnAssetModelMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['assetModelCompositeModels', 'assetModelDescription', 'assetModelExternalId', 'assetModelHierarchies', 'assetModelName', 'assetModelProperties', 'assetModelType', 'enforcedAssetModelInterfaceRelationships', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AssetModelCompositeModelProperty
- class CfnAssetModelPropsMixin.AssetModelCompositeModelProperty(*, composed_asset_model_id=None, composite_model_properties=None, description=None, external_id=None, id=None, name=None, parent_asset_model_composite_model_external_id=None, path=None, type=None)
Bases:
objectContains information about a composite model in an asset model.
This object contains the asset property definitions that you define in the composite model.
- Parameters:
composed_asset_model_id (
Optional[str]) – The ID of a component model which is reused to create this composite model.composite_model_properties (
Union[IResolvable,Sequence[Union[IResolvable,AssetModelPropertyProperty,Dict[str,Any]]],None]) – The asset property definitions for this composite model.description (
Optional[str]) – The description of the composite model. .. epigraph:: If the composite model is acomponent-model-basedcomposite model, the description is inherited from theCOMPONENT_MODELasset model and cannot be changed.external_id (
Optional[str]) – The external ID of a composite model on this asset model. For more information, see Using external IDs in the AWS IoT SiteWise User Guide . .. epigraph:: One ofExternalIdorPathmust be specified.id (
Optional[str]) – The ID of the asset model composite model. .. epigraph:: This is a return value and can’t be set.name (
Optional[str]) – The name of the composite model.parent_asset_model_composite_model_external_id (
Optional[str]) –The external ID of the parent composite model. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
path (
Optional[Sequence[str]]) – The structured path to the property from the root of the asset using property names. Path is used as the ID if the asset model is a derived composite model. .. epigraph:: One ofExternalIdorPathmust be specified.type (
Optional[str]) – The type of the composite model. For alarm composite models, this type isAWS/ALARM.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins asset_model_composite_model_property = iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelCompositeModelProperty( composed_asset_model_id="composedAssetModelId", composite_model_properties=[iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelPropertyProperty( data_type="dataType", data_type_spec="dataTypeSpec", external_id="externalId", id="id", logical_id="logicalId", name="name", type=iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyTypeProperty( attribute=iotsitewise_mixins.CfnAssetModelPropsMixin.AttributeProperty( default_value="defaultValue" ), metric=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )], window=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricWindowProperty( tumbling=iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" ) ) ), transform=iotsitewise_mixins.CfnAssetModelPropsMixin.TransformProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )] ), type_name="typeName" ), unit="unit" )], description="description", external_id="externalId", id="id", name="name", parent_asset_model_composite_model_external_id="parentAssetModelCompositeModelExternalId", path=["path"], type="type" )
Attributes
- composed_asset_model_id
The ID of a component model which is reused to create this composite model.
- composite_model_properties
The asset property definitions for this composite model.
- description
The description of the composite model.
If the composite model is a
component-model-basedcomposite model, the description is inherited from theCOMPONENT_MODELasset model and cannot be changed.
- external_id
The external ID of a composite model on this asset model.
For more information, see Using external IDs in the AWS IoT SiteWise User Guide . .. epigraph:
One of ``ExternalId`` or ``Path`` must be specified.
- id
The ID of the asset model composite model.
This is a return value and can’t be set.
- name
The name of the composite model.
- parent_asset_model_composite_model_external_id
The external ID of the parent composite model.
For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
- path
The structured path to the property from the root of the asset using property names.
Path is used as the ID if the asset model is a derived composite model. .. epigraph:
One of ``ExternalId`` or ``Path`` must be specified.
- type
The type of the composite model.
For alarm composite models, this type is
AWS/ALARM.
AssetModelHierarchyProperty
- class CfnAssetModelPropsMixin.AssetModelHierarchyProperty(*, child_asset_model_id=None, external_id=None, id=None, logical_id=None, name=None)
Bases:
objectDescribes an asset hierarchy that contains a hierarchy’s name, ID, and child asset model ID that specifies the type of asset that can be in this hierarchy.
- Parameters:
child_asset_model_id (
Optional[str]) –The ID of the asset model, in UUID format. All assets in this hierarchy must be instances of the
childAssetModelIdasset model. AWS IoT SiteWise will always return the actual asset model ID for this value. However, when you are specifying this value as part of a call to UpdateAssetModel , you may provide either the asset model ID or elseexternalId:followed by the asset model’s external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .external_id (
Optional[str]) –The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel operation. You can assign an external ID by specifying this value as part of a call to UpdateAssetModel . However, you can’t change the external ID if one is already assigned. For more information, see Using external IDs in the AWS IoT SiteWise User Guide . .. epigraph:: One of
ExternalIdorLogicalIdmust be specified.id (
Optional[str]) –The ID of the asset model hierarchy. This ID is a
hierarchyId. .. epigraph:: This is a return value and can’t be set. - If you are callling UpdateAssetModel to create a new hierarchy: You can specify its ID here, if desired. AWS IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. However, if you prefer to supply your own ID instead, you can specify it here in UUID format. If you specify your own ID, it must be globally unique. - If you are calling UpdateAssetModel to modify an existing hierarchy: This can be either the actual ID in UUID format, or elseexternalId:followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the AWS IoT SiteWise User Guide .logical_id (
Optional[str]) – TheLogicalIDof the asset model hierarchy. This ID is ahierarchyLogicalId. .. epigraph:: One ofExternalIdorLogicalIdmust be specified.name (
Optional[str]) –The name of the asset model hierarchy that you specify by using the CreateAssetModel or UpdateAssetModel API operation.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins asset_model_hierarchy_property = iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelHierarchyProperty( child_asset_model_id="childAssetModelId", external_id="externalId", id="id", logical_id="logicalId", name="name" )
Attributes
- child_asset_model_id
The ID of the asset model, in UUID format.
All assets in this hierarchy must be instances of the
childAssetModelIdasset model. AWS IoT SiteWise will always return the actual asset model ID for this value. However, when you are specifying this value as part of a call to UpdateAssetModel , you may provide either the asset model ID or elseexternalId:followed by the asset model’s external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
- external_id
The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel operation. You can assign an external ID by specifying this value as part of a call to UpdateAssetModel . However, you can’t change the external ID if one is already assigned. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
One of
ExternalIdorLogicalIdmust be specified.
- id
The ID of the asset model hierarchy. This ID is a
hierarchyId.This is a return value and can’t be set.
If you are callling UpdateAssetModel to create a new hierarchy: You can specify its ID here, if desired. AWS IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. However, if you prefer to supply your own ID instead, you can specify it here in UUID format. If you specify your own ID, it must be globally unique.
If you are calling UpdateAssetModel to modify an existing hierarchy: This can be either the actual ID in UUID format, or else
externalId:followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the AWS IoT SiteWise User Guide .
- logical_id
The
LogicalIDof the asset model hierarchy. This ID is ahierarchyLogicalId.One of
ExternalIdorLogicalIdmust be specified.
- name
The name of the asset model hierarchy that you specify by using the CreateAssetModel or UpdateAssetModel API operation.
AssetModelPropertyProperty
- class CfnAssetModelPropsMixin.AssetModelPropertyProperty(*, data_type=None, data_type_spec=None, external_id=None, id=None, logical_id=None, name=None, type=None, unit=None)
Bases:
objectContains information about an asset model property.
- Parameters:
data_type (
Optional[str]) – The data type of the asset model property. If you specifySTRUCT, you must also specifydataTypeSpecto identify the type of the structure for this property.data_type_spec (
Optional[str]) – The data type of the structure for this property. This parameter exists on properties that have theSTRUCTdata type.external_id (
Optional[str]) –The external ID of the asset property. For more information, see Using external IDs in the AWS IoT SiteWise User Guide . .. epigraph:: One of
ExternalIdorLogicalIdmust be specified.id (
Optional[str]) – The ID of the property. .. epigraph:: This is a return value and can’t be set.logical_id (
Optional[str]) – TheLogicalIDof the asset model property. .. epigraph:: One ofExternalIdorLogicalIdmust be specified.name (
Optional[str]) – The name of the asset model property.type (
Union[IResolvable,PropertyTypeProperty,Dict[str,Any],None]) – Contains a property type, which can be one ofattribute,measurement,metric, ortransform.unit (
Optional[str]) – The unit of the asset model property, such asNewtonsorRPM.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins asset_model_property_property = iotsitewise_mixins.CfnAssetModelPropsMixin.AssetModelPropertyProperty( data_type="dataType", data_type_spec="dataTypeSpec", external_id="externalId", id="id", logical_id="logicalId", name="name", type=iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyTypeProperty( attribute=iotsitewise_mixins.CfnAssetModelPropsMixin.AttributeProperty( default_value="defaultValue" ), metric=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )], window=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricWindowProperty( tumbling=iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" ) ) ), transform=iotsitewise_mixins.CfnAssetModelPropsMixin.TransformProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )] ), type_name="typeName" ), unit="unit" )
Attributes
- data_type
The data type of the asset model property.
If you specify
STRUCT, you must also specifydataTypeSpecto identify the type of the structure for this property.
- data_type_spec
The data type of the structure for this property.
This parameter exists on properties that have the
STRUCTdata type.
- external_id
The external ID of the asset property.
For more information, see Using external IDs in the AWS IoT SiteWise User Guide . .. epigraph:
One of ``ExternalId`` or ``LogicalId`` must be specified.
- id
The ID of the property.
This is a return value and can’t be set.
- logical_id
The
LogicalIDof the asset model property.One of
ExternalIdorLogicalIdmust be specified.
- name
The name of the asset model property.
- type
Contains a property type, which can be one of
attribute,measurement,metric, ortransform.
- unit
The unit of the asset model property, such as
NewtonsorRPM.
AttributeProperty
- class CfnAssetModelPropsMixin.AttributeProperty(*, default_value=None)
Bases:
objectContains an asset attribute property.
For more information, see Attributes in the AWS IoT SiteWise User Guide .
- Parameters:
default_value (
Optional[str]) – The default value of the asset model property attribute. All assets that you create from the asset model contain this attribute value. You can update an attribute’s value after you create an asset. For more information, see Updating attribute values in the AWS IoT SiteWise User Guide .- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins attribute_property = iotsitewise_mixins.CfnAssetModelPropsMixin.AttributeProperty( default_value="defaultValue" )
Attributes
- default_value
The default value of the asset model property attribute.
All assets that you create from the asset model contain this attribute value. You can update an attribute’s value after you create an asset. For more information, see Updating attribute values in the AWS IoT SiteWise User Guide .
EnforcedAssetModelInterfacePropertyMappingProperty
- class CfnAssetModelPropsMixin.EnforcedAssetModelInterfacePropertyMappingProperty(*, asset_model_property_external_id=None, asset_model_property_logical_id=None, interface_asset_model_property_external_id=None)
Bases:
objectContains information about applied interface property and asset model property.
- Parameters:
asset_model_property_external_id (
Optional[str]) – The external ID of the linked asset model property.asset_model_property_logical_id (
Optional[str]) – The logical ID of the linked asset model property.interface_asset_model_property_external_id (
Optional[str]) – The external ID of the applied interface property.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins enforced_asset_model_interface_property_mapping_property = iotsitewise_mixins.CfnAssetModelPropsMixin.EnforcedAssetModelInterfacePropertyMappingProperty( asset_model_property_external_id="assetModelPropertyExternalId", asset_model_property_logical_id="assetModelPropertyLogicalId", interface_asset_model_property_external_id="interfaceAssetModelPropertyExternalId" )
Attributes
- asset_model_property_external_id
The external ID of the linked asset model property.
- asset_model_property_logical_id
The logical ID of the linked asset model property.
- interface_asset_model_property_external_id
The external ID of the applied interface property.
EnforcedAssetModelInterfaceRelationshipProperty
- class CfnAssetModelPropsMixin.EnforcedAssetModelInterfaceRelationshipProperty(*, interface_asset_model_id=None, property_mappings=None)
Bases:
objectContains information about applied interface hierarchy and asset model hierarchy.
- Parameters:
interface_asset_model_id (
Optional[str]) – The ID of the asset model that has the interface applied to it.property_mappings (
Union[IResolvable,Sequence[Union[IResolvable,EnforcedAssetModelInterfacePropertyMappingProperty,Dict[str,Any]]],None]) – A list of property mappings between the interface asset model and the asset model where the interface is applied.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins enforced_asset_model_interface_relationship_property = iotsitewise_mixins.CfnAssetModelPropsMixin.EnforcedAssetModelInterfaceRelationshipProperty( interface_asset_model_id="interfaceAssetModelId", property_mappings=[iotsitewise_mixins.CfnAssetModelPropsMixin.EnforcedAssetModelInterfacePropertyMappingProperty( asset_model_property_external_id="assetModelPropertyExternalId", asset_model_property_logical_id="assetModelPropertyLogicalId", interface_asset_model_property_external_id="interfaceAssetModelPropertyExternalId" )] )
Attributes
- interface_asset_model_id
The ID of the asset model that has the interface applied to it.
- property_mappings
A list of property mappings between the interface asset model and the asset model where the interface is applied.
ExpressionVariableProperty
- class CfnAssetModelPropsMixin.ExpressionVariableProperty(*, name=None, value=None)
Bases:
objectContains expression variable information.
- Parameters:
name (
Optional[str]) – The friendly name of the variable to be used in the expression.value (
Union[IResolvable,VariableValueProperty,Dict[str,Any],None]) – The variable that identifies an asset property from which to use values.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins expression_variable_property = iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )
Attributes
- name
The friendly name of the variable to be used in the expression.
- value
The variable that identifies an asset property from which to use values.
MetricProperty
- class CfnAssetModelPropsMixin.MetricProperty(*, expression=None, variables=None, window=None)
Bases:
objectContains an asset metric property.
With metrics, you can calculate aggregate functions, such as an average, maximum, or minimum, as specified through an expression. A metric maps several values to a single value (such as a sum).
The maximum number of dependent/cascading variables used in any one metric calculation is 10. Therefore, a root metric can have up to 10 cascading metrics in its computational dependency tree. Additionally, a metric can only have a data type of
DOUBLEand consume properties with data types ofINTEGERorDOUBLE.For more information, see Metrics in the AWS IoT SiteWise User Guide .
- Parameters:
expression (
Optional[str]) – The mathematical expression that defines the metric aggregation function. You can specify up to 10 variables per expression. You can specify up to 10 functions per expression. For more information, see Quotas in the AWS IoT SiteWise User Guide .variables (
Union[IResolvable,Sequence[Union[IResolvable,ExpressionVariableProperty,Dict[str,Any]]],None]) – The list of variables used in the expression.window (
Union[IResolvable,MetricWindowProperty,Dict[str,Any],None]) – The window (time interval) over which AWS IoT SiteWise computes the metric’s aggregation expression. AWS IoT SiteWise computes one data point perwindow.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins metric_property = iotsitewise_mixins.CfnAssetModelPropsMixin.MetricProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )], window=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricWindowProperty( tumbling=iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" ) ) )
Attributes
- expression
The mathematical expression that defines the metric aggregation function.
You can specify up to 10 variables per expression. You can specify up to 10 functions per expression.
For more information, see Quotas in the AWS IoT SiteWise User Guide .
- variables
The list of variables used in the expression.
- window
The window (time interval) over which AWS IoT SiteWise computes the metric’s aggregation expression.
AWS IoT SiteWise computes one data point per
window.
MetricWindowProperty
- class CfnAssetModelPropsMixin.MetricWindowProperty(*, tumbling=None)
Bases:
objectContains a time interval window used for data aggregate computations (for example, average, sum, count, and so on).
- Parameters:
tumbling (
Union[IResolvable,TumblingWindowProperty,Dict[str,Any],None]) – The tumbling time interval window.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins metric_window_property = iotsitewise_mixins.CfnAssetModelPropsMixin.MetricWindowProperty( tumbling=iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" ) )
Attributes
- tumbling
The tumbling time interval window.
PropertyPathDefinitionProperty
- class CfnAssetModelPropsMixin.PropertyPathDefinitionProperty(*, name=None)
Bases:
objectRepresents one level between a composite model and the root of the asset model.
- Parameters:
name (
Optional[str]) – The name of the path segment.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins property_path_definition_property = iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )
Attributes
PropertyTypeProperty
- class CfnAssetModelPropsMixin.PropertyTypeProperty(*, attribute=None, metric=None, transform=None, type_name=None)
Bases:
objectContains a property type, which can be one of
attribute,measurement,metric, ortransform.- Parameters:
attribute (
Union[IResolvable,AttributeProperty,Dict[str,Any],None]) – Specifies an asset attribute property. An attribute generally contains static information, such as the serial number of an IIoT wind turbine.metric (
Union[IResolvable,MetricProperty,Dict[str,Any],None]) – Specifies an asset metric property. A metric contains a mathematical expression that uses aggregate functions to process all input data points over a time interval and output a single data point, such as to calculate the average hourly temperature.transform (
Union[IResolvable,TransformProperty,Dict[str,Any],None]) – Specifies an asset transform property. A transform contains a mathematical expression that maps a property’s data points from one form to another, such as a unit conversion from Celsius to Fahrenheit.type_name (
Optional[str]) – The type of property type, which can be one ofAttribute,Measurement,Metric, orTransform.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins property_type_property = iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyTypeProperty( attribute=iotsitewise_mixins.CfnAssetModelPropsMixin.AttributeProperty( default_value="defaultValue" ), metric=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )], window=iotsitewise_mixins.CfnAssetModelPropsMixin.MetricWindowProperty( tumbling=iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" ) ) ), transform=iotsitewise_mixins.CfnAssetModelPropsMixin.TransformProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )] ), type_name="typeName" )
Attributes
- attribute
Specifies an asset attribute property.
An attribute generally contains static information, such as the serial number of an IIoT wind turbine.
- metric
Specifies an asset metric property.
A metric contains a mathematical expression that uses aggregate functions to process all input data points over a time interval and output a single data point, such as to calculate the average hourly temperature.
- transform
Specifies an asset transform property.
A transform contains a mathematical expression that maps a property’s data points from one form to another, such as a unit conversion from Celsius to Fahrenheit.
- type_name
The type of property type, which can be one of
Attribute,Measurement,Metric, orTransform.
TransformProperty
- class CfnAssetModelPropsMixin.TransformProperty(*, expression=None, variables=None)
Bases:
objectContains an asset transform property.
A transform is a one-to-one mapping of a property’s data points from one form to another. For example, you can use a transform to convert a Celsius data stream to Fahrenheit by applying the transformation expression to each data point of the Celsius stream. A transform can only have a data type of
DOUBLEand consume properties with data types ofINTEGERorDOUBLE.For more information, see Transforms in the AWS IoT SiteWise User Guide .
- Parameters:
expression (
Optional[str]) –The mathematical expression that defines the transformation function. You can specify up to 10 variables per expression. You can specify up to 10 functions per expression. For more information, see Quotas in the AWS IoT SiteWise User Guide .
variables (
Union[IResolvable,Sequence[Union[IResolvable,ExpressionVariableProperty,Dict[str,Any]]],None]) – The list of variables used in the expression.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins transform_property = iotsitewise_mixins.CfnAssetModelPropsMixin.TransformProperty( expression="expression", variables=[iotsitewise_mixins.CfnAssetModelPropsMixin.ExpressionVariableProperty( name="name", value=iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] ) )] )
Attributes
- expression
The mathematical expression that defines the transformation function.
You can specify up to 10 variables per expression. You can specify up to 10 functions per expression.
For more information, see Quotas in the AWS IoT SiteWise User Guide .
- variables
The list of variables used in the expression.
TumblingWindowProperty
- class CfnAssetModelPropsMixin.TumblingWindowProperty(*, interval=None, offset=None)
Bases:
objectContains a tumbling window, which is a repeating fixed-sized, non-overlapping, and contiguous time window.
You can use this window in metrics to aggregate data from properties and other assets.
You can use
m,h,d, andwwhen you specify an interval or offset. Note thatmrepresents minutes,hrepresents hours,drepresents days, andwrepresents weeks. You can also usesto represent seconds inoffset.The
intervalandoffsetparameters support the ISO 8601 format . For example,PT5Srepresents 5 seconds,PT5Mrepresents 5 minutes, andPT5Hrepresents 5 hours.- Parameters:
interval (
Optional[str]) – The time interval for the tumbling window. The interval time must be between 1 minute and 1 week. AWS IoT SiteWise computes the1winterval the end of Sunday at midnight each week (UTC), the1dinterval at the end of each day at midnight (UTC), the1hinterval at the end of each hour, and so on. When AWS IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. AWS IoT SiteWise places the computed data point at the end of the interval.offset (
Optional[str]) – The offset for the tumbling window. Theoffsetparameter accepts the following:. - The offset time. For example, if you specify18hforoffsetand1dforinterval, AWS IoT SiteWise aggregates data in one of the following ways: - If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric. - If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day. - The ISO 8601 format. For example, if you specifyPT18Hforoffsetand1dforinterval, AWS IoT SiteWise aggregates data in one of the following ways: - If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric. - If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day. - The 24-hour clock. For example, if you specify00:03:00foroffset,5mforinterval, and you create the metric at 2 PM (UTC), you get the first aggregation result at 2:03 PM (UTC). You get the second aggregation result at 2:08 PM (UTC). - The offset time zone. For example, if you specify2021-07-23T18:00-08foroffsetand1dforinterval, AWS IoT SiteWise aggregates data in one of the following ways: - If you create the metric before or at 6 PM (PST), you get the first aggregation result at 6 PM (PST) on the day when you create the metric. - If you create the metric after 6 PM (PST), you get the first aggregation result at 6 PM (PST) the next day.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins tumbling_window_property = iotsitewise_mixins.CfnAssetModelPropsMixin.TumblingWindowProperty( interval="interval", offset="offset" )
Attributes
- interval
The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.
AWS IoT SiteWise computes the
1winterval the end of Sunday at midnight each week (UTC), the1dinterval at the end of each day at midnight (UTC), the1hinterval at the end of each hour, and so on.When AWS IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. AWS IoT SiteWise places the computed data point at the end of the interval.
- offset
.
The offset time.
For example, if you specify
18hforoffsetand1dforinterval, AWS IoT SiteWise aggregates data in one of the following ways:If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
The ISO 8601 format.
For example, if you specify
PT18Hforoffsetand1dforinterval, AWS IoT SiteWise aggregates data in one of the following ways:If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
The 24-hour clock.
For example, if you specify
00:03:00foroffset,5mforinterval, and you create the metric at 2 PM (UTC), you get the first aggregation result at 2:03 PM (UTC). You get the second aggregation result at 2:08 PM (UTC).The offset time zone.
For example, if you specify
2021-07-23T18:00-08foroffsetand1dforinterval, AWS IoT SiteWise aggregates data in one of the following ways:If you create the metric before or at 6 PM (PST), you get the first aggregation result at 6 PM (PST) on the day when you create the metric.
If you create the metric after 6 PM (PST), you get the first aggregation result at 6 PM (PST) the next day.
- See:
- Type:
The offset for the tumbling window. The
offsetparameter accepts the following
VariableValueProperty
- class CfnAssetModelPropsMixin.VariableValueProperty(*, hierarchy_external_id=None, hierarchy_id=None, hierarchy_logical_id=None, property_external_id=None, property_id=None, property_logical_id=None, property_path=None)
Bases:
objectIdentifies a property value used in an expression.
- Parameters:
hierarchy_external_id (
Optional[str]) –The external ID of the hierarchy being referenced. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
hierarchy_id (
Optional[str]) –The ID of the hierarchy to query for the property ID. You can use the hierarchy’s name instead of the hierarchy’s ID. If the hierarchy has an external ID, you can specify
externalId:followed by the external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide . You use a hierarchy ID instead of a model ID because you can have several hierarchies using the same model and therefore the samepropertyId. For example, you might have separately grouped assets that come from the same asset model. For more information, see Asset hierarchies in the AWS IoT SiteWise User Guide .hierarchy_logical_id (
Optional[str]) – TheLogicalIDof the hierarchy to query for thePropertyLogicalID. You use ahierarchyLogicalIDinstead of a model ID because you can have several hierarchies using the same model and therefore the same property. For example, you might have separately grouped assets that come from the same asset model. For more information, see Defining relationships between asset models (hierarchies) in the AWS IoT SiteWise User Guide .property_external_id (
Optional[str]) –The external ID of the property being referenced. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
property_id (
Optional[str]) –The ID of the property to use as the variable. You can use the property
nameif it’s from the same asset model. If the property has an external ID, you can specifyexternalId:followed by the external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide . .. epigraph:: This is a return value and can’t be set.property_logical_id (
Optional[str]) – TheLogicalIDof the property that is being referenced.property_path (
Union[IResolvable,Sequence[Union[IResolvable,PropertyPathDefinitionProperty,Dict[str,Any]]],None]) – The path of the property. Each step of the path is the name of the step. See the following example:PropertyPath: Name: AssetModelName Name: Composite1 Name: NestedComposite
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotsitewise import mixins as iotsitewise_mixins variable_value_property = iotsitewise_mixins.CfnAssetModelPropsMixin.VariableValueProperty( hierarchy_external_id="hierarchyExternalId", hierarchy_id="hierarchyId", hierarchy_logical_id="hierarchyLogicalId", property_external_id="propertyExternalId", property_id="propertyId", property_logical_id="propertyLogicalId", property_path=[iotsitewise_mixins.CfnAssetModelPropsMixin.PropertyPathDefinitionProperty( name="name" )] )
Attributes
- hierarchy_external_id
The external ID of the hierarchy being referenced.
For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
- hierarchy_id
The ID of the hierarchy to query for the property ID.
You can use the hierarchy’s name instead of the hierarchy’s ID. If the hierarchy has an external ID, you can specify
externalId:followed by the external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .You use a hierarchy ID instead of a model ID because you can have several hierarchies using the same model and therefore the same
propertyId. For example, you might have separately grouped assets that come from the same asset model. For more information, see Asset hierarchies in the AWS IoT SiteWise User Guide .
- hierarchy_logical_id
The
LogicalIDof the hierarchy to query for thePropertyLogicalID.You use a
hierarchyLogicalIDinstead of a model ID because you can have several hierarchies using the same model and therefore the same property. For example, you might have separately grouped assets that come from the same asset model. For more information, see Defining relationships between asset models (hierarchies) in the AWS IoT SiteWise User Guide .
- property_external_id
The external ID of the property being referenced.
For more information, see Using external IDs in the AWS IoT SiteWise User Guide .
- property_id
The ID of the property to use as the variable.
You can use the property
nameif it’s from the same asset model. If the property has an external ID, you can specifyexternalId:followed by the external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide . .. epigraph:This is a return value and can't be set.
- property_logical_id
The
LogicalIDof the property that is being referenced.
- property_path
The path of the property.
Each step of the path is the name of the step. See the following example:
PropertyPath: Name: AssetModelName Name: Composite1 Name: NestedComposite