AWS IoT SiteWise

2023/11/21 - AWS IoT SiteWise - 11 new 16 updated api methods

Changes  Adds 1/ user-defined unique identifier for asset and model metadata, 2/ asset model components, and 3/ query API for asset metadata and telemetry data. Supports 4/ multi variate anomaly detection using Amazon Lookout for Equipment, 5/ warm storage tier, and 6/ buffered ingestion of time series data.

ExecuteQuery (new) Link ¶

Run SQL queries to retrieve metadata and time-series data from asset models, assets, measurements, metrics, transforms, and aggregates.

See also: AWS API Documentation

Request Syntax

client.execute_query(
    queryStatement='string',
    nextToken='string',
    maxResults=123
)
type queryStatement

string

param queryStatement

[REQUIRED]

The IoT SiteWise query statement.

type nextToken

string

param nextToken

The string that specifies the next page of results.

type maxResults

integer

param maxResults

The maximum number of results to return at one time. The default is 25.

rtype

dict

returns

Response Syntax

{
    'columns': [
        {
            'name': 'string',
            'type': {
                'scalarType': 'BOOLEAN'|'INT'|'DOUBLE'|'TIMESTAMP'|'STRING'
            }
        },
    ],
    'rows': [
        {
            'data': [
                {
                    'scalarValue': 'string',
                    'arrayValue': {'... recursive ...'},
                    'rowValue': {'... recursive ...'},
                    'nullValue': True|False
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • columns (list) --

      Represents a single column in the query results.

      • (dict) --

        A description of the column in the query results.

        • name (string) --

          The name of the column description.

        • type (dict) --

          The type of the column description.

          • scalarType (string) --

            The allowed data types that the column has as it's value.

    • rows (list) --

      Represents a single row in the query results.

      • (dict) --

        Represents a single row in the query results.

        • data (list) --

          List of data points in a single row of the result set.

          • (dict) --

            Represents a single data point in a query result.

            • scalarValue (string) --

              Indicates if the data point is a scalar value such as integer, string, double, or Boolean.

            • arrayValue (list) --

              Indicates if the data point is an array.

            • rowValue (dict) --

              Indicates if the data point is a row.

            • nullValue (boolean) --

              Indicates if the data point is null.

    • nextToken (string) --

      The string that specifies the next page of results.

ListCompositionRelationships (new) Link ¶

Retrieves a paginated list of composition relationships for an asset model of type COMPONENT_MODEL .

See also: AWS API Documentation

Request Syntax

client.list_composition_relationships(
    assetModelId='string',
    nextToken='string',
    maxResults=123
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model. 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 IoT SiteWise User Guide .

type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request.

Default: 50

rtype

dict

returns

Response Syntax

{
    'compositionRelationshipSummaries': [
        {
            'assetModelId': 'string',
            'assetModelCompositeModelId': 'string',
            'assetModelCompositeModelType': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • compositionRelationshipSummaries (list) --

      A list that summarizes each composition relationship.

      • (dict) --

        Contains a summary of the components of the composite model.

        • assetModelId (string) --

          The ID of the asset model, in UUID format.

        • assetModelCompositeModelId (string) --

          The ID of a composite model on this asset model.

        • assetModelCompositeModelType (string) --

          The composite model type. Valid values are AWS/ALARM , CUSTOM , or AWS/L4E_ANOMALY .

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

CreateAssetModelCompositeModel (new) Link ¶

Creates a custom composite model from specified property and hierarchy definitions. There are two types of custom composite models, inline and component-model-based .

Use component-model-based custom composite models to define standard, reusable components. A component-model-based custom composite model consists of a name, a description, and the ID of the component model it references. A component-model-based custom composite model has no properties of its own; its referenced component model provides its associated properties to any created assets. For more information, see Custom composite models (Components) in the IoT SiteWise User Guide .

Use inline custom composite models to organize the properties of an asset model. The properties of inline custom composite models are local to the asset model where they are included and can't be used to create multiple assets.

To create a component-model-based model, specify the composedAssetModelId of an existing asset model with assetModelType of COMPONENT_MODEL .

To create an inline model, specify the assetModelCompositeModelProperties and don't include an composedAssetModelId .

See also: AWS API Documentation

Request Syntax

client.create_asset_model_composite_model(
    assetModelId='string',
    parentAssetModelCompositeModelId='string',
    assetModelCompositeModelExternalId='string',
    assetModelCompositeModelId='string',
    assetModelCompositeModelDescription='string',
    assetModelCompositeModelName='string',
    assetModelCompositeModelType='string',
    clientToken='string',
    composedAssetModelId='string',
    assetModelCompositeModelProperties=[
        {
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'id': 'string',
            'externalId': 'string'
        },
    ]
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model this composite model is a part of.

type parentAssetModelCompositeModelId

string

param parentAssetModelCompositeModelId

The ID of the parent composite model in this asset model relationship.

type assetModelCompositeModelExternalId

string

param assetModelCompositeModelExternalId

An external ID to assign to the composite model.

If the composite model is a derived composite model, or one nested inside a component model, you can only set the external ID using UpdateAssetModelCompositeModel and specifying the derived ID of the model or property from the created model it's a part of.

type assetModelCompositeModelId

string

param assetModelCompositeModelId

The ID of the composite model. 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.

type assetModelCompositeModelDescription

string

param assetModelCompositeModelDescription

A description for the composite model.

type assetModelCompositeModelName

string

param assetModelCompositeModelName

[REQUIRED]

A unique, friendly name for the composite model.

type assetModelCompositeModelType

string

param assetModelCompositeModelType

[REQUIRED]

The composite model type. Valid values are AWS/ALARM , CUSTOM , or AWS/L4E_ANOMALY .

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

This field is autopopulated if not provided.

type composedAssetModelId

string

param composedAssetModelId

The ID of a composite model on this asset.

type assetModelCompositeModelProperties

list

param assetModelCompositeModelProperties

The property definitions of the composite model. For more information, see <LINK>.

You can specify up to 200 properties per composite model. For more information, see Quotas in the IoT SiteWise User Guide .

  • (dict) --

    Contains an asset model property definition. This property definition is applied to all assets created from the asset model.

    • name (string) -- [REQUIRED]

      The name of the property definition.

    • dataType (string) -- [REQUIRED]

      The data type of the property definition.

      If you specify STRUCT , you must also specify dataTypeSpec to identify the type of the structure for this property.

    • dataTypeSpec (string) --

      The data type of the structure for this property. This parameter is required on properties that have the STRUCT data type.

      The options for this parameter depend on the type of the composite model in which you define this property. Use AWS/ALARM_STATE for alarm state in alarm composite models.

    • unit (string) --

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

    • type (dict) -- [REQUIRED]

      The property definition type (see PropertyType ). You can only specify one type in a property definition.

      • attribute (dict) --

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

        • defaultValue (string) --

          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 IoT SiteWise User Guide .

      • measurement (dict) --

        Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

        • processingConfig (dict) --

          The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

          • forwardingConfig (dict) -- [REQUIRED]

            The forwarding configuration for the given measurement property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • transform (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • processingConfig (dict) --

          The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given transform property.

          • forwardingConfig (dict) --

            The forwarding configuration for a given property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • metric (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • window (dict) -- [REQUIRED]

          The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

          • tumbling (dict) --

            The tumbling time interval window.

            • interval (string) -- [REQUIRED]

              The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

              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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

            • offset (string) --

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

        • processingConfig (dict) --

          The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given metric property.

    • id (string) --

      The ID to assign to the asset model property, if desired. 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.

    • externalId (string) --

      An external ID to assign to the property definition. The external ID must be unique among property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetModelCompositeModelId': 'string',
    'assetModelCompositeModelPath': [
        {
            'id': 'string',
            'name': 'string'
        },
    ],
    'assetModelStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'PROPAGATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • assetModelCompositeModelId (string) --

      The ID of the composed asset model. You can use this ID when you call other IoT SiteWise APIs.

    • assetModelCompositeModelPath (list) --

      The path to the composite model listing the parent composite models.

      • (dict) --

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

        • id (string) --

          The ID of the path segment.

        • name (string) --

          The name of the path segment.

    • assetModelStatus (dict) --

      Contains current status information for an asset model. For more information, see Asset and model states in the IoT SiteWise User Guide .

      • state (string) --

        The current state of the asset model.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

DescribeAssetCompositeModel (new) Link ¶

Retrieves information about an asset composite model (also known as an asset component). An AssetCompositeModel is an instance of an AssetModelCompositeModel . If you want to see information about the model this is based on, call DescribeAssetModelCompositeModel.

See also: AWS API Documentation

Request Syntax

client.describe_asset_composite_model(
    assetId='string',
    assetCompositeModelId='string'
)
type assetId

string

param assetId

[REQUIRED]

The ID of the asset. 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 IoT SiteWise User Guide .

type assetCompositeModelId

string

param assetCompositeModelId

[REQUIRED]

The ID of a composite model on this asset. 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 IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetId': 'string',
    'assetCompositeModelId': 'string',
    'assetCompositeModelExternalId': 'string',
    'assetCompositeModelPath': [
        {
            'id': 'string',
            'name': 'string'
        },
    ],
    'assetCompositeModelName': 'string',
    'assetCompositeModelDescription': 'string',
    'assetCompositeModelType': 'string',
    'assetCompositeModelProperties': [
        {
            'id': 'string',
            'name': 'string',
            'alias': 'string',
            'notification': {
                'topic': 'string',
                'state': 'ENABLED'|'DISABLED'
            },
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ],
    'assetCompositeModelSummaries': [
        {
            'id': 'string',
            'externalId': 'string',
            'name': 'string',
            'type': 'string',
            'description': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ]
        },
    ],
    'actionDefinitions': [
        {
            'actionDefinitionId': 'string',
            'actionName': 'string',
            'actionType': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • assetId (string) --

      The ID of the asset, in UUID format. This ID uniquely identifies the asset within IoT SiteWise and can be used with other IoT SiteWise APIs.

    • assetCompositeModelId (string) --

      The ID of a composite model on this asset.

    • assetCompositeModelExternalId (string) --

      An external ID to assign to the asset model.

      If the composite model is a component-based composite model, or one nested inside a component model, you can only set the external ID using UpdateAssetModelCompositeModel and specifying the derived ID of the model or property from the created model it's a part of.

    • assetCompositeModelPath (list) --

      The path to the composite model listing the parent composite models.

      • (dict) --

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

        • id (string) --

          The ID of the path segment.

        • name (string) --

          The name of the path segment.

    • assetCompositeModelName (string) --

      The unique, friendly name for the composite model.

    • assetCompositeModelDescription (string) --

      A description for the composite model.

    • assetCompositeModelType (string) --

      The composite model type. Valid values are AWS/ALARM , CUSTOM , or AWS/L4E_ANOMALY .

    • assetCompositeModelProperties (list) --

      The property definitions of the composite model that was used to create the asset.

      • (dict) --

        Contains asset property information.

        • id (string) --

          The ID of the asset property.

        • name (string) --

          The name of the property.

        • alias (string) --

          The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature ). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide .

        • notification (dict) --

          The asset property's notification topic and state. For more information, see UpdateAssetProperty.

          • topic (string) --

            The MQTT topic to which IoT SiteWise publishes property value update notifications.

          • state (string) --

            The current notification state.

        • dataType (string) --

          The data type of the asset property.

        • dataTypeSpec (string) --

          The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

        • unit (string) --

          The unit (such as Newtons or RPM ) of the asset property.

        • path (list) --

          The structured path to the property from the root of the asset.

          • (dict) --

            Represents one level between a property and the root of the asset.

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          The external ID of the asset property. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • assetCompositeModelSummaries (list) --

      The list of composite model summaries.

      • (dict) --

        Contains a summary of the composite model for a specific asset.

        • id (string) --

          The ID of the composite model that this summary describes.

        • externalId (string) --

          An external ID to assign to the asset model.

          If the composite model is a derived composite model, or one nested inside a component model, you can only set the external ID using UpdateAssetModelCompositeModel and specifying the derived ID of the model or property from the created model it's a part of.

        • name (string) --

          The name of the composite model that this summary describes.

        • type (string) --

          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.

        • description (string) --

          A description of the composite model that this summary describes.

        • path (list) --

          The path that includes all the components of the asset model for the asset.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

    • actionDefinitions (list) --

      The available actions for a composite model on this asset.

      • (dict) --

        Contains a definition for an action.

        • actionDefinitionId (string) --

          The ID of the action definition.

        • actionName (string) --

          The name of the action definition.

        • actionType (string) --

          The type of the action definition.

UpdateAssetModelCompositeModel (new) Link ¶

Updates a composite model and all of the assets that were created from the model. Each asset created from the model inherits the updated asset model's property and hierarchy definitions. For more information, see Updating assets and models in the IoT SiteWise User Guide .

Warning

If you remove a property from a composite asset model, IoT SiteWise deletes all previous data for that property. You can’t change the type or data type of an existing property.

To replace an existing composite asset model property with a new one with the same name , do the following:

  • Submit an UpdateAssetModelCompositeModel request with the entire existing property removed.

  • Submit a second UpdateAssetModelCompositeModel request that includes the new property. The new asset property will have the same name as the previous one and IoT SiteWise will generate a new unique id .

See also: AWS API Documentation

Request Syntax

client.update_asset_model_composite_model(
    assetModelId='string',
    assetModelCompositeModelId='string',
    assetModelCompositeModelExternalId='string',
    assetModelCompositeModelDescription='string',
    assetModelCompositeModelName='string',
    clientToken='string',
    assetModelCompositeModelProperties=[
        {
            'id': 'string',
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ]
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model, in UUID format.

type assetModelCompositeModelId

string

param assetModelCompositeModelId

[REQUIRED]

The ID of a composite model on this asset model.

type assetModelCompositeModelExternalId

string

param assetModelCompositeModelExternalId

An external ID to assign to the asset model. You can only set the external ID of the asset model if it wasn't set when it was created, or you're setting it to the exact same thing as when it was created.

type assetModelCompositeModelDescription

string

param assetModelCompositeModelDescription

A description for the composite model.

type assetModelCompositeModelName

string

param assetModelCompositeModelName

[REQUIRED]

A unique, friendly name for the composite model.

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

This field is autopopulated if not provided.

type assetModelCompositeModelProperties

list

param assetModelCompositeModelProperties

The property definitions of the composite model. For more information, see <LINK>.

You can specify up to 200 properties per composite model. For more information, see Quotas in the IoT SiteWise User Guide .

  • (dict) --

    Contains information about an asset model property.

    • id (string) --

      The ID of the asset model property.

      • If you are callling UpdateAssetModel to create a new property: You can specify its ID here, if desired. 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 property: 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 IoT SiteWise User Guide .

    • name (string) -- [REQUIRED]

      The name of the asset model property.

    • dataType (string) -- [REQUIRED]

      The data type of the asset model property.

    • dataTypeSpec (string) --

      The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

    • unit (string) --

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

    • type (dict) -- [REQUIRED]

      The property type (see PropertyType ).

      • attribute (dict) --

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

        • defaultValue (string) --

          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 IoT SiteWise User Guide .

      • measurement (dict) --

        Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

        • processingConfig (dict) --

          The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

          • forwardingConfig (dict) -- [REQUIRED]

            The forwarding configuration for the given measurement property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • transform (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • processingConfig (dict) --

          The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given transform property.

          • forwardingConfig (dict) --

            The forwarding configuration for a given property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • metric (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • window (dict) -- [REQUIRED]

          The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

          • tumbling (dict) --

            The tumbling time interval window.

            • interval (string) -- [REQUIRED]

              The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

              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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

            • offset (string) --

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

        • processingConfig (dict) --

          The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given metric property.

    • path (list) --

      The structured path to the property from the root of the asset model.

      • (dict) --

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

        • id (string) --

          The ID of the path segment.

        • name (string) --

          The name of the path segment.

    • externalId (string) --

      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 IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetModelCompositeModelPath': [
        {
            'id': 'string',
            'name': 'string'
        },
    ],
    'assetModelStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'PROPAGATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • assetModelCompositeModelPath (list) --

      The path to the composite model listing the parent composite models.

      • (dict) --

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

        • id (string) --

          The ID of the path segment.

        • name (string) --

          The name of the path segment.

    • assetModelStatus (dict) --

      Contains current status information for an asset model. For more information, see Asset and model states in the IoT SiteWise User Guide .

      • state (string) --

        The current state of the asset model.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

DeleteAssetModelCompositeModel (new) Link ¶

Deletes a composite model. This action can't be undone. You must delete all assets created from a composite model before you can delete the model. Also, you can't delete a composite model if a parent asset model exists that contains a property formula expression that depends on the asset model that you want to delete. For more information, see Deleting assets and models in the IoT SiteWise User Guide .

See also: AWS API Documentation

Request Syntax

client.delete_asset_model_composite_model(
    assetModelId='string',
    assetModelCompositeModelId='string',
    clientToken='string'
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model, in UUID format.

type assetModelCompositeModelId

string

param assetModelCompositeModelId

[REQUIRED]

The ID of a composite model on this asset model.

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

{
    'assetModelStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'PROPAGATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • assetModelStatus (dict) --

      Contains current status information for an asset model. For more information, see Asset and model states in the IoT SiteWise User Guide .

      • state (string) --

        The current state of the asset model.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

ExecuteAction (new) Link ¶

Executes an action on a target resource.

See also: AWS API Documentation

Request Syntax

client.execute_action(
    targetResource={
        'assetId': 'string'
    },
    actionDefinitionId='string',
    actionPayload={
        'stringValue': 'string'
    },
    clientToken='string'
)
type targetResource

dict

param targetResource

[REQUIRED]

The resource the action will be taken on.

  • assetId (string) -- [REQUIRED]

    The ID of the asset, in UUID format.

type actionDefinitionId

string

param actionDefinitionId

[REQUIRED]

The ID of the action definition.

type actionPayload

dict

param actionPayload

[REQUIRED]

The JSON payload of the action.

  • stringValue (string) -- [REQUIRED]

    The payload of the action in a JSON string.

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

rtype

dict

returns

Response Syntax

{
    'actionId': 'string'
}

Response Structure

  • (dict) --

    • actionId (string) --

      The ID of the action.

DescribeAssetModelCompositeModel (new) Link ¶

Retrieves information about an asset model composite model (also known as an asset model component). For more information, see Custom composite models (Components) in the IoT SiteWise User Guide .

See also: AWS API Documentation

Request Syntax

client.describe_asset_model_composite_model(
    assetModelId='string',
    assetModelCompositeModelId='string'
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model. 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 IoT SiteWise User Guide .

type assetModelCompositeModelId

string

param assetModelCompositeModelId

[REQUIRED]

The ID of a composite model on this asset model. 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 IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetModelId': 'string',
    'assetModelCompositeModelId': 'string',
    'assetModelCompositeModelExternalId': 'string',
    'assetModelCompositeModelPath': [
        {
            'id': 'string',
            'name': 'string'
        },
    ],
    'assetModelCompositeModelName': 'string',
    'assetModelCompositeModelDescription': 'string',
    'assetModelCompositeModelType': 'string',
    'assetModelCompositeModelProperties': [
        {
            'id': 'string',
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ],
    'compositionDetails': {
        'compositionRelationship': [
            {
                'id': 'string'
            },
        ]
    },
    'assetModelCompositeModelSummaries': [
        {
            'id': 'string',
            'externalId': 'string',
            'name': 'string',
            'type': 'string',
            'description': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ]
        },
    ],
    'actionDefinitions': [
        {
            'actionDefinitionId': 'string',
            'actionName': 'string',
            'actionType': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • assetModelId (string) --

      The ID of the asset model, in UUID format.

    • assetModelCompositeModelId (string) --

      The ID of a composite model on this asset model.

    • assetModelCompositeModelExternalId (string) --

      The external ID of a composite model on this asset model.

    • assetModelCompositeModelPath (list) --

      The path to the composite model listing the parent composite models.

      • (dict) --

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

        • id (string) --

          The ID of the path segment.

        • name (string) --

          The name of the path segment.

    • assetModelCompositeModelName (string) --

      The unique, friendly name for the composite model.

    • assetModelCompositeModelDescription (string) --

      The description for the composite model.

    • assetModelCompositeModelType (string) --

      The composite model type. Valid values are AWS/ALARM , CUSTOM , or AWS/L4E_ANOMALY .

    • assetModelCompositeModelProperties (list) --

      The property definitions of the composite model.

      • (dict) --

        Contains information about an asset model property.

        • id (string) --

          The ID of the asset model property.

          • If you are callling UpdateAssetModel to create a new property: You can specify its ID here, if desired. 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 property: 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 IoT SiteWise User Guide .

        • name (string) --

          The name of the asset model property.

        • dataType (string) --

          The data type of the asset model property.

        • dataTypeSpec (string) --

          The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

        • unit (string) --

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

        • type (dict) --

          The property type (see PropertyType ).

          • attribute (dict) --

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

            • defaultValue (string) --

              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 IoT SiteWise User Guide .

          • measurement (dict) --

            Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

            • processingConfig (dict) --

              The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

              • forwardingConfig (dict) --

                The forwarding configuration for the given measurement property.

                • state (string) --

                  The forwarding state for the given property.

          • transform (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • processingConfig (dict) --

              The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

              • computeLocation (string) --

                The compute location for the given transform property.

              • forwardingConfig (dict) --

                The forwarding configuration for a given property.

                • state (string) --

                  The forwarding state for the given property.

          • metric (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • window (dict) --

              The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

              • tumbling (dict) --

                The tumbling time interval window.

                • interval (string) --

                  The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                  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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

                • offset (string) --

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

            • processingConfig (dict) --

              The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

              • computeLocation (string) --

                The compute location for the given metric property.

        • path (list) --

          The structured path to the property from the root of the asset model.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          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 IoT SiteWise User Guide .

    • compositionDetails (dict) --

      Metadata for the composition relationship established by using composedAssetModelId in CreateAssetModelCompositeModel. For instance, an array detailing the path of the composition relationship for this composite model.

      • compositionRelationship (list) --

        An array detailing the composition relationship for this composite model.

        • (dict) --

          Represents a composite model that composed an asset model of type COMPONENT_MODEL .

          • id (string) --

            The ID of the component.

    • assetModelCompositeModelSummaries (list) --

      The list of composite model summaries for the composite model.

      • (dict) --

        Contains a summary of the composite model.

        • id (string) --

          The ID of the the composite model that this summary describes..

        • externalId (string) --

          The external ID of a composite model on this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

        • name (string) --

          The name of the the composite model that this summary describes..

        • type (string) --

          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.

        • description (string) --

          The description of the the composite model that this summary describes..

        • path (list) --

          The path that includes all the pieces that make up the composite model.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

    • actionDefinitions (list) --

      The available actions for a composite model on this asset model.

      • (dict) --

        Contains a definition for an action.

        • actionDefinitionId (string) --

          The ID of the action definition.

        • actionName (string) --

          The name of the action definition.

        • actionType (string) --

          The type of the action definition.

ListAssetModelCompositeModels (new) Link ¶

Retrieves a paginated list of composite models associated with the asset model

See also: AWS API Documentation

Request Syntax

client.list_asset_model_composite_models(
    assetModelId='string',
    nextToken='string',
    maxResults=123
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model. 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 IoT SiteWise User Guide .

type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request.

Default: 50

rtype

dict

returns

Response Syntax

{
    'assetModelCompositeModelSummaries': [
        {
            'id': 'string',
            'externalId': 'string',
            'name': 'string',
            'type': 'string',
            'description': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assetModelCompositeModelSummaries (list) --

      A list that summarizes each composite model.

      • (dict) --

        Contains a summary of the composite model.

        • id (string) --

          The ID of the the composite model that this summary describes..

        • externalId (string) --

          The external ID of a composite model on this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

        • name (string) --

          The name of the the composite model that this summary describes..

        • type (string) --

          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.

        • description (string) --

          The description of the the composite model that this summary describes..

        • path (list) --

          The path that includes all the pieces that make up the composite model.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

DescribeAction (new) Link ¶

Retrieves information about an action.

See also: AWS API Documentation

Request Syntax

client.describe_action(
    actionId='string'
)
type actionId

string

param actionId

[REQUIRED]

The ID of the action.

rtype

dict

returns

Response Syntax

{
    'actionId': 'string',
    'targetResource': {
        'assetId': 'string'
    },
    'actionDefinitionId': 'string',
    'actionPayload': {
        'stringValue': 'string'
    },
    'executionTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • actionId (string) --

      The ID of the action.

    • targetResource (dict) --

      The resource the action will be taken on.

      • assetId (string) --

        The ID of the asset, in UUID format.

    • actionDefinitionId (string) --

      The ID of the action definition.

    • actionPayload (dict) --

      The JSON payload of the action.

      • stringValue (string) --

        The payload of the action in a JSON string.

    • executionTime (datetime) --

      The time the action was executed.

ListActions (new) Link ¶

Retrieves a paginated list of actions for a specific target resource.

See also: AWS API Documentation

Request Syntax

client.list_actions(
    targetResourceType='ASSET',
    targetResourceId='string',
    nextToken='string',
    maxResults=123
)
type targetResourceType

string

param targetResourceType

[REQUIRED]

The type of resource.

type targetResourceId

string

param targetResourceId

[REQUIRED]

The ID of the target resource.

type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request.

rtype

dict

returns

Response Syntax

{
    'actionSummaries': [
        {
            'actionId': 'string',
            'actionDefinitionId': 'string',
            'targetResource': {
                'assetId': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • actionSummaries (list) --

      A list that summarizes the actions associated with the specified asset.

      • (dict) --

        Contains the summary of the actions.

        • actionId (string) --

          The ID of the action.

        • actionDefinitionId (string) --

          The ID of the action definition.

        • targetResource (dict) --

          The resource the action will be taken on.

          • assetId (string) --

            The ID of the asset, in UUID format.

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

CreateAsset (updated) Link ¶
Changes (request)
{'assetExternalId': 'string', 'assetId': 'string'}

Creates an asset from an existing asset model. For more information, see Creating assets in the IoT SiteWise User Guide .

See also: AWS API Documentation

Request Syntax

client.create_asset(
    assetName='string',
    assetModelId='string',
    clientToken='string',
    tags={
        'string': 'string'
    },
    assetDescription='string',
    assetId='string',
    assetExternalId='string'
)
type assetName

string

param assetName

[REQUIRED]

A friendly name for the asset.

type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model from which to create the asset. 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 IoT SiteWise User Guide .

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

This field is autopopulated if not provided.

type tags

dict

param tags

A list of key-value pairs that contain metadata for the asset. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide .

  • (string) --

    • (string) --

type assetDescription

string

param assetDescription

A description for the asset.

type assetId

string

param assetId

The ID to assign to the asset, if desired. 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.

type assetExternalId

string

param assetExternalId

An external ID to assign to the asset. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetId': 'string',
    'assetArn': 'string',
    'assetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • assetId (string) --

      The ID of the asset, in UUID format. This ID uniquely identifies the asset within IoT SiteWise and can be used with other IoT SiteWise API operations.

    • assetArn (string) --

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

      arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}

    • assetStatus (dict) --

      The status of the asset, which contains a state ( CREATING after successfully calling this operation) and any error message.

      • state (string) --

        The current status of the asset.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

CreateAssetModel (updated) Link ¶
Changes (request)
{'assetModelCompositeModels': {'externalId': 'string',
                               'id': 'string',
                               'properties': {'externalId': 'string',
                                              'id': 'string',
                                              'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                            'name': 'string'}]}}},
                                                       'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                               'name': 'string'}]}}}}}},
 'assetModelExternalId': 'string',
 'assetModelHierarchies': {'externalId': 'string', 'id': 'string'},
 'assetModelId': 'string',
 'assetModelProperties': {'externalId': 'string',
                          'id': 'string',
                          'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                        'name': 'string'}]}}},
                                   'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                           'name': 'string'}]}}}}},
 'assetModelType': 'ASSET_MODEL | COMPONENT_MODEL'}

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 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 also: AWS API Documentation

Request Syntax

client.create_asset_model(
    assetModelName='string',
    assetModelDescription='string',
    assetModelProperties=[
        {
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'id': 'string',
            'externalId': 'string'
        },
    ],
    assetModelHierarchies=[
        {
            'name': 'string',
            'childAssetModelId': 'string',
            'id': 'string',
            'externalId': 'string'
        },
    ],
    assetModelCompositeModels=[
        {
            'name': 'string',
            'description': 'string',
            'type': 'string',
            'properties': [
                {
                    'name': 'string',
                    'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
                    'dataTypeSpec': 'string',
                    'unit': 'string',
                    'type': {
                        'attribute': {
                            'defaultValue': 'string'
                        },
                        'measurement': {
                            'processingConfig': {
                                'forwardingConfig': {
                                    'state': 'DISABLED'|'ENABLED'
                                }
                            }
                        },
                        'transform': {
                            'expression': 'string',
                            'variables': [
                                {
                                    'name': 'string',
                                    'value': {
                                        'propertyId': 'string',
                                        'hierarchyId': 'string',
                                        'propertyPath': [
                                            {
                                                'id': 'string',
                                                'name': 'string'
                                            },
                                        ]
                                    }
                                },
                            ],
                            'processingConfig': {
                                'computeLocation': 'EDGE'|'CLOUD',
                                'forwardingConfig': {
                                    'state': 'DISABLED'|'ENABLED'
                                }
                            }
                        },
                        'metric': {
                            'expression': 'string',
                            'variables': [
                                {
                                    'name': 'string',
                                    'value': {
                                        'propertyId': 'string',
                                        'hierarchyId': 'string',
                                        'propertyPath': [
                                            {
                                                'id': 'string',
                                                'name': 'string'
                                            },
                                        ]
                                    }
                                },
                            ],
                            'window': {
                                'tumbling': {
                                    'interval': 'string',
                                    'offset': 'string'
                                }
                            },
                            'processingConfig': {
                                'computeLocation': 'EDGE'|'CLOUD'
                            }
                        }
                    },
                    'id': 'string',
                    'externalId': 'string'
                },
            ],
            'id': 'string',
            'externalId': 'string'
        },
    ],
    clientToken='string',
    tags={
        'string': 'string'
    },
    assetModelId='string',
    assetModelExternalId='string',
    assetModelType='ASSET_MODEL'|'COMPONENT_MODEL'
)
type assetModelName

string

param assetModelName

[REQUIRED]

A unique, friendly name for the asset model.

type assetModelDescription

string

param assetModelDescription

A description for the asset model.

type assetModelProperties

list

param assetModelProperties

The property definitions of the asset model. For more information, see Asset properties in the IoT SiteWise User Guide .

You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide .

  • (dict) --

    Contains an asset model property definition. This property definition is applied to all assets created from the asset model.

    • name (string) -- [REQUIRED]

      The name of the property definition.

    • dataType (string) -- [REQUIRED]

      The data type of the property definition.

      If you specify STRUCT , you must also specify dataTypeSpec to identify the type of the structure for this property.

    • dataTypeSpec (string) --

      The data type of the structure for this property. This parameter is required on properties that have the STRUCT data type.

      The options for this parameter depend on the type of the composite model in which you define this property. Use AWS/ALARM_STATE for alarm state in alarm composite models.

    • unit (string) --

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

    • type (dict) -- [REQUIRED]

      The property definition type (see PropertyType ). You can only specify one type in a property definition.

      • attribute (dict) --

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

        • defaultValue (string) --

          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 IoT SiteWise User Guide .

      • measurement (dict) --

        Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

        • processingConfig (dict) --

          The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

          • forwardingConfig (dict) -- [REQUIRED]

            The forwarding configuration for the given measurement property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • transform (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • processingConfig (dict) --

          The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given transform property.

          • forwardingConfig (dict) --

            The forwarding configuration for a given property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • metric (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • window (dict) -- [REQUIRED]

          The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

          • tumbling (dict) --

            The tumbling time interval window.

            • interval (string) -- [REQUIRED]

              The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

              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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

            • offset (string) --

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

        • processingConfig (dict) --

          The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given metric property.

    • id (string) --

      The ID to assign to the asset model property, if desired. 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.

    • externalId (string) --

      An external ID to assign to the property definition. The external ID must be unique among property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

type assetModelHierarchies

list

param assetModelHierarchies

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 IoT SiteWise User Guide .

You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise User Guide .

  • (dict) --

    Contains an asset model hierarchy used in asset model creation. An asset model hierarchy determines the kind (or type) of asset that can belong to a hierarchy.

    • name (string) -- [REQUIRED]

      The name of the asset model hierarchy definition (as specified in the CreateAssetModel or UpdateAssetModel API operation).

    • childAssetModelId (string) -- [REQUIRED]

      The ID of an asset model for this 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 IoT SiteWise User Guide .

    • id (string) --

      The ID to assign to the asset model hierarchy, if desired. 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.

    • externalId (string) --

      An external ID to assign to the asset model hierarchy. The external ID must be unique among asset model hierarchies within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

type assetModelCompositeModels

list

param assetModelCompositeModels

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.

Note

When creating custom composite models, you need to use CreateAssetModelCompositeModel. For more information, see <LINK>.

  • (dict) --

    Contains a composite model definition in an asset model. This composite model definition is applied to all assets created from the asset model.

    • name (string) -- [REQUIRED]

      The name of the composite model.

    • description (string) --

      The description of the composite model.

    • type (string) -- [REQUIRED]

      The type of the composite model. For alarm composite models, this type is AWS/ALARM .

    • properties (list) --

      The asset property definitions for this composite model.

      • (dict) --

        Contains an asset model property definition. This property definition is applied to all assets created from the asset model.

        • name (string) -- [REQUIRED]

          The name of the property definition.

        • dataType (string) -- [REQUIRED]

          The data type of the property definition.

          If you specify STRUCT , you must also specify dataTypeSpec to identify the type of the structure for this property.

        • dataTypeSpec (string) --

          The data type of the structure for this property. This parameter is required on properties that have the STRUCT data type.

          The options for this parameter depend on the type of the composite model in which you define this property. Use AWS/ALARM_STATE for alarm state in alarm composite models.

        • unit (string) --

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

        • type (dict) -- [REQUIRED]

          The property definition type (see PropertyType ). You can only specify one type in a property definition.

          • attribute (dict) --

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

            • defaultValue (string) --

              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 IoT SiteWise User Guide .

          • measurement (dict) --

            Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

            • processingConfig (dict) --

              The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

              • forwardingConfig (dict) -- [REQUIRED]

                The forwarding configuration for the given measurement property.

                • state (string) -- [REQUIRED]

                  The forwarding state for the given property.

          • transform (dict) --

            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.

            • expression (string) -- [REQUIRED]

              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 IoT SiteWise User Guide .

            • variables (list) -- [REQUIRED]

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) -- [REQUIRED]

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

                • value (dict) -- [REQUIRED]

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • processingConfig (dict) --

              The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

              • computeLocation (string) -- [REQUIRED]

                The compute location for the given transform property.

              • forwardingConfig (dict) --

                The forwarding configuration for a given property.

                • state (string) -- [REQUIRED]

                  The forwarding state for the given property.

          • metric (dict) --

            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.

            • expression (string) -- [REQUIRED]

              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 IoT SiteWise User Guide .

            • variables (list) -- [REQUIRED]

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) -- [REQUIRED]

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

                • value (dict) -- [REQUIRED]

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • window (dict) -- [REQUIRED]

              The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

              • tumbling (dict) --

                The tumbling time interval window.

                • interval (string) -- [REQUIRED]

                  The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                  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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

                • offset (string) --

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

            • processingConfig (dict) --

              The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

              • computeLocation (string) -- [REQUIRED]

                The compute location for the given metric property.

        • id (string) --

          The ID to assign to the asset model property, if desired. 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.

        • externalId (string) --

          An external ID to assign to the property definition. The external ID must be unique among property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • id (string) --

      The ID to assign to the composite model, if desired. 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.

    • externalId (string) --

      An external ID to assign to the composite model. The external ID must be unique among composite models within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

This field is autopopulated if not provided.

type tags

dict

param tags

A list of key-value pairs that contain metadata for the asset model. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide .

  • (string) --

    • (string) --

type assetModelId

string

param assetModelId

The ID to assign to the asset model, if desired. 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.

type assetModelExternalId

string

param assetModelExternalId

An external ID to assign to the asset model. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide .

type assetModelType

string

param assetModelType

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.

rtype

dict

returns

Response Syntax

{
    'assetModelId': 'string',
    'assetModelArn': 'string',
    'assetModelStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'PROPAGATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • assetModelId (string) --

      The ID of the asset model, in UUID format. You can use this ID when you call other IoT SiteWise API operations.

    • assetModelArn (string) --

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

      arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}

    • assetModelStatus (dict) --

      The status of the asset model, which contains a state ( CREATING after successfully calling this operation) and any error message.

      • state (string) --

        The current state of the asset model.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

CreateBulkImportJob (updated) Link ¶
Changes (request)
{'adaptiveIngestion': 'boolean',
 'deleteFilesAfterImport': 'boolean',
 'jobConfiguration': {'fileFormat': {'parquet': {}}}}

Defines a job to ingest data to IoT SiteWise from Amazon S3. For more information, see Create a bulk import job (CLI) in the Amazon Simple Storage Service User Guide .

Warning

Before you create a bulk import job, you must enable IoT SiteWise warm tier or IoT SiteWise cold tier. For more information about how to configure storage settings, see PutStorageConfiguration.

Bulk import is designed to store historical data to IoT SiteWise. It does not trigger computations or notifications on IoT SiteWise warm or cold tier storage.

See also: AWS API Documentation

Request Syntax

client.create_bulk_import_job(
    jobName='string',
    jobRoleArn='string',
    files=[
        {
            'bucket': 'string',
            'key': 'string',
            'versionId': 'string'
        },
    ],
    errorReportLocation={
        'bucket': 'string',
        'prefix': 'string'
    },
    jobConfiguration={
        'fileFormat': {
            'csv': {
                'columnNames': [
                    'ALIAS'|'ASSET_ID'|'PROPERTY_ID'|'DATA_TYPE'|'TIMESTAMP_SECONDS'|'TIMESTAMP_NANO_OFFSET'|'QUALITY'|'VALUE',
                ]
            },
            'parquet': {}

        }
    },
    adaptiveIngestion=True|False,
    deleteFilesAfterImport=True|False
)
type jobName

string

param jobName

[REQUIRED]

The unique name that helps identify the job request.

type jobRoleArn

string

param jobRoleArn

[REQUIRED]

The ARN of the IAM role that allows IoT SiteWise to read Amazon S3 data.

type files

list

param files

[REQUIRED]

The files in the specified Amazon S3 bucket that contain your data.

  • (dict) --

    The file in Amazon S3 where your data is saved.

    • bucket (string) -- [REQUIRED]

      The name of the Amazon S3 bucket from which data is imported.

    • key (string) -- [REQUIRED]

      The key of the Amazon S3 object that contains your data. Each object has a key that is a unique identifier. Each object has exactly one key.

    • versionId (string) --

      The version ID to identify a specific version of the Amazon S3 object that contains your data.

type errorReportLocation

dict

param errorReportLocation

[REQUIRED]

The Amazon S3 destination where errors associated with the job creation request are saved.

  • bucket (string) -- [REQUIRED]

    The name of the Amazon S3 bucket to which errors associated with the bulk import job are sent.

  • prefix (string) -- [REQUIRED]

    Amazon S3 uses the prefix as a folder name to organize data in the bucket. Each Amazon S3 object has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/). For more information, see Organizing objects using prefixes in the Amazon Simple Storage Service User Guide .

type jobConfiguration

dict

param jobConfiguration

[REQUIRED]

Contains the configuration information of a job, such as the file format used to save data in Amazon S3.

  • fileFormat (dict) -- [REQUIRED]

    The file format of the data in S3.

    • csv (dict) --

      The file is in .CSV format.

      • columnNames (list) -- [REQUIRED]

        The column names specified in the .csv file.

        • (string) --

    • parquet (dict) --

      The file is in parquet format.

type adaptiveIngestion

boolean

param adaptiveIngestion

If set to true, ingest new data into IoT SiteWise storage. Measurements with notifications, metrics and transforms are computed. If set to false, historical data is ingested into IoT SiteWise as is.

type deleteFilesAfterImport

boolean

param deleteFilesAfterImport

If set to true, your data files is deleted from S3, after ingestion into IoT SiteWise storage.

rtype

dict

returns

Response Syntax

{
    'jobId': 'string',
    'jobName': 'string',
    'jobStatus': 'PENDING'|'CANCELLED'|'RUNNING'|'COMPLETED'|'FAILED'|'COMPLETED_WITH_FAILURES'
}

Response Structure

  • (dict) --

    • jobId (string) --

      The ID of the job.

    • jobName (string) --

      The unique name that helps identify the job request.

    • jobStatus (string) --

      The status of the bulk import job can be one of following values:

      • PENDING – IoT SiteWise is waiting for the current bulk import job to finish.

      • CANCELLED – The bulk import job has been canceled.

      • RUNNING – IoT SiteWise is processing your request to import your data from Amazon S3.

      • COMPLETED – IoT SiteWise successfully completed your request to import data from Amazon S3.

      • FAILED – IoT SiteWise couldn't process your request to import data from Amazon S3. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues.

      • COMPLETED_WITH_FAILURES – IoT SiteWise completed your request to import data from Amazon S3 with errors. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues.

DescribeAsset (updated) Link ¶
Changes (response)
{'assetCompositeModelSummaries': [{'description': 'string',
                                   'externalId': 'string',
                                   'id': 'string',
                                   'name': 'string',
                                   'path': [{'id': 'string', 'name': 'string'}],
                                   'type': 'string'}],
 'assetCompositeModels': {'externalId': 'string',
                          'properties': {'externalId': 'string',
                                         'path': [{'id': 'string',
                                                   'name': 'string'}]}},
 'assetExternalId': 'string',
 'assetHierarchies': {'externalId': 'string'},
 'assetProperties': {'externalId': 'string',
                     'path': [{'id': 'string', 'name': 'string'}]}}

Retrieves information about an asset.

See also: AWS API Documentation

Request Syntax

client.describe_asset(
    assetId='string',
    excludeProperties=True|False
)
type assetId

string

param assetId

[REQUIRED]

The ID of the asset. 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 IoT SiteWise User Guide .

type excludeProperties

boolean

param excludeProperties

Whether or not to exclude asset properties from the response.

rtype

dict

returns

Response Syntax

{
    'assetId': 'string',
    'assetArn': 'string',
    'assetName': 'string',
    'assetModelId': 'string',
    'assetProperties': [
        {
            'id': 'string',
            'name': 'string',
            'alias': 'string',
            'notification': {
                'topic': 'string',
                'state': 'ENABLED'|'DISABLED'
            },
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ],
    'assetHierarchies': [
        {
            'id': 'string',
            'name': 'string',
            'externalId': 'string'
        },
    ],
    'assetCompositeModels': [
        {
            'name': 'string',
            'description': 'string',
            'type': 'string',
            'properties': [
                {
                    'id': 'string',
                    'name': 'string',
                    'alias': 'string',
                    'notification': {
                        'topic': 'string',
                        'state': 'ENABLED'|'DISABLED'
                    },
                    'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
                    'dataTypeSpec': 'string',
                    'unit': 'string',
                    'path': [
                        {
                            'id': 'string',
                            'name': 'string'
                        },
                    ],
                    'externalId': 'string'
                },
            ],
            'id': 'string',
            'externalId': 'string'
        },
    ],
    'assetCreationDate': datetime(2015, 1, 1),
    'assetLastUpdateDate': datetime(2015, 1, 1),
    'assetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    },
    'assetDescription': 'string',
    'assetCompositeModelSummaries': [
        {
            'id': 'string',
            'externalId': 'string',
            'name': 'string',
            'type': 'string',
            'description': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ]
        },
    ],
    'assetExternalId': 'string'
}

Response Structure

  • (dict) --

    • assetId (string) --

      The ID of the asset, in UUID format.

    • assetArn (string) --

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

      arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}

    • assetName (string) --

      The name of the asset.

    • assetModelId (string) --

      The ID of the asset model that was used to create the asset.

    • assetProperties (list) --

      The list of asset properties for the asset.

      This object doesn't include properties that you define in composite models. You can find composite model properties in the assetCompositeModels object.

      • (dict) --

        Contains asset property information.

        • id (string) --

          The ID of the asset property.

        • name (string) --

          The name of the property.

        • alias (string) --

          The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature ). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide .

        • notification (dict) --

          The asset property's notification topic and state. For more information, see UpdateAssetProperty.

          • topic (string) --

            The MQTT topic to which IoT SiteWise publishes property value update notifications.

          • state (string) --

            The current notification state.

        • dataType (string) --

          The data type of the asset property.

        • dataTypeSpec (string) --

          The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

        • unit (string) --

          The unit (such as Newtons or RPM ) of the asset property.

        • path (list) --

          The structured path to the property from the root of the asset.

          • (dict) --

            Represents one level between a property and the root of the asset.

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          The external ID of the asset property. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • assetHierarchies (list) --

      A list of asset hierarchies that each contain a hierarchyId . A hierarchy specifies allowed parent/child asset relationships.

      • (dict) --

        Describes an asset hierarchy that contains a hierarchy's name and ID.

        • id (string) --

          The ID of the hierarchy. This ID is a hierarchyId .

        • name (string) --

          The hierarchy name provided in the CreateAssetModel or UpdateAssetModel API operation.

        • externalId (string) --

          The external ID of the hierarchy, if it has one. When you update an asset hierarchy, you may assign an external ID if it doesn't already have one. You can't change the external ID of an asset hierarchy that already has one. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • assetCompositeModels (list) --

      The composite models for the asset.

      • (dict) --

        Contains information about a composite model in an asset. This object contains the asset's properties that you define in the composite model.

        • name (string) --

          The name of the composite model.

        • description (string) --

          The description of the composite model.

        • type (string) --

          The type of the composite model. For alarm composite models, this type is AWS/ALARM .

        • properties (list) --

          The asset properties that this composite model defines.

          • (dict) --

            Contains asset property information.

            • id (string) --

              The ID of the asset property.

            • name (string) --

              The name of the property.

            • alias (string) --

              The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature ). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide .

            • notification (dict) --

              The asset property's notification topic and state. For more information, see UpdateAssetProperty.

              • topic (string) --

                The MQTT topic to which IoT SiteWise publishes property value update notifications.

              • state (string) --

                The current notification state.

            • dataType (string) --

              The data type of the asset property.

            • dataTypeSpec (string) --

              The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

            • unit (string) --

              The unit (such as Newtons or RPM ) of the asset property.

            • path (list) --

              The structured path to the property from the root of the asset.

              • (dict) --

                Represents one level between a property and the root of the asset.

                • id (string) --

                  The ID of the path segment.

                • name (string) --

                  The name of the path segment.

            • externalId (string) --

              The external ID of the asset property. For more information, see Using external IDs in the IoT SiteWise User Guide .

        • id (string) --

          The ID of the asset composite model.

        • externalId (string) --

          The external ID of the asset composite model. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • assetCreationDate (datetime) --

      The date the asset was created, in Unix epoch time.

    • assetLastUpdateDate (datetime) --

      The date the asset was last updated, in Unix epoch time.

    • assetStatus (dict) --

      The current status of the asset, which contains a state and any error message.

      • state (string) --

        The current status of the asset.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

    • assetDescription (string) --

      A description for the asset.

    • assetCompositeModelSummaries (list) --

      The list of the immediate child custom composite model summaries for the asset.

      • (dict) --

        Contains a summary of the composite model for a specific asset.

        • id (string) --

          The ID of the composite model that this summary describes.

        • externalId (string) --

          An external ID to assign to the asset model.

          If the composite model is a derived composite model, or one nested inside a component model, you can only set the external ID using UpdateAssetModelCompositeModel and specifying the derived ID of the model or property from the created model it's a part of.

        • name (string) --

          The name of the composite model that this summary describes.

        • type (string) --

          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.

        • description (string) --

          A description of the composite model that this summary describes.

        • path (list) --

          The path that includes all the components of the asset model for the asset.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

    • assetExternalId (string) --

      The external ID of the asset, if any.

DescribeAssetModel (updated) Link ¶
Changes (response)
{'assetModelCompositeModelSummaries': [{'description': 'string',
                                        'externalId': 'string',
                                        'id': 'string',
                                        'name': 'string',
                                        'path': [{'id': 'string',
                                                  'name': 'string'}],
                                        'type': 'string'}],
 'assetModelCompositeModels': {'externalId': 'string',
                               'properties': {'externalId': 'string',
                                              'path': [{'id': 'string',
                                                        'name': 'string'}],
                                              'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                            'name': 'string'}]}}},
                                                       'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                               'name': 'string'}]}}}}}},
 'assetModelExternalId': 'string',
 'assetModelHierarchies': {'externalId': 'string'},
 'assetModelProperties': {'externalId': 'string',
                          'path': [{'id': 'string', 'name': 'string'}],
                          'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                        'name': 'string'}]}}},
                                   'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                           'name': 'string'}]}}}}},
 'assetModelType': 'ASSET_MODEL | COMPONENT_MODEL'}

Retrieves information about an asset model.

See also: AWS API Documentation

Request Syntax

client.describe_asset_model(
    assetModelId='string',
    excludeProperties=True|False
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model. 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 IoT SiteWise User Guide .

type excludeProperties

boolean

param excludeProperties

Whether or not to exclude asset model properties from the response.

rtype

dict

returns

Response Syntax

{
    'assetModelId': 'string',
    'assetModelArn': 'string',
    'assetModelName': 'string',
    'assetModelDescription': 'string',
    'assetModelProperties': [
        {
            'id': 'string',
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ],
    'assetModelHierarchies': [
        {
            'id': 'string',
            'name': 'string',
            'childAssetModelId': 'string',
            'externalId': 'string'
        },
    ],
    'assetModelCompositeModels': [
        {
            'name': 'string',
            'description': 'string',
            'type': 'string',
            'properties': [
                {
                    'id': 'string',
                    'name': 'string',
                    'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
                    'dataTypeSpec': 'string',
                    'unit': 'string',
                    'type': {
                        'attribute': {
                            'defaultValue': 'string'
                        },
                        'measurement': {
                            'processingConfig': {
                                'forwardingConfig': {
                                    'state': 'DISABLED'|'ENABLED'
                                }
                            }
                        },
                        'transform': {
                            'expression': 'string',
                            'variables': [
                                {
                                    'name': 'string',
                                    'value': {
                                        'propertyId': 'string',
                                        'hierarchyId': 'string',
                                        'propertyPath': [
                                            {
                                                'id': 'string',
                                                'name': 'string'
                                            },
                                        ]
                                    }
                                },
                            ],
                            'processingConfig': {
                                'computeLocation': 'EDGE'|'CLOUD',
                                'forwardingConfig': {
                                    'state': 'DISABLED'|'ENABLED'
                                }
                            }
                        },
                        'metric': {
                            'expression': 'string',
                            'variables': [
                                {
                                    'name': 'string',
                                    'value': {
                                        'propertyId': 'string',
                                        'hierarchyId': 'string',
                                        'propertyPath': [
                                            {
                                                'id': 'string',
                                                'name': 'string'
                                            },
                                        ]
                                    }
                                },
                            ],
                            'window': {
                                'tumbling': {
                                    'interval': 'string',
                                    'offset': 'string'
                                }
                            },
                            'processingConfig': {
                                'computeLocation': 'EDGE'|'CLOUD'
                            }
                        }
                    },
                    'path': [
                        {
                            'id': 'string',
                            'name': 'string'
                        },
                    ],
                    'externalId': 'string'
                },
            ],
            'id': 'string',
            'externalId': 'string'
        },
    ],
    'assetModelCreationDate': datetime(2015, 1, 1),
    'assetModelLastUpdateDate': datetime(2015, 1, 1),
    'assetModelStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'PROPAGATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    },
    'assetModelType': 'ASSET_MODEL'|'COMPONENT_MODEL',
    'assetModelCompositeModelSummaries': [
        {
            'id': 'string',
            'externalId': 'string',
            'name': 'string',
            'type': 'string',
            'description': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ]
        },
    ],
    'assetModelExternalId': 'string'
}

Response Structure

  • (dict) --

    • assetModelId (string) --

      The ID of the asset model, in UUID format.

    • assetModelArn (string) --

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

      arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}

    • assetModelName (string) --

      The name of the asset model.

    • assetModelDescription (string) --

      The asset model's description.

    • assetModelProperties (list) --

      The list of asset properties for the asset model.

      This object doesn't include properties that you define in composite models. You can find composite model properties in the assetModelCompositeModels object.

      • (dict) --

        Contains information about an asset model property.

        • id (string) --

          The ID of the asset model property.

          • If you are callling UpdateAssetModel to create a new property: You can specify its ID here, if desired. 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 property: 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 IoT SiteWise User Guide .

        • name (string) --

          The name of the asset model property.

        • dataType (string) --

          The data type of the asset model property.

        • dataTypeSpec (string) --

          The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

        • unit (string) --

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

        • type (dict) --

          The property type (see PropertyType ).

          • attribute (dict) --

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

            • defaultValue (string) --

              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 IoT SiteWise User Guide .

          • measurement (dict) --

            Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

            • processingConfig (dict) --

              The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

              • forwardingConfig (dict) --

                The forwarding configuration for the given measurement property.

                • state (string) --

                  The forwarding state for the given property.

          • transform (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • processingConfig (dict) --

              The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

              • computeLocation (string) --

                The compute location for the given transform property.

              • forwardingConfig (dict) --

                The forwarding configuration for a given property.

                • state (string) --

                  The forwarding state for the given property.

          • metric (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • window (dict) --

              The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

              • tumbling (dict) --

                The tumbling time interval window.

                • interval (string) --

                  The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                  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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

                • offset (string) --

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

            • processingConfig (dict) --

              The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

              • computeLocation (string) --

                The compute location for the given metric property.

        • path (list) --

          The structured path to the property from the root of the asset model.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          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 IoT SiteWise User Guide .

    • assetModelHierarchies (list) --

      A list of asset model hierarchies that each contain a childAssetModelId and a hierarchyId (named id ). A hierarchy specifies allowed parent/child asset relationships for an asset model.

      • (dict) --

        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.

        • id (string) --

          The ID of the asset model hierarchy. This ID is a hierarchyId .

          • If you are callling UpdateAssetModel to create a new hierarchy: You can specify its ID here, if desired. 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 IoT SiteWise User Guide .

        • name (string) --

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

        • childAssetModelId (string) --

          The ID of the asset model, in UUID format. All assets in this hierarchy must be instances of the childAssetModelId asset model. 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 IoT SiteWise User Guide .

        • externalId (string) --

          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 IoT SiteWise User Guide .

    • assetModelCompositeModels (list) --

      The list of built-in composite models for the asset model, such as those with those of type AWS/ALARMS .

      • (dict) --

        Contains information about a composite model in an asset model. This object contains the asset property definitions that you define in the composite model.

        • name (string) --

          The name of the composite model.

        • description (string) --

          The description of the composite model.

        • type (string) --

          The type of the composite model. For alarm composite models, this type is AWS/ALARM .

        • properties (list) --

          The asset property definitions for this composite model.

          • (dict) --

            Contains information about an asset model property.

            • id (string) --

              The ID of the asset model property.

              • If you are callling UpdateAssetModel to create a new property: You can specify its ID here, if desired. 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 property: 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 IoT SiteWise User Guide .

            • name (string) --

              The name of the asset model property.

            • dataType (string) --

              The data type of the asset model property.

            • dataTypeSpec (string) --

              The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

            • unit (string) --

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

            • type (dict) --

              The property type (see PropertyType ).

              • attribute (dict) --

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

                • defaultValue (string) --

                  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 IoT SiteWise User Guide .

              • measurement (dict) --

                Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

                • processingConfig (dict) --

                  The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

                  • forwardingConfig (dict) --

                    The forwarding configuration for the given measurement property.

                    • state (string) --

                      The forwarding state for the given property.

              • transform (dict) --

                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.

                • expression (string) --

                  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 IoT SiteWise User Guide .

                • variables (list) --

                  The list of variables used in the expression.

                  • (dict) --

                    Contains expression variable information.

                    • name (string) --

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

                    • value (dict) --

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

                      • propertyId (string) --

                        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 IoT SiteWise User Guide .

                      • hierarchyId (string) --

                        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 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 IoT SiteWise User Guide .

                      • propertyPath (list) --

                        The path of the property.

                        • (dict) --

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

                          • id (string) --

                            The ID of the path segment.

                          • name (string) --

                            The name of the path segment.

                • processingConfig (dict) --

                  The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

                  • computeLocation (string) --

                    The compute location for the given transform property.

                  • forwardingConfig (dict) --

                    The forwarding configuration for a given property.

                    • state (string) --

                      The forwarding state for the given property.

              • metric (dict) --

                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.

                • expression (string) --

                  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 IoT SiteWise User Guide .

                • variables (list) --

                  The list of variables used in the expression.

                  • (dict) --

                    Contains expression variable information.

                    • name (string) --

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

                    • value (dict) --

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

                      • propertyId (string) --

                        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 IoT SiteWise User Guide .

                      • hierarchyId (string) --

                        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 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 IoT SiteWise User Guide .

                      • propertyPath (list) --

                        The path of the property.

                        • (dict) --

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

                          • id (string) --

                            The ID of the path segment.

                          • name (string) --

                            The name of the path segment.

                • window (dict) --

                  The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

                  • tumbling (dict) --

                    The tumbling time interval window.

                    • interval (string) --

                      The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                      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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

                    • offset (string) --

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

                • processingConfig (dict) --

                  The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

                  • computeLocation (string) --

                    The compute location for the given metric property.

            • path (list) --

              The structured path to the property from the root of the asset model.

              • (dict) --

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

                • id (string) --

                  The ID of the path segment.

                • name (string) --

                  The name of the path segment.

            • externalId (string) --

              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 IoT SiteWise User Guide .

        • id (string) --

          The ID of the asset model composite model.

        • externalId (string) --

          The external ID of the asset model composite model. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • assetModelCreationDate (datetime) --

      The date the asset model was created, in Unix epoch time.

    • assetModelLastUpdateDate (datetime) --

      The date the asset model was last updated, in Unix epoch time.

    • assetModelStatus (dict) --

      The current status of the asset model, which contains a state and any error message.

      • state (string) --

        The current state of the asset model.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

    • assetModelType (string) --

      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.

    • assetModelCompositeModelSummaries (list) --

      The list of the immediate child custom composite model summaries for the asset model.

      • (dict) --

        Contains a summary of the composite model.

        • id (string) --

          The ID of the the composite model that this summary describes..

        • externalId (string) --

          The external ID of a composite model on this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

        • name (string) --

          The name of the the composite model that this summary describes..

        • type (string) --

          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.

        • description (string) --

          The description of the the composite model that this summary describes..

        • path (list) --

          The path that includes all the pieces that make up the composite model.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

    • assetModelExternalId (string) --

      The external ID of the asset model, if any.

DescribeAssetProperty (updated) Link ¶
Changes (response)
{'assetExternalId': 'string',
 'assetProperty': {'externalId': 'string',
                   'path': [{'id': 'string', 'name': 'string'}],
                   'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                 'name': 'string'}]}}},
                            'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                    'name': 'string'}]}}}}},
 'compositeModel': {'assetProperty': {'externalId': 'string',
                                      'path': [{'id': 'string',
                                                'name': 'string'}],
                                      'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                    'name': 'string'}]}}},
                                               'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                       'name': 'string'}]}}}}},
                    'externalId': 'string'}}

Retrieves information about an asset property.

Note

When you call this operation for an attribute property, this response includes the default attribute value that you define in the asset model. If you update the default value in the model, this operation's response includes the new default value.

This operation doesn't return the value of the asset property. To get the value of an asset property, use GetAssetPropertyValue.

See also: AWS API Documentation

Request Syntax

client.describe_asset_property(
    assetId='string',
    propertyId='string'
)
type assetId

string

param assetId

[REQUIRED]

The ID of the asset. 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 IoT SiteWise User Guide .

type propertyId

string

param propertyId

[REQUIRED]

The ID of the asset property. 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 IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetId': 'string',
    'assetName': 'string',
    'assetModelId': 'string',
    'assetProperty': {
        'id': 'string',
        'name': 'string',
        'alias': 'string',
        'notification': {
            'topic': 'string',
            'state': 'ENABLED'|'DISABLED'
        },
        'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
        'unit': 'string',
        'type': {
            'attribute': {
                'defaultValue': 'string'
            },
            'measurement': {
                'processingConfig': {
                    'forwardingConfig': {
                        'state': 'DISABLED'|'ENABLED'
                    }
                }
            },
            'transform': {
                'expression': 'string',
                'variables': [
                    {
                        'name': 'string',
                        'value': {
                            'propertyId': 'string',
                            'hierarchyId': 'string',
                            'propertyPath': [
                                {
                                    'id': 'string',
                                    'name': 'string'
                                },
                            ]
                        }
                    },
                ],
                'processingConfig': {
                    'computeLocation': 'EDGE'|'CLOUD',
                    'forwardingConfig': {
                        'state': 'DISABLED'|'ENABLED'
                    }
                }
            },
            'metric': {
                'expression': 'string',
                'variables': [
                    {
                        'name': 'string',
                        'value': {
                            'propertyId': 'string',
                            'hierarchyId': 'string',
                            'propertyPath': [
                                {
                                    'id': 'string',
                                    'name': 'string'
                                },
                            ]
                        }
                    },
                ],
                'window': {
                    'tumbling': {
                        'interval': 'string',
                        'offset': 'string'
                    }
                },
                'processingConfig': {
                    'computeLocation': 'EDGE'|'CLOUD'
                }
            }
        },
        'path': [
            {
                'id': 'string',
                'name': 'string'
            },
        ],
        'externalId': 'string'
    },
    'compositeModel': {
        'name': 'string',
        'type': 'string',
        'assetProperty': {
            'id': 'string',
            'name': 'string',
            'alias': 'string',
            'notification': {
                'topic': 'string',
                'state': 'ENABLED'|'DISABLED'
            },
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
        'id': 'string',
        'externalId': 'string'
    },
    'assetExternalId': 'string'
}

Response Structure

  • (dict) --

    • assetId (string) --

      The ID of the asset, in UUID format.

    • assetName (string) --

      The name of the asset.

    • assetModelId (string) --

      The ID of the asset model, in UUID format.

    • assetProperty (dict) --

      The asset property's definition, alias, and notification state.

      This response includes this object for normal asset properties. If you describe an asset property in a composite model, this response includes the asset property information in compositeModel .

      • id (string) --

        The ID of the asset property.

      • name (string) --

        The name of the property.

      • alias (string) --

        The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature ). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide .

      • notification (dict) --

        The asset property's notification topic and state. For more information, see UpdateAssetProperty.

        • topic (string) --

          The MQTT topic to which IoT SiteWise publishes property value update notifications.

        • state (string) --

          The current notification state.

      • dataType (string) --

        The property data type.

      • unit (string) --

        The unit (such as Newtons or RPM ) of the asset property.

      • type (dict) --

        The property type (see PropertyType ). A property contains one type.

        • attribute (dict) --

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

          • defaultValue (string) --

            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 IoT SiteWise User Guide .

        • measurement (dict) --

          Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

          • processingConfig (dict) --

            The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

            • forwardingConfig (dict) --

              The forwarding configuration for the given measurement property.

              • state (string) --

                The forwarding state for the given property.

        • transform (dict) --

          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.

          • expression (string) --

            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 IoT SiteWise User Guide .

          • variables (list) --

            The list of variables used in the expression.

            • (dict) --

              Contains expression variable information.

              • name (string) --

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

              • value (dict) --

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

                • propertyId (string) --

                  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 IoT SiteWise User Guide .

                • hierarchyId (string) --

                  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 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 IoT SiteWise User Guide .

                • propertyPath (list) --

                  The path of the property.

                  • (dict) --

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

                    • id (string) --

                      The ID of the path segment.

                    • name (string) --

                      The name of the path segment.

          • processingConfig (dict) --

            The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

            • computeLocation (string) --

              The compute location for the given transform property.

            • forwardingConfig (dict) --

              The forwarding configuration for a given property.

              • state (string) --

                The forwarding state for the given property.

        • metric (dict) --

          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.

          • expression (string) --

            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 IoT SiteWise User Guide .

          • variables (list) --

            The list of variables used in the expression.

            • (dict) --

              Contains expression variable information.

              • name (string) --

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

              • value (dict) --

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

                • propertyId (string) --

                  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 IoT SiteWise User Guide .

                • hierarchyId (string) --

                  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 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 IoT SiteWise User Guide .

                • propertyPath (list) --

                  The path of the property.

                  • (dict) --

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

                    • id (string) --

                      The ID of the path segment.

                    • name (string) --

                      The name of the path segment.

          • window (dict) --

            The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

            • tumbling (dict) --

              The tumbling time interval window.

              • interval (string) --

                The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

              • offset (string) --

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

          • processingConfig (dict) --

            The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

            • computeLocation (string) --

              The compute location for the given metric property.

      • path (list) --

        The structured path to the property from the root of the asset.

        • (dict) --

          Represents one level between a property and the root of the asset.

          • id (string) --

            The ID of the path segment.

          • name (string) --

            The name of the path segment.

      • externalId (string) --

        The external ID of the asset property. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • compositeModel (dict) --

      The composite model that declares this asset property, if this asset property exists in a composite model.

      • name (string) --

        The name of the property.

      • type (string) --

        The type of the composite model that defines this property.

      • assetProperty (dict) --

        Contains asset property information.

        • id (string) --

          The ID of the asset property.

        • name (string) --

          The name of the property.

        • alias (string) --

          The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature ). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide .

        • notification (dict) --

          The asset property's notification topic and state. For more information, see UpdateAssetProperty.

          • topic (string) --

            The MQTT topic to which IoT SiteWise publishes property value update notifications.

          • state (string) --

            The current notification state.

        • dataType (string) --

          The property data type.

        • unit (string) --

          The unit (such as Newtons or RPM ) of the asset property.

        • type (dict) --

          The property type (see PropertyType ). A property contains one type.

          • attribute (dict) --

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

            • defaultValue (string) --

              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 IoT SiteWise User Guide .

          • measurement (dict) --

            Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

            • processingConfig (dict) --

              The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

              • forwardingConfig (dict) --

                The forwarding configuration for the given measurement property.

                • state (string) --

                  The forwarding state for the given property.

          • transform (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • processingConfig (dict) --

              The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

              • computeLocation (string) --

                The compute location for the given transform property.

              • forwardingConfig (dict) --

                The forwarding configuration for a given property.

                • state (string) --

                  The forwarding state for the given property.

          • metric (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • window (dict) --

              The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

              • tumbling (dict) --

                The tumbling time interval window.

                • interval (string) --

                  The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                  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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

                • offset (string) --

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

            • processingConfig (dict) --

              The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

              • computeLocation (string) --

                The compute location for the given metric property.

        • path (list) --

          The structured path to the property from the root of the asset.

          • (dict) --

            Represents one level between a property and the root of the asset.

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          The external ID of the asset property. For more information, see Using external IDs in the IoT SiteWise User Guide .

      • id (string) --

        The ID of the composite model that contains the property.

      • externalId (string) --

        The external ID of the composite model that contains the property. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • assetExternalId (string) --

      The external ID of the asset. For more information, see Using external IDs in the IoT SiteWise User Guide .

DescribeBulkImportJob (updated) Link ¶
Changes (response)
{'adaptiveIngestion': 'boolean',
 'deleteFilesAfterImport': 'boolean',
 'jobConfiguration': {'fileFormat': {'parquet': {}}}}

Retrieves information about a bulk import job request. For more information, see Describe a bulk import job (CLI) in the Amazon Simple Storage Service User Guide .

See also: AWS API Documentation

Request Syntax

client.describe_bulk_import_job(
    jobId='string'
)
type jobId

string

param jobId

[REQUIRED]

The ID of the job.

rtype

dict

returns

Response Syntax

{
    'jobId': 'string',
    'jobName': 'string',
    'jobStatus': 'PENDING'|'CANCELLED'|'RUNNING'|'COMPLETED'|'FAILED'|'COMPLETED_WITH_FAILURES',
    'jobRoleArn': 'string',
    'files': [
        {
            'bucket': 'string',
            'key': 'string',
            'versionId': 'string'
        },
    ],
    'errorReportLocation': {
        'bucket': 'string',
        'prefix': 'string'
    },
    'jobConfiguration': {
        'fileFormat': {
            'csv': {
                'columnNames': [
                    'ALIAS'|'ASSET_ID'|'PROPERTY_ID'|'DATA_TYPE'|'TIMESTAMP_SECONDS'|'TIMESTAMP_NANO_OFFSET'|'QUALITY'|'VALUE',
                ]
            },
            'parquet': {}
        }
    },
    'jobCreationDate': datetime(2015, 1, 1),
    'jobLastUpdateDate': datetime(2015, 1, 1),
    'adaptiveIngestion': True|False,
    'deleteFilesAfterImport': True|False
}

Response Structure

  • (dict) --

    • jobId (string) --

      The ID of the job.

    • jobName (string) --

      The unique name that helps identify the job request.

    • jobStatus (string) --

      The status of the bulk import job can be one of following values:

      • PENDING – IoT SiteWise is waiting for the current bulk import job to finish.

      • CANCELLED – The bulk import job has been canceled.

      • RUNNING – IoT SiteWise is processing your request to import your data from Amazon S3.

      • COMPLETED – IoT SiteWise successfully completed your request to import data from Amazon S3.

      • FAILED – IoT SiteWise couldn't process your request to import data from Amazon S3. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues.

      • COMPLETED_WITH_FAILURES – IoT SiteWise completed your request to import data from Amazon S3 with errors. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues.

    • jobRoleArn (string) --

      The ARN of the IAM role that allows IoT SiteWise to read Amazon S3 data.

    • files (list) --

      The files in the specified Amazon S3 bucket that contain your data.

      • (dict) --

        The file in Amazon S3 where your data is saved.

        • bucket (string) --

          The name of the Amazon S3 bucket from which data is imported.

        • key (string) --

          The key of the Amazon S3 object that contains your data. Each object has a key that is a unique identifier. Each object has exactly one key.

        • versionId (string) --

          The version ID to identify a specific version of the Amazon S3 object that contains your data.

    • errorReportLocation (dict) --

      The Amazon S3 destination where errors associated with the job creation request are saved.

      • bucket (string) --

        The name of the Amazon S3 bucket to which errors associated with the bulk import job are sent.

      • prefix (string) --

        Amazon S3 uses the prefix as a folder name to organize data in the bucket. Each Amazon S3 object has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/). For more information, see Organizing objects using prefixes in the Amazon Simple Storage Service User Guide .

    • jobConfiguration (dict) --

      Contains the configuration information of a job, such as the file format used to save data in Amazon S3.

      • fileFormat (dict) --

        The file format of the data in S3.

        • csv (dict) --

          The file is in .CSV format.

          • columnNames (list) --

            The column names specified in the .csv file.

            • (string) --

        • parquet (dict) --

          The file is in parquet format.

    • jobCreationDate (datetime) --

      The date the job was created, in Unix epoch TIME.

    • jobLastUpdateDate (datetime) --

      The date the job was last updated, in Unix epoch time.

    • adaptiveIngestion (boolean) --

      If set to true, ingest new data into IoT SiteWise storage. Measurements with notifications, metrics and transforms are computed. If set to false, historical data is ingested into IoT SiteWise as is.

    • deleteFilesAfterImport (boolean) --

      If set to true, your data files is deleted from S3, after ingestion into IoT SiteWise storage.

DescribeStorageConfiguration (updated) Link ¶
Changes (response)
{'warmTier': 'ENABLED | DISABLED',
 'warmTierRetentionPeriod': {'numberOfDays': 'integer', 'unlimited': 'boolean'}}

Retrieves information about the storage configuration for IoT SiteWise.

See also: AWS API Documentation

Request Syntax

client.describe_storage_configuration()
rtype

dict

returns

Response Syntax

{
    'storageType': 'SITEWISE_DEFAULT_STORAGE'|'MULTI_LAYER_STORAGE',
    'multiLayerStorage': {
        'customerManagedS3Storage': {
            's3ResourceArn': 'string',
            'roleArn': 'string'
        }
    },
    'disassociatedDataStorage': 'ENABLED'|'DISABLED',
    'retentionPeriod': {
        'numberOfDays': 123,
        'unlimited': True|False
    },
    'configurationStatus': {
        'state': 'ACTIVE'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string'
        }
    },
    'lastUpdateDate': datetime(2015, 1, 1),
    'warmTier': 'ENABLED'|'DISABLED',
    'warmTierRetentionPeriod': {
        'numberOfDays': 123,
        'unlimited': True|False
    }
}

Response Structure

  • (dict) --

    • storageType (string) --

      The storage tier that you specified for your data. The storageType parameter can be one of the following values:

      • SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a service-managed database.

      • MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The cold tier is a customer-managed Amazon S3 bucket.

    • multiLayerStorage (dict) --

      Contains information about the storage destination.

      • customerManagedS3Storage (dict) --

        Contains information about a customer managed Amazon S3 bucket.

        • s3ResourceArn (string) --

          The ARN of the Amazon S3 object. For more information about how to find the ARN for an Amazon S3 object, see Amazon S3 resources in the Amazon Simple Storage Service User Guide .

        • roleArn (string) --

          The ARN of the Identity and Access Management role that allows IoT SiteWise to send data to Amazon S3.

    • disassociatedDataStorage (string) --

      Contains the storage configuration for time series (data streams) that aren't associated with asset properties. The disassociatedDataStorage can be one of the following values:

      • ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties.

      Warning

      After the disassociatedDataStorage is enabled, you can't disable it.

      • DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.

      For more information, see Data streams in the IoT SiteWise User Guide .

    • retentionPeriod (dict) --

      The number of days your data is kept in the hot tier. By default, your data is kept indefinitely in the hot tier.

      • numberOfDays (integer) --

        The number of days that your data is kept.

        Note

        If you specified a value for this parameter, the unlimited parameter must be false .

      • unlimited (boolean) --

        If true, your data is kept indefinitely.

        Note

        If configured to true , you must not specify a value for the numberOfDays parameter.

    • configurationStatus (dict) --

      Contains current status information for the configuration.

      • state (string) --

        The current state of the configuration.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

    • lastUpdateDate (datetime) --

      The date the storage configuration was last updated, in Unix epoch time.

    • warmTier (string) --

      A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered and historical data ingested with the CreaeBulkImportJob API.

    • warmTierRetentionPeriod (dict) --

      Set this period to specify how long your data is stored in the warm tier before it is deleted. You can set this only if cold tier is enabled.

      • numberOfDays (integer) --

        The number of days the data is stored in the warm tier.

      • unlimited (boolean) --

        If set to true, the data is stored indefinitely in the warm tier.

ListAssetModelProperties (updated) Link ¶
Changes (response)
{'assetModelPropertySummaries': {'externalId': 'string',
                                 'path': [{'id': 'string', 'name': 'string'}],
                                 'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                               'name': 'string'}]}}},
                                          'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                  'name': 'string'}]}}}}}}

Retrieves a paginated list of properties associated with an asset model. If you update properties associated with the model before you finish listing all the properties, you need to start all over again.

See also: AWS API Documentation

Request Syntax

client.list_asset_model_properties(
    assetModelId='string',
    nextToken='string',
    maxResults=123,
    filter='ALL'|'BASE'
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model. 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 IoT SiteWise User Guide .

type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request. If not specified, the default value is 50.

type filter

string

param filter

Filters the requested list of asset model properties. You can choose one of the following options:

  • ALL – The list includes all asset model properties for a given asset model ID.

  • BASE – The list includes only base asset model properties for a given asset model ID.

Default: BASE

rtype

dict

returns

Response Syntax

{
    'assetModelPropertySummaries': [
        {
            'id': 'string',
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'assetModelCompositeModelId': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assetModelPropertySummaries (list) --

      A list that summarizes the properties associated with the specified asset model.

      • (dict) --

        Contains a summary of a property associated with a model.

        • id (string) --

          The ID of the property.

        • name (string) --

          The name of the property.

        • dataType (string) --

          The data type of the property.

        • dataTypeSpec (string) --

          The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

        • unit (string) --

          The unit (such as Newtons or RPM ) of the property.

        • type (dict) --

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

          • attribute (dict) --

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

            • defaultValue (string) --

              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 IoT SiteWise User Guide .

          • measurement (dict) --

            Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

            • processingConfig (dict) --

              The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

              • forwardingConfig (dict) --

                The forwarding configuration for the given measurement property.

                • state (string) --

                  The forwarding state for the given property.

          • transform (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • processingConfig (dict) --

              The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

              • computeLocation (string) --

                The compute location for the given transform property.

              • forwardingConfig (dict) --

                The forwarding configuration for a given property.

                • state (string) --

                  The forwarding state for the given property.

          • metric (dict) --

            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.

            • expression (string) --

              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 IoT SiteWise User Guide .

            • variables (list) --

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) --

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

                • value (dict) --

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • window (dict) --

              The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

              • tumbling (dict) --

                The tumbling time interval window.

                • interval (string) --

                  The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                  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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

                • offset (string) --

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

            • processingConfig (dict) --

              The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

              • computeLocation (string) --

                The compute location for the given metric property.

        • assetModelCompositeModelId (string) --

          The ID of the composite model that contains the asset model property.

        • path (list) --

          The structured path to the property from the root of the asset model.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          The external ID of the property. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

ListAssetModels (updated) Link ¶
Changes (request, response)
Request
{'assetModelTypes': ['ASSET_MODEL | COMPONENT_MODEL']}
Response
{'assetModelSummaries': {'assetModelType': 'ASSET_MODEL | COMPONENT_MODEL',
                         'externalId': 'string'}}

Retrieves a paginated list of summaries of all asset models.

See also: AWS API Documentation

Request Syntax

client.list_asset_models(
    nextToken='string',
    maxResults=123,
    assetModelTypes=[
        'ASSET_MODEL'|'COMPONENT_MODEL',
    ]
)
type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request.

Default: 50

type assetModelTypes

list

param assetModelTypes

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.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'assetModelSummaries': [
        {
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'creationDate': datetime(2015, 1, 1),
            'lastUpdateDate': datetime(2015, 1, 1),
            'status': {
                'state': 'CREATING'|'ACTIVE'|'UPDATING'|'PROPAGATING'|'DELETING'|'FAILED',
                'error': {
                    'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
                    'message': 'string',
                    'details': [
                        {
                            'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                            'message': 'string'
                        },
                    ]
                }
            },
            'assetModelType': 'ASSET_MODEL'|'COMPONENT_MODEL',
            'externalId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assetModelSummaries (list) --

      A list that summarizes each asset model.

      • (dict) --

        Contains a summary of an asset model.

        • id (string) --

          The ID of the asset model (used with IoT SiteWise API operations).

        • arn (string) --

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

          arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}

        • name (string) --

          The name of the asset model.

        • description (string) --

          The asset model description.

        • creationDate (datetime) --

          The date the asset model was created, in Unix epoch time.

        • lastUpdateDate (datetime) --

          The date the asset model was last updated, in Unix epoch time.

        • status (dict) --

          The current status of the asset model.

          • state (string) --

            The current state of the asset model.

          • error (dict) --

            Contains associated error information, if any.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

            • details (list) --

              A list of detailed errors.

              • (dict) --

                Contains detailed error information.

                • code (string) --

                  The error code.

                • message (string) --

                  The error message.

        • assetModelType (string) --

          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.

        • externalId (string) --

          The external ID of the asset model. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

ListAssetProperties (updated) Link ¶
Changes (response)
{'assetPropertySummaries': {'externalId': 'string',
                            'path': [{'id': 'string', 'name': 'string'}]}}

Retrieves a paginated list of properties associated with an asset. If you update properties associated with the model before you finish listing all the properties, you need to start all over again.

See also: AWS API Documentation

Request Syntax

client.list_asset_properties(
    assetId='string',
    nextToken='string',
    maxResults=123,
    filter='ALL'|'BASE'
)
type assetId

string

param assetId

[REQUIRED]

The ID of the asset. 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 IoT SiteWise User Guide .

type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request. If not specified, the default value is 50.

type filter

string

param filter

Filters the requested list of asset properties. You can choose one of the following options:

  • ALL – The list includes all asset properties for a given asset model ID.

  • BASE – The list includes only base asset properties for a given asset model ID.

Default: BASE

rtype

dict

returns

Response Syntax

{
    'assetPropertySummaries': [
        {
            'id': 'string',
            'alias': 'string',
            'unit': 'string',
            'notification': {
                'topic': 'string',
                'state': 'ENABLED'|'DISABLED'
            },
            'assetCompositeModelId': 'string',
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assetPropertySummaries (list) --

      A list that summarizes the properties associated with the specified asset.

      • (dict) --

        Contains a summary of a property associated with an asset.

        • id (string) --

          The ID of the property.

        • alias (string) --

          The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature ). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide .

        • unit (string) --

          The unit of measure (such as Newtons or RPM) of the asset property.

        • notification (dict) --

          Contains asset property value notification information. When the notification state is enabled, IoT SiteWise publishes property value updates to a unique MQTT topic. For more information, see Interacting with other services in the IoT SiteWise User Guide .

          • topic (string) --

            The MQTT topic to which IoT SiteWise publishes property value update notifications.

          • state (string) --

            The current notification state.

        • assetCompositeModelId (string) --

          The ID of the composite model that contains the asset property.

        • path (list) --

          The structured path to the property from the root of the asset.

          • (dict) --

            Represents one level between a property and the root of the asset.

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          The external ID of the property. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

ListAssets (updated) Link ¶
Changes (response)
{'assetSummaries': {'externalId': 'string',
                    'hierarchies': {'externalId': 'string'}}}

Retrieves a paginated list of asset summaries.

You can use this operation to do the following:

  • List assets based on a specific asset model.

  • List top-level assets.

You can't use this operation to list all assets. To retrieve summaries for all of your assets, use ListAssetModels to get all of your asset model IDs. Then, use ListAssets to get all assets for each asset model.

See also: AWS API Documentation

Request Syntax

client.list_assets(
    nextToken='string',
    maxResults=123,
    assetModelId='string',
    filter='ALL'|'TOP_LEVEL'
)
type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request.

Default: 50

type assetModelId

string

param assetModelId

The ID of the asset model by which to filter the list of assets. This parameter is required if you choose ALL for filter . 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 IoT SiteWise User Guide .

type filter

string

param filter

The filter for the requested list of assets. Choose one of the following options:

  • ALL – The list includes all assets for a given asset model ID. The assetModelId parameter is required if you filter by ALL .

  • TOP_LEVEL – The list includes only top-level assets in the asset hierarchy tree.

Default: ALL

rtype

dict

returns

Response Syntax

{
    'assetSummaries': [
        {
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'assetModelId': 'string',
            'creationDate': datetime(2015, 1, 1),
            'lastUpdateDate': datetime(2015, 1, 1),
            'status': {
                'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
                'error': {
                    'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
                    'message': 'string',
                    'details': [
                        {
                            'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                            'message': 'string'
                        },
                    ]
                }
            },
            'hierarchies': [
                {
                    'id': 'string',
                    'name': 'string',
                    'externalId': 'string'
                },
            ],
            'description': 'string',
            'externalId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assetSummaries (list) --

      A list that summarizes each asset.

      • (dict) --

        Contains a summary of an asset.

        • id (string) --

          The ID of the asset, in UUID format.

        • arn (string) --

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

          arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}

        • name (string) --

          The name of the asset.

        • assetModelId (string) --

          The ID of the asset model used to create this asset.

        • creationDate (datetime) --

          The date the asset was created, in Unix epoch time.

        • lastUpdateDate (datetime) --

          The date the asset was last updated, in Unix epoch time.

        • status (dict) --

          The current status of the asset.

          • state (string) --

            The current status of the asset.

          • error (dict) --

            Contains associated error information, if any.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

            • details (list) --

              A list of detailed errors.

              • (dict) --

                Contains detailed error information.

                • code (string) --

                  The error code.

                • message (string) --

                  The error message.

        • hierarchies (list) --

          A list of asset hierarchies that each contain a hierarchyId . A hierarchy specifies allowed parent/child asset relationships.

          • (dict) --

            Describes an asset hierarchy that contains a hierarchy's name and ID.

            • id (string) --

              The ID of the hierarchy. This ID is a hierarchyId .

            • name (string) --

              The hierarchy name provided in the CreateAssetModel or UpdateAssetModel API operation.

            • externalId (string) --

              The external ID of the hierarchy, if it has one. When you update an asset hierarchy, you may assign an external ID if it doesn't already have one. You can't change the external ID of an asset hierarchy that already has one. For more information, see Using external IDs in the IoT SiteWise User Guide .

        • description (string) --

          A description for the asset.

        • externalId (string) --

          The external ID of the asset. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

ListAssociatedAssets (updated) Link ¶
Changes (response)
{'assetSummaries': {'externalId': 'string',
                    'hierarchies': {'externalId': 'string'}}}

Retrieves a paginated list of associated assets.

You can use this operation to do the following:

  • List child assets associated to a parent asset by a hierarchy that you specify.

  • List an asset's parent asset.

See also: AWS API Documentation

Request Syntax

client.list_associated_assets(
    assetId='string',
    hierarchyId='string',
    traversalDirection='PARENT'|'CHILD',
    nextToken='string',
    maxResults=123
)
type assetId

string

param assetId

[REQUIRED]

The ID of the asset to query. 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 IoT SiteWise User Guide .

type hierarchyId

string

param hierarchyId

The ID of the hierarchy by which child assets are associated to the asset. (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 IoT SiteWise User Guide .) To find a hierarchy ID, use the DescribeAsset or DescribeAssetModel operations. This parameter is required if you choose CHILD for traversalDirection .

For more information, see Asset hierarchies in the IoT SiteWise User Guide .

type traversalDirection

string

param traversalDirection

The direction to list associated assets. Choose one of the following options:

  • CHILD – The list includes all child assets associated to the asset. The hierarchyId parameter is required if you choose CHILD .

  • PARENT – The list includes the asset's parent asset.

Default: CHILD

type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type maxResults

integer

param maxResults

The maximum number of results to return for each paginated request.

Default: 50

rtype

dict

returns

Response Syntax

{
    'assetSummaries': [
        {
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'assetModelId': 'string',
            'creationDate': datetime(2015, 1, 1),
            'lastUpdateDate': datetime(2015, 1, 1),
            'status': {
                'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
                'error': {
                    'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
                    'message': 'string',
                    'details': [
                        {
                            'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                            'message': 'string'
                        },
                    ]
                }
            },
            'hierarchies': [
                {
                    'id': 'string',
                    'name': 'string',
                    'externalId': 'string'
                },
            ],
            'description': 'string',
            'externalId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assetSummaries (list) --

      A list that summarizes the associated assets.

      • (dict) --

        Contains a summary of an associated asset.

        • id (string) --

          The ID of the asset, in UUID format.

        • arn (string) --

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

          arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}

        • name (string) --

          The name of the asset.

        • assetModelId (string) --

          The ID of the asset model used to create the asset.

        • creationDate (datetime) --

          The date the asset was created, in Unix epoch time.

        • lastUpdateDate (datetime) --

          The date the asset was last updated, in Unix epoch time.

        • status (dict) --

          The current status of the asset.

          • state (string) --

            The current status of the asset.

          • error (dict) --

            Contains associated error information, if any.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

            • details (list) --

              A list of detailed errors.

              • (dict) --

                Contains detailed error information.

                • code (string) --

                  The error code.

                • message (string) --

                  The error message.

        • hierarchies (list) --

          A list of asset hierarchies that each contain a hierarchyId . A hierarchy specifies allowed parent/child asset relationships.

          • (dict) --

            Describes an asset hierarchy that contains a hierarchy's name and ID.

            • id (string) --

              The ID of the hierarchy. This ID is a hierarchyId .

            • name (string) --

              The hierarchy name provided in the CreateAssetModel or UpdateAssetModel API operation.

            • externalId (string) --

              The external ID of the hierarchy, if it has one. When you update an asset hierarchy, you may assign an external ID if it doesn't already have one. You can't change the external ID of an asset hierarchy that already has one. For more information, see Using external IDs in the IoT SiteWise User Guide .

        • description (string) --

          A description for the asset.

        • externalId (string) --

          The external ID of the asset. For more information, see Using external IDs in the IoT SiteWise User Guide .

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

PutStorageConfiguration (updated) Link ¶
Changes (both)
{'warmTier': 'ENABLED | DISABLED',
 'warmTierRetentionPeriod': {'numberOfDays': 'integer', 'unlimited': 'boolean'}}

Configures storage settings for IoT SiteWise.

See also: AWS API Documentation

Request Syntax

client.put_storage_configuration(
    storageType='SITEWISE_DEFAULT_STORAGE'|'MULTI_LAYER_STORAGE',
    multiLayerStorage={
        'customerManagedS3Storage': {
            's3ResourceArn': 'string',
            'roleArn': 'string'
        }
    },
    disassociatedDataStorage='ENABLED'|'DISABLED',
    retentionPeriod={
        'numberOfDays': 123,
        'unlimited': True|False
    },
    warmTier='ENABLED'|'DISABLED',
    warmTierRetentionPeriod={
        'numberOfDays': 123,
        'unlimited': True|False
    }
)
type storageType

string

param storageType

[REQUIRED]

The storage tier that you specified for your data. The storageType parameter can be one of the following values:

  • SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a service-managed database.

  • MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The cold tier is a customer-managed Amazon S3 bucket.

type multiLayerStorage

dict

param multiLayerStorage

Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage type, you must specify a MultiLayerStorage object.

  • customerManagedS3Storage (dict) -- [REQUIRED]

    Contains information about a customer managed Amazon S3 bucket.

    • s3ResourceArn (string) -- [REQUIRED]

      The ARN of the Amazon S3 object. For more information about how to find the ARN for an Amazon S3 object, see Amazon S3 resources in the Amazon Simple Storage Service User Guide .

    • roleArn (string) -- [REQUIRED]

      The ARN of the Identity and Access Management role that allows IoT SiteWise to send data to Amazon S3.

type disassociatedDataStorage

string

param disassociatedDataStorage

Contains the storage configuration for time series (data streams) that aren't associated with asset properties. The disassociatedDataStorage can be one of the following values:

  • ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties.

Warning

After the disassociatedDataStorage is enabled, you can't disable it.

  • DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.

For more information, see Data streams in the IoT SiteWise User Guide .

type retentionPeriod

dict

param retentionPeriod

The number of days your data is kept in the hot tier. By default, your data is kept indefinitely in the hot tier.

  • numberOfDays (integer) --

    The number of days that your data is kept.

    Note

    If you specified a value for this parameter, the unlimited parameter must be false .

  • unlimited (boolean) --

    If true, your data is kept indefinitely.

    Note

    If configured to true , you must not specify a value for the numberOfDays parameter.

type warmTier

string

param warmTier

A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered and historical data ingested with the CreaeBulkImportJob API.

type warmTierRetentionPeriod

dict

param warmTierRetentionPeriod

Set this period to specify how long your data is stored in the warm tier before it is deleted. You can set this only if cold tier is enabled.

  • numberOfDays (integer) --

    The number of days the data is stored in the warm tier.

  • unlimited (boolean) --

    If set to true, the data is stored indefinitely in the warm tier.

rtype

dict

returns

Response Syntax

{
    'storageType': 'SITEWISE_DEFAULT_STORAGE'|'MULTI_LAYER_STORAGE',
    'multiLayerStorage': {
        'customerManagedS3Storage': {
            's3ResourceArn': 'string',
            'roleArn': 'string'
        }
    },
    'disassociatedDataStorage': 'ENABLED'|'DISABLED',
    'retentionPeriod': {
        'numberOfDays': 123,
        'unlimited': True|False
    },
    'configurationStatus': {
        'state': 'ACTIVE'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string'
        }
    },
    'warmTier': 'ENABLED'|'DISABLED',
    'warmTierRetentionPeriod': {
        'numberOfDays': 123,
        'unlimited': True|False
    }
}

Response Structure

  • (dict) --

    • storageType (string) --

      The storage tier that you specified for your data. The storageType parameter can be one of the following values:

      • SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a service-managed database.

      • MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The cold tier is a customer-managed Amazon S3 bucket.

    • multiLayerStorage (dict) --

      Contains information about the storage destination.

      • customerManagedS3Storage (dict) --

        Contains information about a customer managed Amazon S3 bucket.

        • s3ResourceArn (string) --

          The ARN of the Amazon S3 object. For more information about how to find the ARN for an Amazon S3 object, see Amazon S3 resources in the Amazon Simple Storage Service User Guide .

        • roleArn (string) --

          The ARN of the Identity and Access Management role that allows IoT SiteWise to send data to Amazon S3.

    • disassociatedDataStorage (string) --

      Contains the storage configuration for time series (data streams) that aren't associated with asset properties. The disassociatedDataStorage can be one of the following values:

      • ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties.

      Warning

      After the disassociatedDataStorage is enabled, you can't disable it.

      • DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.

      For more information, see Data streams in the IoT SiteWise User Guide .

    • retentionPeriod (dict) --

      The number of days your data is kept in the hot tier. By default, your data is kept indefinitely in the hot tier.

      • numberOfDays (integer) --

        The number of days that your data is kept.

        Note

        If you specified a value for this parameter, the unlimited parameter must be false .

      • unlimited (boolean) --

        If true, your data is kept indefinitely.

        Note

        If configured to true , you must not specify a value for the numberOfDays parameter.

    • configurationStatus (dict) --

      Contains current status information for the configuration.

      • state (string) --

        The current state of the configuration.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

    • warmTier (string) --

      A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered and historical data ingested with the CreaeBulkImportJob API.

    • warmTierRetentionPeriod (dict) --

      Set this period to specify how long your data is stored in the warm tier before it is deleted. You can set this only if cold tier is enabled.

      • numberOfDays (integer) --

        The number of days the data is stored in the warm tier.

      • unlimited (boolean) --

        If set to true, the data is stored indefinitely in the warm tier.

UpdateAsset (updated) Link ¶
Changes (request)
{'assetExternalId': 'string'}

Updates an asset's name. For more information, see Updating assets and models in the IoT SiteWise User Guide .

See also: AWS API Documentation

Request Syntax

client.update_asset(
    assetId='string',
    assetName='string',
    clientToken='string',
    assetDescription='string',
    assetExternalId='string'
)
type assetId

string

param assetId

[REQUIRED]

The ID of the asset to update. 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 IoT SiteWise User Guide .

type assetName

string

param assetName

[REQUIRED]

A friendly name for the asset.

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

This field is autopopulated if not provided.

type assetDescription

string

param assetDescription

A description for the asset.

type assetExternalId

string

param assetExternalId

An external ID to assign to the asset. The asset must not already have an external ID. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • assetStatus (dict) --

      The status of the asset, which contains a state ( UPDATING after successfully calling this operation) and any error message.

      • state (string) --

        The current status of the asset.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

UpdateAssetModel (updated) Link ¶
Changes (request)
{'assetModelCompositeModels': {'externalId': 'string',
                               'properties': {'externalId': 'string',
                                              'path': [{'id': 'string',
                                                        'name': 'string'}],
                                              'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                            'name': 'string'}]}}},
                                                       'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                                               'name': 'string'}]}}}}}},
 'assetModelExternalId': 'string',
 'assetModelHierarchies': {'externalId': 'string'},
 'assetModelProperties': {'externalId': 'string',
                          'path': [{'id': 'string', 'name': 'string'}],
                          'type': {'metric': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                        'name': 'string'}]}}},
                                   'transform': {'variables': {'value': {'propertyPath': [{'id': 'string',
                                                                                           'name': 'string'}]}}}}}}

Updates an asset model and all of the assets that were created from the model. Each asset created from the model inherits the updated asset model's property and hierarchy definitions. For more information, see Updating assets and models in the IoT SiteWise User Guide .

Warning

This operation overwrites the existing model with the provided model. To avoid deleting your asset model's properties or hierarchies, you must include their IDs and definitions in the updated asset model payload. For more information, see DescribeAssetModel.

If you remove a property from an asset model, IoT SiteWise deletes all previous data for that property. If you remove a hierarchy definition from an asset model, IoT SiteWise disassociates every asset associated with that hierarchy. You can't change the type or data type of an existing property.

See also: AWS API Documentation

Request Syntax

client.update_asset_model(
    assetModelId='string',
    assetModelName='string',
    assetModelDescription='string',
    assetModelProperties=[
        {
            'id': 'string',
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string',
            'type': {
                'attribute': {
                    'defaultValue': 'string'
                },
                'measurement': {
                    'processingConfig': {
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'transform': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD',
                        'forwardingConfig': {
                            'state': 'DISABLED'|'ENABLED'
                        }
                    }
                },
                'metric': {
                    'expression': 'string',
                    'variables': [
                        {
                            'name': 'string',
                            'value': {
                                'propertyId': 'string',
                                'hierarchyId': 'string',
                                'propertyPath': [
                                    {
                                        'id': 'string',
                                        'name': 'string'
                                    },
                                ]
                            }
                        },
                    ],
                    'window': {
                        'tumbling': {
                            'interval': 'string',
                            'offset': 'string'
                        }
                    },
                    'processingConfig': {
                        'computeLocation': 'EDGE'|'CLOUD'
                    }
                }
            },
            'path': [
                {
                    'id': 'string',
                    'name': 'string'
                },
            ],
            'externalId': 'string'
        },
    ],
    assetModelHierarchies=[
        {
            'id': 'string',
            'name': 'string',
            'childAssetModelId': 'string',
            'externalId': 'string'
        },
    ],
    assetModelCompositeModels=[
        {
            'name': 'string',
            'description': 'string',
            'type': 'string',
            'properties': [
                {
                    'id': 'string',
                    'name': 'string',
                    'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
                    'dataTypeSpec': 'string',
                    'unit': 'string',
                    'type': {
                        'attribute': {
                            'defaultValue': 'string'
                        },
                        'measurement': {
                            'processingConfig': {
                                'forwardingConfig': {
                                    'state': 'DISABLED'|'ENABLED'
                                }
                            }
                        },
                        'transform': {
                            'expression': 'string',
                            'variables': [
                                {
                                    'name': 'string',
                                    'value': {
                                        'propertyId': 'string',
                                        'hierarchyId': 'string',
                                        'propertyPath': [
                                            {
                                                'id': 'string',
                                                'name': 'string'
                                            },
                                        ]
                                    }
                                },
                            ],
                            'processingConfig': {
                                'computeLocation': 'EDGE'|'CLOUD',
                                'forwardingConfig': {
                                    'state': 'DISABLED'|'ENABLED'
                                }
                            }
                        },
                        'metric': {
                            'expression': 'string',
                            'variables': [
                                {
                                    'name': 'string',
                                    'value': {
                                        'propertyId': 'string',
                                        'hierarchyId': 'string',
                                        'propertyPath': [
                                            {
                                                'id': 'string',
                                                'name': 'string'
                                            },
                                        ]
                                    }
                                },
                            ],
                            'window': {
                                'tumbling': {
                                    'interval': 'string',
                                    'offset': 'string'
                                }
                            },
                            'processingConfig': {
                                'computeLocation': 'EDGE'|'CLOUD'
                            }
                        }
                    },
                    'path': [
                        {
                            'id': 'string',
                            'name': 'string'
                        },
                    ],
                    'externalId': 'string'
                },
            ],
            'id': 'string',
            'externalId': 'string'
        },
    ],
    clientToken='string',
    assetModelExternalId='string'
)
type assetModelId

string

param assetModelId

[REQUIRED]

The ID of the asset model to update. 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 IoT SiteWise User Guide .

type assetModelName

string

param assetModelName

[REQUIRED]

A unique, friendly name for the asset model.

type assetModelDescription

string

param assetModelDescription

A description for the asset model.

type assetModelProperties

list

param assetModelProperties

The updated property definitions of the asset model. For more information, see Asset properties in the IoT SiteWise User Guide .

You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide .

  • (dict) --

    Contains information about an asset model property.

    • id (string) --

      The ID of the asset model property.

      • If you are callling UpdateAssetModel to create a new property: You can specify its ID here, if desired. 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 property: 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 IoT SiteWise User Guide .

    • name (string) -- [REQUIRED]

      The name of the asset model property.

    • dataType (string) -- [REQUIRED]

      The data type of the asset model property.

    • dataTypeSpec (string) --

      The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

    • unit (string) --

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

    • type (dict) -- [REQUIRED]

      The property type (see PropertyType ).

      • attribute (dict) --

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

        • defaultValue (string) --

          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 IoT SiteWise User Guide .

      • measurement (dict) --

        Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

        • processingConfig (dict) --

          The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

          • forwardingConfig (dict) -- [REQUIRED]

            The forwarding configuration for the given measurement property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • transform (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • processingConfig (dict) --

          The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given transform property.

          • forwardingConfig (dict) --

            The forwarding configuration for a given property.

            • state (string) -- [REQUIRED]

              The forwarding state for the given property.

      • metric (dict) --

        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.

        • expression (string) -- [REQUIRED]

          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 IoT SiteWise User Guide .

        • variables (list) -- [REQUIRED]

          The list of variables used in the expression.

          • (dict) --

            Contains expression variable information.

            • name (string) -- [REQUIRED]

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

            • value (dict) -- [REQUIRED]

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

              • propertyId (string) --

                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 IoT SiteWise User Guide .

              • hierarchyId (string) --

                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 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 IoT SiteWise User Guide .

              • propertyPath (list) --

                The path of the property.

                • (dict) --

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

                  • id (string) --

                    The ID of the path segment.

                  • name (string) --

                    The name of the path segment.

        • window (dict) -- [REQUIRED]

          The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

          • tumbling (dict) --

            The tumbling time interval window.

            • interval (string) -- [REQUIRED]

              The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

              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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

            • offset (string) --

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

        • processingConfig (dict) --

          The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

          • computeLocation (string) -- [REQUIRED]

            The compute location for the given metric property.

    • path (list) --

      The structured path to the property from the root of the asset model.

      • (dict) --

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

        • id (string) --

          The ID of the path segment.

        • name (string) --

          The name of the path segment.

    • externalId (string) --

      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 IoT SiteWise User Guide .

type assetModelHierarchies

list

param assetModelHierarchies

The updated 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 IoT SiteWise User Guide .

You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise User Guide .

  • (dict) --

    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.

    • id (string) --

      The ID of the asset model hierarchy. This ID is a hierarchyId .

      • If you are callling UpdateAssetModel to create a new hierarchy: You can specify its ID here, if desired. 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 IoT SiteWise User Guide .

    • name (string) -- [REQUIRED]

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

    • childAssetModelId (string) -- [REQUIRED]

      The ID of the asset model, in UUID format. All assets in this hierarchy must be instances of the childAssetModelId asset model. 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 IoT SiteWise User Guide .

    • externalId (string) --

      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 IoT SiteWise User Guide .

type assetModelCompositeModels

list

param assetModelCompositeModels

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.

Note

When creating custom composite models, you need to use CreateAssetModelCompositeModel. For more information, see <LINK>.

  • (dict) --

    Contains information about a composite model in an asset model. This object contains the asset property definitions that you define in the composite model.

    • name (string) -- [REQUIRED]

      The name of the composite model.

    • description (string) --

      The description of the composite model.

    • type (string) -- [REQUIRED]

      The type of the composite model. For alarm composite models, this type is AWS/ALARM .

    • properties (list) --

      The asset property definitions for this composite model.

      • (dict) --

        Contains information about an asset model property.

        • id (string) --

          The ID of the asset model property.

          • If you are callling UpdateAssetModel to create a new property: You can specify its ID here, if desired. 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 property: 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 IoT SiteWise User Guide .

        • name (string) -- [REQUIRED]

          The name of the asset model property.

        • dataType (string) -- [REQUIRED]

          The data type of the asset model property.

        • dataTypeSpec (string) --

          The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

        • unit (string) --

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

        • type (dict) -- [REQUIRED]

          The property type (see PropertyType ).

          • attribute (dict) --

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

            • defaultValue (string) --

              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 IoT SiteWise User Guide .

          • measurement (dict) --

            Specifies an asset measurement property. A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped power values.

            • processingConfig (dict) --

              The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.

              • forwardingConfig (dict) -- [REQUIRED]

                The forwarding configuration for the given measurement property.

                • state (string) -- [REQUIRED]

                  The forwarding state for the given property.

          • transform (dict) --

            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.

            • expression (string) -- [REQUIRED]

              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 IoT SiteWise User Guide .

            • variables (list) -- [REQUIRED]

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) -- [REQUIRED]

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

                • value (dict) -- [REQUIRED]

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • processingConfig (dict) --

              The processing configuration for the given transform property. You can configure transforms to be kept at the edge or forwarded to the Amazon Web Services Cloud. You can also configure transforms to be computed at the edge or in the cloud.

              • computeLocation (string) -- [REQUIRED]

                The compute location for the given transform property.

              • forwardingConfig (dict) --

                The forwarding configuration for a given property.

                • state (string) -- [REQUIRED]

                  The forwarding state for the given property.

          • metric (dict) --

            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.

            • expression (string) -- [REQUIRED]

              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 IoT SiteWise User Guide .

            • variables (list) -- [REQUIRED]

              The list of variables used in the expression.

              • (dict) --

                Contains expression variable information.

                • name (string) -- [REQUIRED]

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

                • value (dict) -- [REQUIRED]

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

                  • propertyId (string) --

                    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 IoT SiteWise User Guide .

                  • hierarchyId (string) --

                    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 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 IoT SiteWise User Guide .

                  • propertyPath (list) --

                    The path of the property.

                    • (dict) --

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

                      • id (string) --

                        The ID of the path segment.

                      • name (string) --

                        The name of the path segment.

            • window (dict) -- [REQUIRED]

              The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise computes one data point per window .

              • tumbling (dict) --

                The tumbling time interval window.

                • interval (string) -- [REQUIRED]

                  The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

                  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 IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.

                • offset (string) --

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

            • processingConfig (dict) --

              The processing configuration for the given metric property. You can configure metrics to be computed at the edge or in the Amazon Web Services Cloud. By default, metrics are forwarded to the cloud.

              • computeLocation (string) -- [REQUIRED]

                The compute location for the given metric property.

        • path (list) --

          The structured path to the property from the root of the asset model.

          • (dict) --

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

            • id (string) --

              The ID of the path segment.

            • name (string) --

              The name of the path segment.

        • externalId (string) --

          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 IoT SiteWise User Guide .

    • id (string) --

      The ID of the asset model composite model.

    • externalId (string) --

      The external ID of the asset model composite model. For more information, see Using external IDs in the IoT SiteWise User Guide .

type clientToken

string

param clientToken

A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

This field is autopopulated if not provided.

type assetModelExternalId

string

param assetModelExternalId

An external ID to assign to the asset model. The asset model must not already have an external ID. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide .

rtype

dict

returns

Response Syntax

{
    'assetModelStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'PROPAGATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • assetModelStatus (dict) --

      The status of the asset model, which contains a state ( UPDATING after successfully calling this operation) and any error message.

      • state (string) --

        The current state of the asset model.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.