AWS IoT SiteWise

2021/11/24 - AWS IoT SiteWise - 5 new 2 updated api methods

Changes  AWS IoT SiteWise now accepts data streams that aren't associated with any asset properties. You can organize data by updating data stream associations.

AssociateTimeSeriesToAssetProperty (new) Link ¶

Associates a time series (data stream) with an asset property.

See also: AWS API Documentation

Request Syntax

client.associate_time_series_to_asset_property(
    alias='string',
    assetId='string',
    propertyId='string',
    clientToken='string'
)
type alias

string

param alias

[REQUIRED]

The alias that identifies the time series.

type assetId

string

param assetId

[REQUIRED]

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

type propertyId

string

param propertyId

[REQUIRED]

The ID of the asset property.

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.

returns

None

DeleteTimeSeries (new) Link ¶

Deletes a time series (data stream). If you delete a time series that's associated with an asset property, the asset property still exists, but the time series will no longer be associated with this asset property.

To identify a time series, do one of the following:

  • If the time series isn't associated with an asset property, specify the alias of the time series.

  • If the time series is associated with an asset property, specify one of the following:

    • The alias of the time series.

    • The assetId and propertyId that identifies the asset property.

See also: AWS API Documentation

Request Syntax

client.delete_time_series(
    alias='string',
    assetId='string',
    propertyId='string',
    clientToken='string'
)
type alias

string

param alias

The alias that identifies the time series.

type assetId

string

param assetId

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

type propertyId

string

param propertyId

The ID of the asset property.

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.

returns

None

DescribeTimeSeries (new) Link ¶

Retrieves information about a time series (data stream).

To identify a time series, do one of the following:

  • If the time series isn't associated with an asset property, specify the alias of the time series.

  • If the time series is associated with an asset property, specify one of the following:

    • The alias of the time series.

    • The assetId and propertyId that identifies the asset property.

See also: AWS API Documentation

Request Syntax

client.describe_time_series(
    alias='string',
    assetId='string',
    propertyId='string'
)
type alias

string

param alias

The alias that identifies the time series.

type assetId

string

param assetId

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

type propertyId

string

param propertyId

The ID of the asset property.

rtype

dict

returns

Response Syntax

{
    'assetId': 'string',
    'propertyId': 'string',
    'alias': 'string',
    'timeSeriesId': 'string',
    'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
    'dataTypeSpec': 'string',
    'timeSeriesCreationDate': datetime(2015, 1, 1),
    'timeSeriesLastUpdateDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • assetId (string) --

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

    • propertyId (string) --

      The ID of the asset property.

    • alias (string) --

      The alias that identifies the time series.

    • timeSeriesId (string) --

      The ID of the time series.

    • dataType (string) --

      The data type of the time series.

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

    • dataTypeSpec (string) --

      The data type of the structure for this time series. This parameter is required for time series that have the STRUCT data type.

      The options for this parameter depend on the type of the composite model in which you created the asset property that is associated with your time series. Use AWS/ALARM_STATE for alarm state in alarm composite models.

    • timeSeriesCreationDate (datetime) --

      The date that the time series was created, in Unix epoch time.

    • timeSeriesLastUpdateDate (datetime) --

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

DisassociateTimeSeriesFromAssetProperty (new) Link ¶

Disassociates a time series (data stream) from an asset property.

See also: AWS API Documentation

Request Syntax

client.disassociate_time_series_from_asset_property(
    alias='string',
    assetId='string',
    propertyId='string',
    clientToken='string'
)
type alias

string

param alias

[REQUIRED]

The alias that identifies the time series.

type assetId

string

param assetId

[REQUIRED]

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

type propertyId

string

param propertyId

[REQUIRED]

The ID of the asset property.

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.

returns

None

ListTimeSeries (new) Link ¶

Retrieves a paginated list of time series (data streams).

See also: AWS API Documentation

Request Syntax

client.list_time_series(
    nextToken='string',
    maxResults=123,
    assetId='string',
    aliasPrefix='string',
    timeSeriesType='ASSOCIATED'|'DISASSOCIATED'
)
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.

type assetId

string

param assetId

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

type aliasPrefix

string

param aliasPrefix

The alias prefix of the time series.

type timeSeriesType

string

param timeSeriesType

The type of the time series. The time series type can be one of the following values:

  • ASSOCIATED – The time series is associated with an asset property.

  • DISASSOCIATED – The time series isn't associated with any asset property.

rtype

dict

returns

Response Syntax

{
    'TimeSeriesSummaries': [
        {
            'assetId': 'string',
            'propertyId': 'string',
            'alias': 'string',
            'timeSeriesId': 'string',
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'timeSeriesCreationDate': datetime(2015, 1, 1),
            'timeSeriesLastUpdateDate': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • TimeSeriesSummaries (list) --

      One or more time series summaries to list.

      • (dict) --

        Contains a summary of a time series (data stream).

        • assetId (string) --

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

        • propertyId (string) --

          The ID of the asset property.

        • alias (string) --

          The alias that identifies the time series.

        • timeSeriesId (string) --

          The ID of the time series.

        • dataType (string) --

          The data type of the time series.

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

        • dataTypeSpec (string) --

          The data type of the structure for this time series. This parameter is required for time series that have the STRUCT data type.

          The options for this parameter depend on the type of the composite model in which you created the asset property that is associated with your time series. Use AWS/ALARM_STATE for alarm state in alarm composite models.

        • timeSeriesCreationDate (datetime) --

          The date that the time series was created, in Unix epoch time.

        • timeSeriesLastUpdateDate (datetime) --

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

    • nextToken (string) --

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

DescribeStorageConfiguration (updated) Link ¶
Changes (response)
{'disassociatedDataStorage': 'ENABLED | DISABLED'}

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',
    'configurationStatus': {
        'state': 'ACTIVE'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string'
        }
    },
    'lastUpdateDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • storageType (string) --

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

      • SITEWISE_DEFAULT_STORAGE – IoT SiteWise replicates your data into a service managed database.

      • MULTI_LAYER_STORAGE – IoT SiteWise replicates your data into a service managed database and saves a copy of your raw data and metadata in an Amazon S3 object that you specified.

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

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

PutStorageConfiguration (updated) Link ¶
Changes (both)
{'disassociatedDataStorage': 'ENABLED | DISABLED'}

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'
)
type storageType

string

param storageType

[REQUIRED]

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

  • SITEWISE_DEFAULT_STORAGE – IoT SiteWise replicates your data into a service managed database.

  • MULTI_LAYER_STORAGE – IoT SiteWise replicates your data into a service managed database and saves a copy of your raw data and metadata in an Amazon S3 object that you specified.

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 .

rtype

dict

returns

Response Syntax

{
    'storageType': 'SITEWISE_DEFAULT_STORAGE'|'MULTI_LAYER_STORAGE',
    'multiLayerStorage': {
        'customerManagedS3Storage': {
            's3ResourceArn': 'string',
            'roleArn': 'string'
        }
    },
    'disassociatedDataStorage': 'ENABLED'|'DISABLED',
    'configurationStatus': {
        'state': 'ACTIVE'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • storageType (string) --

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

      • SITEWISE_DEFAULT_STORAGE – IoT SiteWise replicates your data into a service managed database.

      • MULTI_LAYER_STORAGE – IoT SiteWise replicates your data into a service managed database and saves a copy of your raw data and metadata in an Amazon S3 object that you specified.

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

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