CfnAssetModel

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

Bases: CfnResource

Creates an asset model from specified property and hierarchy definitions.

You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model’s property and hierarchy definitions. For more information, see Defining asset models in the AWS IoT SiteWise User Guide .

You can create two types of asset models, ASSET_MODEL or COMPONENT_MODEL .

  • 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.

See:

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

CloudformationResource:

AWS::IoTSiteWise::AssetModel

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 import 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
        composed_asset_model_id="composedAssetModelId",
        composite_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
            data_type="dataType",
            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(
                            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.CfnAssetModel.PropertyPathDefinitionProperty(
                                name="name"
                            )]
                        )
                    )],
                    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(
                            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.CfnAssetModel.PropertyPathDefinitionProperty(
                                name="name"
                            )]
                        )
                    )]
                )
            ),

            # the properties below are optional
            data_type_spec="dataTypeSpec",
            external_id="externalId",
            id="id",
            logical_id="logicalId",
            unit="unit"
        )],
        description="description",
        external_id="externalId",
        id="id",
        parent_asset_model_composite_model_external_id="parentAssetModelCompositeModelExternalId",
        path=["path"]
    )],
    asset_model_description="assetModelDescription",
    asset_model_external_id="assetModelExternalId",
    asset_model_hierarchies=[iotsitewise.CfnAssetModel.AssetModelHierarchyProperty(
        child_asset_model_id="childAssetModelId",
        name="name",

        # the properties below are optional
        external_id="externalId",
        id="id",
        logical_id="logicalId"
    )],
    asset_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
        data_type="dataType",
        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(
                        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.CfnAssetModel.PropertyPathDefinitionProperty(
                            name="name"
                        )]
                    )
                )],
                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(
                        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.CfnAssetModel.PropertyPathDefinitionProperty(
                            name="name"
                        )]
                    )
                )]
            )
        ),

        # the properties below are optional
        data_type_spec="dataTypeSpec",
        external_id="externalId",
        id="id",
        logical_id="logicalId",
        unit="unit"
    )],
    asset_model_type="assetModelType",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • asset_model_name (str) – A unique, friendly name for the asset model.

  • asset_model_composite_models (Union[IResolvable, Sequence[Union[IResolvable, AssetModelCompositeModelProperty, Dict[str, Any]]], None]) – The composite models that are part of this asset model. It groups properties (such as attributes, measurements, transforms, and metrics) and child composite models that model parts of your industrial equipment. Each composite model has a type that defines the properties that the composite model supports. Use composite models to define alarms on this asset model. .. epigraph:: When creating custom composite models, you need to use CreateAssetModelCompositeModel . For more information, see Creating custom composite models (Components) in the AWS IoT SiteWise User Guide .

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

  • asset_model_external_id (Optional[str]) – The external ID of the asset model. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .

  • asset_model_hierarchies (Union[IResolvable, Sequence[Union[IResolvable, AssetModelHierarchyProperty, Dict[str, Any]]], 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 Asset hierarchies 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, Dict[str, Any]]], None]) –

    The property definitions of the asset model. For more information, see Asset 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 .

  • asset_model_type (Optional[str]) – The type of asset model. - 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.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – 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_dependency(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_depends_on(target)

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

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

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.

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"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate 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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

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 resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

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.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

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.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

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

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
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 models that are part of this asset model.

asset_model_description

A description for the asset model.

asset_model_external_id

The external ID of the asset model.

asset_model_hierarchies

The hierarchy definitions of the asset model.

asset_model_name

A unique, friendly name for the asset model.

asset_model_properties

The property definitions of the asset model.

asset_model_type

The type of asset model.

attr_asset_model_arn

The ARN of the asset model, which has the following format.

CloudformationAttribute:

AssetModelArn

attr_asset_model_id

The ID of the asset model.

CloudformationAttribute:

AssetModelId

cfn_options

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

cfn_resource_type

AWS resource type.

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.

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).

Returns:

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

node

The tree node.

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 }).

stack

The stack in which this element is defined.

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

tags

Tag Manager which manages the tags for this resource.

tags_raw

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

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(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

AssetModelCompositeModelProperty

class CfnAssetModel.AssetModelCompositeModelProperty(*, name, type, composed_asset_model_id=None, composite_model_properties=None, description=None, external_id=None, id=None, parent_asset_model_composite_model_external_id=None, path=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.

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 .

  • 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 a component-model-based composite model, the description is inherited from the COMPONENT_MODEL asset 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 of ExternalId or Path must be specified.

  • id (Optional[str]) – The ID of the asset model composite model. .. epigraph:: This is a return value and can’t be set.

  • 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 of ExternalId or Path must be specified.

See:

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.
from aws_cdk import aws_iotsitewise as iotsitewise

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

    # the properties below are optional
    composed_asset_model_id="composedAssetModelId",
    composite_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
        data_type="dataType",
        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(
                        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.CfnAssetModel.PropertyPathDefinitionProperty(
                            name="name"
                        )]
                    )
                )],
                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(
                        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.CfnAssetModel.PropertyPathDefinitionProperty(
                            name="name"
                        )]
                    )
                )]
            )
        ),

        # the properties below are optional
        data_type_spec="dataTypeSpec",
        external_id="externalId",
        id="id",
        logical_id="logicalId",
        unit="unit"
    )],
    description="description",
    external_id="externalId",
    id="id",
    parent_asset_model_composite_model_external_id="parentAssetModelCompositeModelExternalId",
    path=["path"]
)

Attributes

composed_asset_model_id

The ID of a component model which is reused to create this composite model.

See:

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

composite_model_properties

The asset property definitions for this composite model.

See:

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

description

The description of the composite model.

If the composite model is a component-model-based composite model, the description is inherited from the COMPONENT_MODEL asset model and cannot be changed.

See:

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

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.
See:

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

id

The ID of the asset model composite model.

This is a return value and can’t be set.

See:

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

name

The name of the composite model.

See:

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

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 .

See:

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

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.
See:

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

type

The type of the composite model.

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

See:

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

AssetModelHierarchyProperty

class CfnAssetModel.AssetModelHierarchyProperty(*, child_asset_model_id, name, external_id=None, id=None, logical_id=None)

Bases: object

Describes 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 (str) –

    The ID of the asset model, in UUID format. All assets in this hierarchy must be instances of the childAssetModelId asset 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 else externalId: followed by the asset model’s external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .

  • name (str) –

    The name of the asset model hierarchy that you specify by using the CreateAssetModel or UpdateAssetModel API operation.

  • 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 ExternalId or LogicalId must 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 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 (Optional[str]) – The LogicalID of the asset model hierarchy. This ID is a hierarchyLogicalId . .. epigraph:: One of ExternalId or LogicalId must be specified.

See:

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.
from aws_cdk import aws_iotsitewise as iotsitewise

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

    # the properties below are optional
    external_id="externalId",
    id="id",
    logical_id="logicalId"
)

Attributes

child_asset_model_id

The ID of the asset model, in UUID format.

All assets in this hierarchy must be instances of the childAssetModelId asset 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 else externalId: followed by the asset model’s external ID. For more information, see Using external IDs in the AWS IoT SiteWise User Guide .

See:

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

external_id

//docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_UpdateAssetModel.html>`_ 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 ExternalId or LogicalId must be specified.

See:

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

Type:

The external ID (if any) provided in the `CreateAssetModel <https

Type:

//docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateAssetModel.html>`_ or `UpdateAssetModel <https

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 .

See:

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

logical_id

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

One of ExternalId or LogicalId must be specified.

See:

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

name

//docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_UpdateAssetModel.html>`_ API operation.

See:

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

Type:

The name of the asset model hierarchy that you specify by using the `CreateAssetModel <https

Type:

//docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateAssetModel.html>`_ or `UpdateAssetModel <https

AssetModelPropertyProperty

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

Bases: object

Contains information about an asset model property.

Parameters:
  • data_type (str) – The data type of the asset model property.

  • name (str) – The name of the asset model property.

  • type (Union[IResolvable, PropertyTypeProperty, Dict[str, Any]]) – 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.

  • 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 ExternalId or LogicalId must 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]) – The LogicalID of the asset model property. .. epigraph:: One of ExternalId or LogicalId must be specified.

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

See:

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.
from aws_cdk import aws_iotsitewise as iotsitewise

asset_model_property_property = iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
    data_type="dataType",
    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(
                    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.CfnAssetModel.PropertyPathDefinitionProperty(
                        name="name"
                    )]
                )
            )],
            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(
                    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.CfnAssetModel.PropertyPathDefinitionProperty(
                        name="name"
                    )]
                )
            )]
        )
    ),

    # the properties below are optional
    data_type_spec="dataTypeSpec",
    external_id="externalId",
    id="id",
    logical_id="logicalId",
    unit="unit"
)

Attributes

data_type

The data type of the asset model property.

See:

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

data_type_spec

The data type of the structure for this property.

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

See:

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

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.
See:

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

id

The ID of the property.

This is a return value and can’t be set.

See:

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

logical_id

The LogicalID of the asset model property.

One of ExternalId or LogicalId must be specified.

See:

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

name

The name of the asset model property.

See:

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

type

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

See:

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

unit

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

See:

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

AttributeProperty

class CfnAssetModel.AttributeProperty(*, default_value=None)

Bases: object

Contains 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:

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.
from aws_cdk import 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 .

See:

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

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.

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

See:

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.
from aws_cdk import aws_iotsitewise as iotsitewise

expression_variable_property = iotsitewise.CfnAssetModel.ExpressionVariableProperty(
    name="name",
    value=iotsitewise.CfnAssetModel.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.CfnAssetModel.PropertyPathDefinitionProperty(
            name="name"
        )]
    )
)

Attributes

name

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

See:

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

value

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

See:

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

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 Metrics 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, Dict[str, Any]]]]) – The list of variables used in the expression.

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

See:

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.
from aws_cdk import aws_iotsitewise as iotsitewise

metric_property = iotsitewise.CfnAssetModel.MetricProperty(
    expression="expression",
    variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
        name="name",
        value=iotsitewise.CfnAssetModel.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.CfnAssetModel.PropertyPathDefinitionProperty(
                name="name"
            )]
        )
    )],
    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 .

See:

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

variables

The list of variables used in the expression.

See:

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

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 .

See:

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

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, Dict[str, Any], None]) – The tumbling time interval window.

See:

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.
from aws_cdk import 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.

See:

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

PropertyPathDefinitionProperty

class CfnAssetModel.PropertyPathDefinitionProperty(*, name)

Bases: object

Represents one level between a composite model and the root of the asset model.

Parameters:

name (str) – The name of the path segment.

See:

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

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 import aws_iotsitewise as iotsitewise

property_path_definition_property = iotsitewise.CfnAssetModel.PropertyPathDefinitionProperty(
    name="name"
)

Attributes

name

The name of the path segment.

See:

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

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, 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.

See:

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.
from aws_cdk import 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(
                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.CfnAssetModel.PropertyPathDefinitionProperty(
                    name="name"
                )]
            )
        )],
        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(
                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.CfnAssetModel.PropertyPathDefinitionProperty(
                    name="name"
                )]
            )
        )]
    )
)

Attributes

attribute

Specifies an asset attribute property.

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

See:

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

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.

See:

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

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.

See:

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

type_name

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

See:

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

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. A transform can only have a data type of DOUBLE and consume properties with data types of INTEGER or DOUBLE .

For more information, see Transforms 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, Dict[str, Any]]]]) – The list of variables used in the expression.

See:

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.
from aws_cdk import aws_iotsitewise as iotsitewise

transform_property = iotsitewise.CfnAssetModel.TransformProperty(
    expression="expression",
    variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
        name="name",
        value=iotsitewise.CfnAssetModel.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.CfnAssetModel.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 .

See:

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

variables

The list of variables used in the expression.

See:

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

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]) – The offset for the tumbling window. The offset parameter accepts the following:. - The offset time. For example, if you specify 18h for offset and 1d for interval , 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 PT18H for offset and 1d for interval , 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:00 for offset , 5m for interval , 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-08 for offset and 1d for interval , 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:

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.
from aws_cdk import 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.

See:

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

offset

.

  • The offset time.

For example, if you specify 18h for offset and 1d for interval , 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 PT18H for offset and 1d for interval , 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:00 for offset , 5m for interval , 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-08 for offset and 1d for interval , 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:

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

Type:

The offset for the tumbling window. The offset parameter accepts the following

VariableValueProperty

class CfnAssetModel.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: object

Identifies 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 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 (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 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 name if it’s from the same asset model. If the property 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 . .. epigraph:: This is a return value and can’t be set.

  • property_logical_id (Optional[str]) – The LogicalID of 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:

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.
from aws_cdk import aws_iotsitewise as iotsitewise

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

See:

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

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 .

See:

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

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 asset models (hierarchies) in the AWS IoT SiteWise User Guide .

See:

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

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 .

See:

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

property_id

The ID of the property to use as the variable.

You can use the property name if it’s from the same asset model. If the property 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 . .. epigraph:

This is a return value and can't be set.
See:

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

property_logical_id

The LogicalID of the property that is being referenced.

See:

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

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

See:

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