AWS IoT SiteWise

2025/01/21 - AWS IoT SiteWise - 8 updated api methods

Changes  AWS IoT SiteWise now supports ingestion and querying of Null (all data types) and NaN (double type) values of bad or uncertain data quality. New partial error handling prevents data loss during ingestion. Enabled by default for new customers; existing customers can opt-in.

BatchGetAssetPropertyValue (updated) Link ¶
Changes (response)
{'successEntries': {'assetPropertyValue': {'value': {'nullValue': {'valueType': 'D '
                                                                                '| '
                                                                                'B '
                                                                                '| '
                                                                                'S '
                                                                                '| '
                                                                                'I '
                                                                                '| '
                                                                                'U'}}}}}

Gets the current value for one or more asset properties. For more information, see Querying current values in the IoT SiteWise User Guide.

See also: AWS API Documentation

Request Syntax

client.batch_get_asset_property_value(
    entries=[
        {
            'entryId': 'string',
            'assetId': 'string',
            'propertyId': 'string',
            'propertyAlias': 'string'
        },
    ],
    nextToken='string'
)
type entries:

list

param entries:

[REQUIRED]

The list of asset property value entries for the batch get request. You can specify up to 128 entries per request.

  • (dict) --

    Contains information for an asset property value entry that is associated with the BatchGetAssetPropertyValue API.

    To identify an asset property, you must specify one of the following:

    • The assetId and propertyId of an asset property.

    • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

    • entryId (string) -- [REQUIRED]

      The ID of the entry.

    • assetId (string) --

      The ID of the asset in which the asset property was created.

    • propertyId (string) --

      The ID of the asset property, in UUID format.

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

type nextToken:

string

param nextToken:

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

rtype:

dict

returns:

Response Syntax

{
    'errorEntries': [
        {
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'AccessDeniedException',
            'errorMessage': 'string',
            'entryId': 'string'
        },
    ],
    'successEntries': [
        {
            'entryId': 'string',
            'assetPropertyValue': {
                'value': {
                    'stringValue': 'string',
                    'integerValue': 123,
                    'doubleValue': 123.0,
                    'booleanValue': True|False,
                    'nullValue': {
                        'valueType': 'D'|'B'|'S'|'I'|'U'
                    }
                },
                'timestamp': {
                    'timeInSeconds': 123,
                    'offsetInNanos': 123
                },
                'quality': 'GOOD'|'BAD'|'UNCERTAIN'
            }
        },
    ],
    'skippedEntries': [
        {
            'entryId': 'string',
            'completionStatus': 'SUCCESS'|'ERROR',
            'errorInfo': {
                'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'AccessDeniedException',
                'errorTimestamp': datetime(2015, 1, 1)
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • errorEntries (list) --

      A list of the errors (if any) associated with the batch request. Each error entry contains the entryId of the entry that failed.

      • (dict) --

        Contains error information for an asset property value entry that is associated with the BatchGetAssetPropertyValue API.

        • errorCode (string) --

          The error code.

        • errorMessage (string) --

          The associated error message.

        • entryId (string) --

          The ID of the entry.

    • successEntries (list) --

      A list of entries that were processed successfully by this batch request. Each success entry contains the entryId of the entry that succeeded and the latest query result.

      • (dict) --

        Contains success information for an entry that is associated with the BatchGetAssetPropertyValue API.

        • entryId (string) --

          The ID of the entry.

        • assetPropertyValue (dict) --

          Contains asset property value information.

          • value (dict) --

            The value of the asset property (see Variant).

            • stringValue (string) --

              Asset property data of type string (sequence of characters). The allowed pattern: "^$|[^u0000-u001Fu007F]+". The max length is 1024.

            • integerValue (integer) --

              Asset property data of type integer (whole number).

            • doubleValue (float) --

              Asset property data of type double (floating point number). The min value is -10^10. The max value is 10^10. Double.NaN is allowed.

            • booleanValue (boolean) --

              Asset property data of type Boolean (true or false).

            • nullValue (dict) --

              The type of null asset property data with BAD and UNCERTAIN qualities.

              • valueType (string) --

                The type of null asset property data.

          • timestamp (dict) --

            The timestamp of the asset property value.

            • timeInSeconds (integer) --

              The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

            • offsetInNanos (integer) --

              The nanosecond offset from timeInSeconds.

          • quality (string) --

            The quality of the asset property value.

    • skippedEntries (list) --

      A list of entries that were not processed by this batch request. because these entries had been completely processed by previous paginated requests. Each skipped entry contains the entryId of the entry that skipped.

      • (dict) --

        Contains information for an entry that has been processed by the previous BatchGetAssetPropertyValue request.

        • entryId (string) --

          The ID of the entry.

        • completionStatus (string) --

          The completion status of each entry that is associated with the BatchGetAssetPropertyValue request.

        • errorInfo (dict) --

          The error information, such as the error code and the timestamp.

          • errorCode (string) --

            The error code.

          • errorTimestamp (datetime) --

            The date the error occurred, in Unix epoch time.

    • nextToken (string) --

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

BatchGetAssetPropertyValueHistory (updated) Link ¶
Changes (response)
{'successEntries': {'assetPropertyValueHistory': {'value': {'nullValue': {'valueType': 'D '
                                                                                       '| '
                                                                                       'B '
                                                                                       '| '
                                                                                       'S '
                                                                                       '| '
                                                                                       'I '
                                                                                       '| '
                                                                                       'U'}}}}}

Gets the historical values for one or more asset properties. For more information, see Querying historical values in the IoT SiteWise User Guide.

See also: AWS API Documentation

Request Syntax

client.batch_get_asset_property_value_history(
    entries=[
        {
            'entryId': 'string',
            'assetId': 'string',
            'propertyId': 'string',
            'propertyAlias': 'string',
            'startDate': datetime(2015, 1, 1),
            'endDate': datetime(2015, 1, 1),
            'qualities': [
                'GOOD'|'BAD'|'UNCERTAIN',
            ],
            'timeOrdering': 'ASCENDING'|'DESCENDING'
        },
    ],
    nextToken='string',
    maxResults=123
)
type entries:

list

param entries:

[REQUIRED]

The list of asset property historical value entries for the batch get request. You can specify up to 16 entries per request.

  • (dict) --

    Contains information for an asset property historical value entry that is associated with the BatchGetAssetPropertyValueHistory API.

    To identify an asset property, you must specify one of the following:

    • The assetId and propertyId of an asset property.

    • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

    • entryId (string) -- [REQUIRED]

      The ID of the entry.

    • assetId (string) --

      The ID of the asset in which the asset property was created.

    • propertyId (string) --

      The ID of the asset property, in UUID format.

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

    • startDate (datetime) --

      The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time.

    • endDate (datetime) --

      The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time.

    • qualities (list) --

      The quality by which to filter asset data.

      • (string) --

    • timeOrdering (string) --

      The chronological sorting order of the requested information.

      Default: ASCENDING

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. A result set is returned in the two cases, whichever occurs first.

  • The size of the result set is equal to 4 MB.

  • The number of data points in the result set is equal to the value of maxResults. The maximum value of maxResults is 20000.

rtype:

dict

returns:

Response Syntax

{
    'errorEntries': [
        {
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'AccessDeniedException',
            'errorMessage': 'string',
            'entryId': 'string'
        },
    ],
    'successEntries': [
        {
            'entryId': 'string',
            'assetPropertyValueHistory': [
                {
                    'value': {
                        'stringValue': 'string',
                        'integerValue': 123,
                        'doubleValue': 123.0,
                        'booleanValue': True|False,
                        'nullValue': {
                            'valueType': 'D'|'B'|'S'|'I'|'U'
                        }
                    },
                    'timestamp': {
                        'timeInSeconds': 123,
                        'offsetInNanos': 123
                    },
                    'quality': 'GOOD'|'BAD'|'UNCERTAIN'
                },
            ]
        },
    ],
    'skippedEntries': [
        {
            'entryId': 'string',
            'completionStatus': 'SUCCESS'|'ERROR',
            'errorInfo': {
                'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'AccessDeniedException',
                'errorTimestamp': datetime(2015, 1, 1)
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • errorEntries (list) --

      A list of the errors (if any) associated with the batch request. Each error entry contains the entryId of the entry that failed.

      • (dict) --

        A list of the errors (if any) associated with the batch request. Each error entry contains the entryId of the entry that failed.

        • errorCode (string) --

          The error code.

        • errorMessage (string) --

          The associated error message.

        • entryId (string) --

          The ID of the entry.

    • successEntries (list) --

      A list of entries that were processed successfully by this batch request. Each success entry contains the entryId of the entry that succeeded and the latest query result.

      • (dict) --

        Contains success information for an entry that is associated with the BatchGetAssetPropertyValueHistory API.

        • entryId (string) --

          The ID of the entry.

        • assetPropertyValueHistory (list) --

          The requested historical values for the specified asset property.

          • (dict) --

            Contains asset property value information.

            • value (dict) --

              The value of the asset property (see Variant).

              • stringValue (string) --

                Asset property data of type string (sequence of characters). The allowed pattern: "^$|[^u0000-u001Fu007F]+". The max length is 1024.

              • integerValue (integer) --

                Asset property data of type integer (whole number).

              • doubleValue (float) --

                Asset property data of type double (floating point number). The min value is -10^10. The max value is 10^10. Double.NaN is allowed.

              • booleanValue (boolean) --

                Asset property data of type Boolean (true or false).

              • nullValue (dict) --

                The type of null asset property data with BAD and UNCERTAIN qualities.

                • valueType (string) --

                  The type of null asset property data.

            • timestamp (dict) --

              The timestamp of the asset property value.

              • timeInSeconds (integer) --

                The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

              • offsetInNanos (integer) --

                The nanosecond offset from timeInSeconds.

            • quality (string) --

              The quality of the asset property value.

    • skippedEntries (list) --

      A list of entries that were not processed by this batch request. because these entries had been completely processed by previous paginated requests. Each skipped entry contains the entryId of the entry that skipped.

      • (dict) --

        Contains information for an entry that has been processed by the previous BatchGetAssetPropertyValueHistory request.

        • entryId (string) --

          The ID of the entry.

        • completionStatus (string) --

          The completion status of each entry that is associated with the BatchGetAssetPropertyValueHistory API.

        • errorInfo (dict) --

          The error information, such as the error code and the timestamp.

          • errorCode (string) --

            The error code.

          • errorTimestamp (datetime) --

            The date the error occurred, in Unix epoch time.

    • nextToken (string) --

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

BatchPutAssetPropertyValue (updated) Link ¶
Changes (request)
{'enablePartialEntryProcessing': 'boolean',
 'entries': {'propertyValues': {'value': {'nullValue': {'valueType': 'D | B | '
                                                                     'S | I | '
                                                                     'U'}}}}}

Sends a list of asset property values to IoT SiteWise. Each value is a timestamp-quality-value (TQV) data point. For more information, see Ingesting data using the API in the IoT SiteWise User Guide.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

IoT SiteWise authorizes access to each BatchPutAssetPropertyValue entry individually. For more information, see BatchPutAssetPropertyValue authorization in the IoT SiteWise User Guide.

See also: AWS API Documentation

Request Syntax

client.batch_put_asset_property_value(
    enablePartialEntryProcessing=True|False,
    entries=[
        {
            'entryId': 'string',
            'assetId': 'string',
            'propertyId': 'string',
            'propertyAlias': 'string',
            'propertyValues': [
                {
                    'value': {
                        'stringValue': 'string',
                        'integerValue': 123,
                        'doubleValue': 123.0,
                        'booleanValue': True|False,
                        'nullValue': {
                            'valueType': 'D'|'B'|'S'|'I'|'U'
                        }
                    },
                    'timestamp': {
                        'timeInSeconds': 123,
                        'offsetInNanos': 123
                    },
                    'quality': 'GOOD'|'BAD'|'UNCERTAIN'
                },
            ]
        },
    ]
)
type enablePartialEntryProcessing:

boolean

param enablePartialEntryProcessing:

This setting enables partial ingestion at entry-level. If set to true, we ingest all TQVs not resulting in an error. If set to false, an invalid TQV fails ingestion of the entire entry that contains it.

type entries:

list

param entries:

[REQUIRED]

The list of asset property value entries for the batch put request. You can specify up to 10 entries per request.

  • (dict) --

    Contains a list of value updates for an asset property in the list of asset entries consumed by the BatchPutAssetPropertyValue API operation.

    • entryId (string) -- [REQUIRED]

      The user specified ID for the entry. You can use this ID to identify which entries failed.

    • assetId (string) --

      The ID of the asset to update.

    • propertyId (string) --

      The ID of the asset property for this entry.

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

    • propertyValues (list) -- [REQUIRED]

      The list of property values to upload. You can specify up to 10 propertyValues array elements.

      • (dict) --

        Contains asset property value information.

        • value (dict) -- [REQUIRED]

          The value of the asset property (see Variant).

          • stringValue (string) --

            Asset property data of type string (sequence of characters). The allowed pattern: "^$|[^u0000-u001Fu007F]+". The max length is 1024.

          • integerValue (integer) --

            Asset property data of type integer (whole number).

          • doubleValue (float) --

            Asset property data of type double (floating point number). The min value is -10^10. The max value is 10^10. Double.NaN is allowed.

          • booleanValue (boolean) --

            Asset property data of type Boolean (true or false).

          • nullValue (dict) --

            The type of null asset property data with BAD and UNCERTAIN qualities.

            • valueType (string) -- [REQUIRED]

              The type of null asset property data.

        • timestamp (dict) -- [REQUIRED]

          The timestamp of the asset property value.

          • timeInSeconds (integer) -- [REQUIRED]

            The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

          • offsetInNanos (integer) --

            The nanosecond offset from timeInSeconds.

        • quality (string) --

          The quality of the asset property value.

rtype:

dict

returns:

Response Syntax

{
    'errorEntries': [
        {
            'entryId': 'string',
            'errors': [
                {
                    'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException'|'LimitExceededException'|'ConflictingOperationException'|'TimestampOutOfRangeException'|'AccessDeniedException',
                    'errorMessage': 'string',
                    'timestamps': [
                        {
                            'timeInSeconds': 123,
                            'offsetInNanos': 123
                        },
                    ]
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • errorEntries (list) --

      A list of the errors (if any) associated with the batch put request. Each error entry contains the entryId of the entry that failed.

      • (dict) --

        Contains error information for asset property value entries that are associated with the BatchPutAssetPropertyValue API.

        • entryId (string) --

          The ID of the failed entry.

        • errors (list) --

          The list of update property value errors.

          • (dict) --

            Contains error information from updating a batch of asset property values.

            • errorCode (string) --

              The error code.

            • errorMessage (string) --

              The associated error message.

            • timestamps (list) --

              A list of timestamps for each error, if any.

              • (dict) --

                Contains a timestamp with optional nanosecond granularity.

                • timeInSeconds (integer) --

                  The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

                • offsetInNanos (integer) --

                  The nanosecond offset from timeInSeconds.

DescribeStorageConfiguration (updated) Link ¶
Changes (response)
{'disallowIngestNullNaN': '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
    },
    'disallowIngestNullNaN': 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.

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

      • unlimited (boolean) --

        If true, your data is kept indefinitely.

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

    • disallowIngestNullNaN (boolean) --

      Describes the configuration for ingesting NULL and NaN data. By default the feature is allowed. The feature is disallowed if the value is true.

GetAssetPropertyValue (updated) Link ¶
Changes (response)
{'propertyValue': {'value': {'nullValue': {'valueType': 'D | B | S | I | U'}}}}

Gets an asset property's current value. For more information, see Querying current values in the IoT SiteWise User Guide.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

See also: AWS API Documentation

Request Syntax

client.get_asset_property_value(
    assetId='string',
    propertyId='string',
    propertyAlias='string'
)
type assetId:

string

param assetId:

The ID of the asset, in UUID format.

type propertyId:

string

param propertyId:

The ID of the asset property, in UUID format.

type propertyAlias:

string

param propertyAlias:

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.

rtype:

dict

returns:

Response Syntax

{
    'propertyValue': {
        'value': {
            'stringValue': 'string',
            'integerValue': 123,
            'doubleValue': 123.0,
            'booleanValue': True|False,
            'nullValue': {
                'valueType': 'D'|'B'|'S'|'I'|'U'
            }
        },
        'timestamp': {
            'timeInSeconds': 123,
            'offsetInNanos': 123
        },
        'quality': 'GOOD'|'BAD'|'UNCERTAIN'
    }
}

Response Structure

  • (dict) --

    • propertyValue (dict) --

      The current asset property value.

      • value (dict) --

        The value of the asset property (see Variant).

        • stringValue (string) --

          Asset property data of type string (sequence of characters). The allowed pattern: "^$|[^u0000-u001Fu007F]+". The max length is 1024.

        • integerValue (integer) --

          Asset property data of type integer (whole number).

        • doubleValue (float) --

          Asset property data of type double (floating point number). The min value is -10^10. The max value is 10^10. Double.NaN is allowed.

        • booleanValue (boolean) --

          Asset property data of type Boolean (true or false).

        • nullValue (dict) --

          The type of null asset property data with BAD and UNCERTAIN qualities.

          • valueType (string) --

            The type of null asset property data.

      • timestamp (dict) --

        The timestamp of the asset property value.

        • timeInSeconds (integer) --

          The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

        • offsetInNanos (integer) --

          The nanosecond offset from timeInSeconds.

      • quality (string) --

        The quality of the asset property value.

GetAssetPropertyValueHistory (updated) Link ¶
Changes (response)
{'assetPropertyValueHistory': {'value': {'nullValue': {'valueType': 'D | B | S '
                                                                    '| I | '
                                                                    'U'}}}}

Gets the history of an asset property's values. For more information, see Querying historical values in the IoT SiteWise User Guide.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

See also: AWS API Documentation

Request Syntax

client.get_asset_property_value_history(
    assetId='string',
    propertyId='string',
    propertyAlias='string',
    startDate=datetime(2015, 1, 1),
    endDate=datetime(2015, 1, 1),
    qualities=[
        'GOOD'|'BAD'|'UNCERTAIN',
    ],
    timeOrdering='ASCENDING'|'DESCENDING',
    nextToken='string',
    maxResults=123
)
type assetId:

string

param assetId:

The ID of the asset, in UUID format.

type propertyId:

string

param propertyId:

The ID of the asset property, in UUID format.

type propertyAlias:

string

param propertyAlias:

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.

type startDate:

datetime

param startDate:

The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time.

type endDate:

datetime

param endDate:

The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time.

type qualities:

list

param qualities:

The quality by which to filter asset data.

  • (string) --

type timeOrdering:

string

param timeOrdering:

The chronological sorting order of the requested information.

Default: ASCENDING

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. A result set is returned in the two cases, whichever occurs first.

  • The size of the result set is equal to 4 MB.

  • The number of data points in the result set is equal to the value of maxResults. The maximum value of maxResults is 20000.

rtype:

dict

returns:

Response Syntax

{
    'assetPropertyValueHistory': [
        {
            'value': {
                'stringValue': 'string',
                'integerValue': 123,
                'doubleValue': 123.0,
                'booleanValue': True|False,
                'nullValue': {
                    'valueType': 'D'|'B'|'S'|'I'|'U'
                }
            },
            'timestamp': {
                'timeInSeconds': 123,
                'offsetInNanos': 123
            },
            'quality': 'GOOD'|'BAD'|'UNCERTAIN'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assetPropertyValueHistory (list) --

      The asset property's value history.

      • (dict) --

        Contains asset property value information.

        • value (dict) --

          The value of the asset property (see Variant).

          • stringValue (string) --

            Asset property data of type string (sequence of characters). The allowed pattern: "^$|[^u0000-u001Fu007F]+". The max length is 1024.

          • integerValue (integer) --

            Asset property data of type integer (whole number).

          • doubleValue (float) --

            Asset property data of type double (floating point number). The min value is -10^10. The max value is 10^10. Double.NaN is allowed.

          • booleanValue (boolean) --

            Asset property data of type Boolean (true or false).

          • nullValue (dict) --

            The type of null asset property data with BAD and UNCERTAIN qualities.

            • valueType (string) --

              The type of null asset property data.

        • timestamp (dict) --

          The timestamp of the asset property value.

          • timeInSeconds (integer) --

            The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

          • offsetInNanos (integer) --

            The nanosecond offset from timeInSeconds.

        • quality (string) --

          The quality of the asset property value.

    • nextToken (string) --

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

GetInterpolatedAssetPropertyValues (updated) Link ¶
Changes (response)
{'interpolatedAssetPropertyValues': {'value': {'nullValue': {'valueType': 'D | '
                                                                          'B | '
                                                                          'S | '
                                                                          'I | '
                                                                          'U'}}}}

Get interpolated values for an asset property for a specified time interval, during a period of time. If your time series is missing data points during the specified time interval, you can use interpolation to estimate the missing data.

For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

See also: AWS API Documentation

Request Syntax

client.get_interpolated_asset_property_values(
    assetId='string',
    propertyId='string',
    propertyAlias='string',
    startTimeInSeconds=123,
    startTimeOffsetInNanos=123,
    endTimeInSeconds=123,
    endTimeOffsetInNanos=123,
    quality='GOOD'|'BAD'|'UNCERTAIN',
    intervalInSeconds=123,
    nextToken='string',
    maxResults=123,
    type='string',
    intervalWindowInSeconds=123
)
type assetId:

string

param assetId:

The ID of the asset, in UUID format.

type propertyId:

string

param propertyId:

The ID of the asset property, in UUID format.

type propertyAlias:

string

param propertyAlias:

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.

type startTimeInSeconds:

integer

param startTimeInSeconds:

[REQUIRED]

The exclusive start of the range from which to interpolate data, expressed in seconds in Unix epoch time.

type startTimeOffsetInNanos:

integer

param startTimeOffsetInNanos:

The nanosecond offset converted from startTimeInSeconds.

type endTimeInSeconds:

integer

param endTimeInSeconds:

[REQUIRED]

The inclusive end of the range from which to interpolate data, expressed in seconds in Unix epoch time.

type endTimeOffsetInNanos:

integer

param endTimeOffsetInNanos:

The nanosecond offset converted from endTimeInSeconds.

type quality:

string

param quality:

[REQUIRED]

The quality of the asset property value. You can use this parameter as a filter to choose only the asset property values that have a specific quality.

type intervalInSeconds:

integer

param intervalInSeconds:

[REQUIRED]

The time interval in seconds over which to interpolate data. Each interval starts when the previous one ends.

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

type type:

string

param type:

[REQUIRED]

The interpolation type.

Valid values: LINEAR_INTERPOLATION | LOCF_INTERPOLATION

  • LINEAR_INTERPOLATION – Estimates missing data using linear interpolation. For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT SiteWise returns the first interpolated value on July 2, 2021, at 9 AM, the second interpolated value on July 3, 2021, at 9 AM, and so on.

  • LOCF_INTERPOLATION – Estimates missing data using last observation carried forward interpolation If no data point is found for an interval, IoT SiteWise returns the last observed data point for the previous interval and carries forward this interpolated value until a new data point is found. For example, you can get the state of an on-off valve every 24 hours over a duration of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT SiteWise returns the last observed data point between July 1, 2021, at 9 AM and July 2, 2021, at 9 AM as the first interpolated value. If a data point isn't found after 9 AM on July 2, 2021, IoT SiteWise uses the same interpolated value for the rest of the days.

type intervalWindowInSeconds:

integer

param intervalWindowInSeconds:

The query interval for the window, in seconds. IoT SiteWise computes each interpolated value by using data points from the timestamp of each interval, minus the window to the timestamp of each interval plus the window. If not specified, the window ranges between the start time minus the interval and the end time plus the interval.

For example, you can get the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. If the interpolation starts on July 1, 2021, at 9 AM with a window of 2 hours, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 2, 2021 to compute the first interpolated value. Next, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 3, 2021 to compute the second interpolated value, and so on.

rtype:

dict

returns:

Response Syntax

{
    'interpolatedAssetPropertyValues': [
        {
            'timestamp': {
                'timeInSeconds': 123,
                'offsetInNanos': 123
            },
            'value': {
                'stringValue': 'string',
                'integerValue': 123,
                'doubleValue': 123.0,
                'booleanValue': True|False,
                'nullValue': {
                    'valueType': 'D'|'B'|'S'|'I'|'U'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • interpolatedAssetPropertyValues (list) --

      The requested interpolated values.

      • (dict) --

        Contains information about an interpolated asset property value.

        • timestamp (dict) --

          Contains a timestamp with optional nanosecond granularity.

          • timeInSeconds (integer) --

            The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

          • offsetInNanos (integer) --

            The nanosecond offset from timeInSeconds.

        • value (dict) --

          Contains an asset property value (of a single type only).

          • stringValue (string) --

            Asset property data of type string (sequence of characters). The allowed pattern: "^$|[^u0000-u001Fu007F]+". The max length is 1024.

          • integerValue (integer) --

            Asset property data of type integer (whole number).

          • doubleValue (float) --

            Asset property data of type double (floating point number). The min value is -10^10. The max value is 10^10. Double.NaN is allowed.

          • booleanValue (boolean) --

            Asset property data of type Boolean (true or false).

          • nullValue (dict) --

            The type of null asset property data with BAD and UNCERTAIN qualities.

            • valueType (string) --

              The type of null asset property data.

    • nextToken (string) --

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

PutStorageConfiguration (updated) Link ¶
Changes (both)
{'disallowIngestNullNaN': '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
    },
    disallowIngestNullNaN=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.

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

  • unlimited (boolean) --

    If true, your data is kept indefinitely.

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.

type disallowIngestNullNaN:

boolean

param disallowIngestNullNaN:

Describes the configuration for ingesting NULL and NaN data. By default the feature is allowed. The feature is disallowed if the value is true.

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
    },
    'disallowIngestNullNaN': 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.

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

      • unlimited (boolean) --

        If true, your data is kept indefinitely.

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

    • disallowIngestNullNaN (boolean) --

      Describes the configuration for ingesting NULL and NaN data. By default the feature is allowed. The feature is disallowed if the value is true.