CfnAssetModel

class aws_cdk.aws_iotsitewise.CfnAssetModel(scope, id, *, asset_model_name, asset_model_composite_models=None, asset_model_description=None, asset_model_hierarchies=None, asset_model_properties=None, tags=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::IoTSiteWise::AssetModel.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

cfn_asset_model = iotsitewise.CfnAssetModel(self, "MyCfnAssetModel",
    asset_model_name="assetModelName",

    # the properties below are optional
    asset_model_composite_models=[iotsitewise.CfnAssetModel.AssetModelCompositeModelProperty(
        name="name",
        type="type",

        # the properties below are optional
        composite_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
            data_type="dataType",
            logical_id="logicalId",
            name="name",
            type=iotsitewise.CfnAssetModel.PropertyTypeProperty(
                type_name="typeName",

                # the properties below are optional
                attribute=iotsitewise.CfnAssetModel.AttributeProperty(
                    default_value="defaultValue"
                ),
                metric=iotsitewise.CfnAssetModel.MetricProperty(
                    expression="expression",
                    variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                        name="name",
                        value=iotsitewise.CfnAssetModel.VariableValueProperty(
                            property_logical_id="propertyLogicalId",

                            # the properties below are optional
                            hierarchy_logical_id="hierarchyLogicalId"
                        )
                    )],
                    window=iotsitewise.CfnAssetModel.MetricWindowProperty(
                        tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
                            interval="interval",

                            # the properties below are optional
                            offset="offset"
                        )
                    )
                ),
                transform=iotsitewise.CfnAssetModel.TransformProperty(
                    expression="expression",
                    variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                        name="name",
                        value=iotsitewise.CfnAssetModel.VariableValueProperty(
                            property_logical_id="propertyLogicalId",

                            # the properties below are optional
                            hierarchy_logical_id="hierarchyLogicalId"
                        )
                    )]
                )
            ),

            # the properties below are optional
            data_type_spec="dataTypeSpec",
            unit="unit"
        )],
        description="description"
    )],
    asset_model_description="assetModelDescription",
    asset_model_hierarchies=[iotsitewise.CfnAssetModel.AssetModelHierarchyProperty(
        child_asset_model_id="childAssetModelId",
        logical_id="logicalId",
        name="name"
    )],
    asset_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
        data_type="dataType",
        logical_id="logicalId",
        name="name",
        type=iotsitewise.CfnAssetModel.PropertyTypeProperty(
            type_name="typeName",

            # the properties below are optional
            attribute=iotsitewise.CfnAssetModel.AttributeProperty(
                default_value="defaultValue"
            ),
            metric=iotsitewise.CfnAssetModel.MetricProperty(
                expression="expression",
                variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                    name="name",
                    value=iotsitewise.CfnAssetModel.VariableValueProperty(
                        property_logical_id="propertyLogicalId",

                        # the properties below are optional
                        hierarchy_logical_id="hierarchyLogicalId"
                    )
                )],
                window=iotsitewise.CfnAssetModel.MetricWindowProperty(
                    tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
                        interval="interval",

                        # the properties below are optional
                        offset="offset"
                    )
                )
            ),
            transform=iotsitewise.CfnAssetModel.TransformProperty(
                expression="expression",
                variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                    name="name",
                    value=iotsitewise.CfnAssetModel.VariableValueProperty(
                        property_logical_id="propertyLogicalId",

                        # the properties below are optional
                        hierarchy_logical_id="hierarchyLogicalId"
                    )
                )]
            )
        ),

        # the properties below are optional
        data_type_spec="dataTypeSpec",
        unit="unit"
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Create a new AWS::IoTSiteWise::AssetModel.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • asset_model_name (str) – A unique, friendly name for the asset model. The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

  • asset_model_composite_models (Union[IResolvable, Sequence[Union[IResolvable, AssetModelCompositeModelProperty]], None]) – The composite asset models that are part of this asset model. 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.

  • asset_model_description (Optional[str]) – A description for the asset model.

  • asset_model_hierarchies (Union[IResolvable, Sequence[Union[IResolvable, AssetModelHierarchyProperty]], None]) – The hierarchy definitions of the asset model. 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 .

  • asset_model_properties (Union[IResolvable, Sequence[Union[IResolvable, AssetModelPropertyProperty]], None]) –

    The property definitions of the asset model. 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 .

  • tags (Optional[Sequence[CfnTag]]) – A list of key-value pairs that contain metadata for the asset. For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}
Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::IoTSiteWise::AssetModel'
asset_model_composite_models

The composite asset models that are part of this asset model.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelcompositemodels

Return type

Union[IResolvable, List[Union[IResolvable, AssetModelCompositeModelProperty]], None]

asset_model_description

A description for the asset model.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodeldescription

Return type

Optional[str]

asset_model_hierarchies

The hierarchy definitions of the asset model.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelhierarchies

Return type

Union[IResolvable, List[Union[IResolvable, AssetModelHierarchyProperty]], None]

asset_model_name

A unique, friendly name for the asset model.

The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelname

Return type

str

asset_model_properties

The property definitions of the asset model.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelproperties

Return type

Union[IResolvable, List[Union[IResolvable, AssetModelPropertyProperty]], None]

attr_asset_model_arn

AssetModelArn

Type

cloudformationAttribute

Return type

str

attr_asset_model_id

The ID of the asset model.

CloudformationAttribute

AssetModelId

Return type

str

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

Return type

ConstructNode

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

tags

A list of key-value pairs that contain metadata for the asset.

For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-tags

Return type

TagManager

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

AssetModelCompositeModelProperty

class CfnAssetModel.AssetModelCompositeModelProperty(*, name, type, composite_model_properties=None, description=None)

Bases: object

Contains information about a composite model in an asset model.

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:

  • Use an asset model property to specify the alarm type.

  • The name must be AWS/ALARM_TYPE .

  • The data type must be STRING .

  • For the Type property, the type name must be Attribute and the default value must be IOT_EVENTS .

  • Use an asset model property to specify the alarm source.

  • The name must be AWS/ALARM_SOURCE .

  • The data type must be STRING .

  • For the Type property, the type name must be Attribute and the default value must be the ARN of the alarm model that you created in AWS IoT Events .

For the ARN of the alarm model, you can use the Fn::Sub intrinsic function to substitute the AWS::Partition , AWS::Region , and AWS::AccountId 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 .

  • Use an asset model property to specify the state of the alarm.

  • The name must be AWS/ALARM_STATE .

  • The data type must be STRUCT .

  • The DataTypeSpec value must be AWS/ALARM_STATE .

  • For the Type property, the type name must be Measurement .

At the bottom of this page, we provide a YAML example that you can modify to create an alarm.

Parameters
  • name (str) – The name of the composite model.

  • type (str) – The type of the composite model. For alarm composite models, this type is AWS/ALARM .

  • composite_model_properties (Union[IResolvable, Sequence[Union[IResolvable, AssetModelPropertyProperty]], None]) – The asset property definitions for this composite model.

  • description (Optional[str]) – The description of the composite model.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelcompositemodel.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

asset_model_composite_model_property = iotsitewise.CfnAssetModel.AssetModelCompositeModelProperty(
    name="name",
    type="type",

    # the properties below are optional
    composite_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
        data_type="dataType",
        logical_id="logicalId",
        name="name",
        type=iotsitewise.CfnAssetModel.PropertyTypeProperty(
            type_name="typeName",

            # the properties below are optional
            attribute=iotsitewise.CfnAssetModel.AttributeProperty(
                default_value="defaultValue"
            ),
            metric=iotsitewise.CfnAssetModel.MetricProperty(
                expression="expression",
                variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                    name="name",
                    value=iotsitewise.CfnAssetModel.VariableValueProperty(
                        property_logical_id="propertyLogicalId",

                        # the properties below are optional
                        hierarchy_logical_id="hierarchyLogicalId"
                    )
                )],
                window=iotsitewise.CfnAssetModel.MetricWindowProperty(
                    tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
                        interval="interval",

                        # the properties below are optional
                        offset="offset"
                    )
                )
            ),
            transform=iotsitewise.CfnAssetModel.TransformProperty(
                expression="expression",
                variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                    name="name",
                    value=iotsitewise.CfnAssetModel.VariableValueProperty(
                        property_logical_id="propertyLogicalId",

                        # the properties below are optional
                        hierarchy_logical_id="hierarchyLogicalId"
                    )
                )]
            )
        ),

        # the properties below are optional
        data_type_spec="dataTypeSpec",
        unit="unit"
    )],
    description="description"
)

Attributes

composite_model_properties

The asset property definitions for this composite model.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelcompositemodel.html#cfn-iotsitewise-assetmodel-assetmodelcompositemodel-compositemodelproperties

Return type

Union[IResolvable, List[Union[IResolvable, AssetModelPropertyProperty]], None]

description

The description of the composite model.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelcompositemodel.html#cfn-iotsitewise-assetmodel-assetmodelcompositemodel-description

Return type

Optional[str]

name

The name of the composite model.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelcompositemodel.html#cfn-iotsitewise-assetmodel-assetmodelcompositemodel-name

Return type

str

type

The type of the composite model.

For alarm composite models, this type is AWS/ALARM .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelcompositemodel.html#cfn-iotsitewise-assetmodel-assetmodelcompositemodel-type

Return type

str

AssetModelHierarchyProperty

class CfnAssetModel.AssetModelHierarchyProperty(*, child_asset_model_id, logical_id, name)

Bases: object

Describes an asset hierarchy that contains a hierarchy’s name, LogicalID , and child asset model ID that specifies the type of asset that can be in this hierarchy.

Parameters
  • child_asset_model_id (str) – The Id of the asset model.

  • logical_id (str) – The LogicalID of the asset model hierarchy. This ID is a hierarchyLogicalId . The maximum length is 256 characters, with the pattern [^\ u0000-\ u001F\ u007F]+

  • name (str) – The name of the asset model hierarchy. The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

asset_model_hierarchy_property = iotsitewise.CfnAssetModel.AssetModelHierarchyProperty(
    child_asset_model_id="childAssetModelId",
    logical_id="logicalId",
    name="name"
)

Attributes

child_asset_model_id

The Id of the asset model.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-childassetmodelid

Return type

str

logical_id

The LogicalID of the asset model hierarchy. This ID is a hierarchyLogicalId .

The maximum length is 256 characters, with the pattern [^\ u0000-\ u001F\ u007F]+

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-logicalid

Return type

str

name

The name of the asset model hierarchy.

The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-name

Return type

str

AssetModelPropertyProperty

class CfnAssetModel.AssetModelPropertyProperty(*, data_type, logical_id, name, type, data_type_spec=None, unit=None)

Bases: object

Contains information about an asset model property.

Parameters
  • data_type (str) – The data type of the asset model property. The value can be STRING , INTEGER , DOUBLE , BOOLEAN , or STRUCT .

  • logical_id (str) – The LogicalID of the asset model property. The maximum length is 256 characters, with the pattern [^\\ u0000-\\ u001F\\ u007F]+ .

  • name (str) – The name of the asset model property. The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

  • type (Union[IResolvable, PropertyTypeProperty]) – Contains a property type, which can be one of attribute , measurement , metric , or transform .

  • data_type_spec (Optional[str]) – The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

  • unit (Optional[str]) – The unit of the asset model property, such as Newtons or RPM .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

asset_model_property_property = iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
    data_type="dataType",
    logical_id="logicalId",
    name="name",
    type=iotsitewise.CfnAssetModel.PropertyTypeProperty(
        type_name="typeName",

        # the properties below are optional
        attribute=iotsitewise.CfnAssetModel.AttributeProperty(
            default_value="defaultValue"
        ),
        metric=iotsitewise.CfnAssetModel.MetricProperty(
            expression="expression",
            variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                name="name",
                value=iotsitewise.CfnAssetModel.VariableValueProperty(
                    property_logical_id="propertyLogicalId",

                    # the properties below are optional
                    hierarchy_logical_id="hierarchyLogicalId"
                )
            )],
            window=iotsitewise.CfnAssetModel.MetricWindowProperty(
                tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
                    interval="interval",

                    # the properties below are optional
                    offset="offset"
                )
            )
        ),
        transform=iotsitewise.CfnAssetModel.TransformProperty(
            expression="expression",
            variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                name="name",
                value=iotsitewise.CfnAssetModel.VariableValueProperty(
                    property_logical_id="propertyLogicalId",

                    # the properties below are optional
                    hierarchy_logical_id="hierarchyLogicalId"
                )
            )]
        )
    ),

    # the properties below are optional
    data_type_spec="dataTypeSpec",
    unit="unit"
)

Attributes

data_type

The data type of the asset model property.

The value can be STRING , INTEGER , DOUBLE , BOOLEAN , or STRUCT .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-datatype

Return type

str

data_type_spec

The data type of the structure for this property.

This parameter exists on properties that have the STRUCT data type.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-datatypespec

Return type

Optional[str]

logical_id

The LogicalID of the asset model property.

The maximum length is 256 characters, with the pattern [^\\ u0000-\\ u001F\\ u007F]+ .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-logicalid

Return type

str

name

The name of the asset model property.

The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-name

Return type

str

type

Contains a property type, which can be one of attribute , measurement , metric , or transform .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-type

Return type

Union[IResolvable, PropertyTypeProperty]

unit

The unit of the asset model property, such as Newtons or RPM .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-unit

Return type

Optional[str]

AttributeProperty

class CfnAssetModel.AttributeProperty(*, default_value=None)

Bases: object

Contains an asset attribute property.

For more information, see Defining data properties 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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-attribute.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

attribute_property = iotsitewise.CfnAssetModel.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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-attribute.html#cfn-iotsitewise-assetmodel-attribute-defaultvalue

Return type

Optional[str]

ExpressionVariableProperty

class CfnAssetModel.ExpressionVariableProperty(*, name, value)

Bases: object

Contains expression variable information.

Parameters
  • name (str) – The friendly name of the variable to be used in the expression. The maximum length is 64 characters with the pattern ^[a-z][a-z0-9_]*$ .

  • value (Union[IResolvable, VariableValueProperty]) – The variable that identifies an asset property from which to use values.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

expression_variable_property = iotsitewise.CfnAssetModel.ExpressionVariableProperty(
    name="name",
    value=iotsitewise.CfnAssetModel.VariableValueProperty(
        property_logical_id="propertyLogicalId",

        # the properties below are optional
        hierarchy_logical_id="hierarchyLogicalId"
    )
)

Attributes

name

The friendly name of the variable to be used in the expression.

The maximum length is 64 characters with the pattern ^[a-z][a-z0-9_]*$ .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html#cfn-iotsitewise-assetmodel-expressionvariable-name

Return type

str

value

The variable that identifies an asset property from which to use values.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html#cfn-iotsitewise-assetmodel-expressionvariable-value

Return type

Union[IResolvable, VariableValueProperty]

MetricProperty

class CfnAssetModel.MetricProperty(*, expression, variables, window)

Bases: object

Contains 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 DOUBLE and consume properties with data types of INTEGER or DOUBLE .

For more information, see Defining data properties in the AWS IoT SiteWise User Guide .

Parameters
  • expression (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]]]) – The list of variables used in the expression.

  • window (Union[IResolvable, MetricWindowProperty]) – The window (time interval) over which AWS IoT SiteWise computes the metric’s aggregation expression. AWS IoT SiteWise computes one data point per window .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

metric_property = iotsitewise.CfnAssetModel.MetricProperty(
    expression="expression",
    variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
        name="name",
        value=iotsitewise.CfnAssetModel.VariableValueProperty(
            property_logical_id="propertyLogicalId",

            # the properties below are optional
            hierarchy_logical_id="hierarchyLogicalId"
        )
    )],
    window=iotsitewise.CfnAssetModel.MetricWindowProperty(
        tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
            interval="interval",

            # the properties below are optional
            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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-expression

Return type

str

variables

The list of variables used in the expression.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-variables

Return type

Union[IResolvable, List[Union[IResolvable, ExpressionVariableProperty]]]

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-window

Return type

Union[IResolvable, MetricWindowProperty]

MetricWindowProperty

class CfnAssetModel.MetricWindowProperty(*, tumbling=None)

Bases: object

Contains a time interval window used for data aggregate computations (for example, average, sum, count, and so on).

Parameters

tumbling (Union[IResolvable, TumblingWindowProperty, None]) – The tumbling time interval window.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metricwindow.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

metric_window_property = iotsitewise.CfnAssetModel.MetricWindowProperty(
    tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
        interval="interval",

        # the properties below are optional
        offset="offset"
    )
)

Attributes

tumbling

The tumbling time interval window.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metricwindow.html#cfn-iotsitewise-assetmodel-metricwindow-tumbling

Return type

Union[IResolvable, TumblingWindowProperty, None]

PropertyTypeProperty

class CfnAssetModel.PropertyTypeProperty(*, type_name, attribute=None, metric=None, transform=None)

Bases: object

Contains a property type, which can be one of attribute , measurement , metric , or transform .

Parameters
  • type_name (str) – The type of property type, which can be one of Attribute , Measurement , Metric , or Transform .

  • attribute (Union[IResolvable, AttributeProperty, None]) – Specifies an asset attribute property. An attribute generally contains static information, such as the serial number of an industrial IoT wind turbine. This is required if the TypeName is Attribute and has a DefaultValue .

  • metric (Union[IResolvable, MetricProperty, 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. This is required if the TypeName is Metric .

  • transform (Union[IResolvable, TransformProperty, 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. This is required if the TypeName is Transform .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

property_type_property = iotsitewise.CfnAssetModel.PropertyTypeProperty(
    type_name="typeName",

    # the properties below are optional
    attribute=iotsitewise.CfnAssetModel.AttributeProperty(
        default_value="defaultValue"
    ),
    metric=iotsitewise.CfnAssetModel.MetricProperty(
        expression="expression",
        variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
            name="name",
            value=iotsitewise.CfnAssetModel.VariableValueProperty(
                property_logical_id="propertyLogicalId",

                # the properties below are optional
                hierarchy_logical_id="hierarchyLogicalId"
            )
        )],
        window=iotsitewise.CfnAssetModel.MetricWindowProperty(
            tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
                interval="interval",

                # the properties below are optional
                offset="offset"
            )
        )
    ),
    transform=iotsitewise.CfnAssetModel.TransformProperty(
        expression="expression",
        variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
            name="name",
            value=iotsitewise.CfnAssetModel.VariableValueProperty(
                property_logical_id="propertyLogicalId",

                # the properties below are optional
                hierarchy_logical_id="hierarchyLogicalId"
            )
        )]
    )
)

Attributes

attribute

Specifies an asset attribute property.

An attribute generally contains static information, such as the serial number of an industrial IoT wind turbine.

This is required if the TypeName is Attribute and has a DefaultValue .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-attribute

Return type

Union[IResolvable, AttributeProperty, None]

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.

This is required if the TypeName is Metric .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-metric

Return type

Union[IResolvable, MetricProperty, None]

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.

This is required if the TypeName is Transform .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-transform

Return type

Union[IResolvable, TransformProperty, None]

type_name

The type of property type, which can be one of Attribute , Measurement , Metric , or Transform .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-typename

Return type

str

TransformProperty

class CfnAssetModel.TransformProperty(*, expression, variables)

Bases: object

Contains 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. Transforms can only input properties that are INTEGER , DOUBLE , or BOOLEAN type. Booleans convert to 0 ( FALSE ) and 1 ( TRUE )..

For more information, see Defining data properties in the AWS IoT SiteWise User Guide .

Parameters
  • expression (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]]]) – The list of variables used in the expression.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

transform_property = iotsitewise.CfnAssetModel.TransformProperty(
    expression="expression",
    variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
        name="name",
        value=iotsitewise.CfnAssetModel.VariableValueProperty(
            property_logical_id="propertyLogicalId",

            # the properties below are optional
            hierarchy_logical_id="hierarchyLogicalId"
        )
    )]
)

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html#cfn-iotsitewise-assetmodel-transform-expression

Return type

str

variables

The list of variables used in the expression.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html#cfn-iotsitewise-assetmodel-transform-variables

Return type

Union[IResolvable, List[Union[IResolvable, ExpressionVariableProperty]]]

TumblingWindowProperty

class CfnAssetModel.TumblingWindowProperty(*, interval, offset=None)

Bases: object

Contains 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 , and w when you specify an interval or offset. Note that m represents minutes, h represents hours, d represents days, and w represents weeks. You can also use s to represent seconds in offset .

The interval and offset parameters support the ISO 8601 format . For example, PT5S represents 5 seconds, PT5M represents 5 minutes, and PT5H represents 5 hours.

Parameters
  • interval (str) – The time interval for the tumbling window. The interval time must be between 1 minute and 1 week. AWS IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the 1d interval at the end of each day at midnight (UTC), the 1h interval 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]) – CfnAssetModel.TumblingWindowProperty.Offset.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-tumblingwindow.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

tumbling_window_property = iotsitewise.CfnAssetModel.TumblingWindowProperty(
    interval="interval",

    # the properties below are optional
    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 1w interval the end of Sunday at midnight each week (UTC), the 1d interval at the end of each day at midnight (UTC), the 1h interval 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-tumblingwindow.html#cfn-iotsitewise-assetmodel-tumblingwindow-interval

Return type

str

offset

CfnAssetModel.TumblingWindowProperty.Offset.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-tumblingwindow.html#cfn-iotsitewise-assetmodel-tumblingwindow-offset

Return type

Optional[str]

VariableValueProperty

class CfnAssetModel.VariableValueProperty(*, property_logical_id, hierarchy_logical_id=None)

Bases: object

Identifies a property value used in an expression.

Parameters
  • property_logical_id (str) – The LogicalID of the property to use as the variable.

  • hierarchy_logical_id (Optional[str]) –

    The LogicalID of the hierarchy to query for the PropertyLogicalID . You use a hierarchyLogicalID instead 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 assets in the AWS IoT SiteWise User Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iotsitewise as iotsitewise

variable_value_property = iotsitewise.CfnAssetModel.VariableValueProperty(
    property_logical_id="propertyLogicalId",

    # the properties below are optional
    hierarchy_logical_id="hierarchyLogicalId"
)

Attributes

hierarchy_logical_id

The LogicalID of the hierarchy to query for the PropertyLogicalID .

You use a hierarchyLogicalID instead 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 assets in the AWS IoT SiteWise User Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html#cfn-iotsitewise-assetmodel-variablevalue-hierarchylogicalid

Return type

Optional[str]

property_logical_id

The LogicalID of the property to use as the variable.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html#cfn-iotsitewise-assetmodel-variablevalue-propertylogicalid

Return type

str