AWS IoT SiteWise

2021/11/29 - AWS IoT SiteWise - 2 updated api methods

Changes  AWS IoT SiteWise now supports retention configuration for the hot tier storage.

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

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

      How many 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.

PutStorageConfiguration (updated) Link ¶
Changes (both)
{'retentionPeriod': {'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
    }
)
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 cold 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:

How many 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.

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'
        }
    }
}

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

      How many 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.