Managing data streams (Amazon CLI)
You can use the following API operations to manage your data streams. The code examples use the Amazon CLI.
-
AssociateTimeSeriesToAssetProperty – Associates a data stream (time series) with an asset property.
-
DisassociateTimeSeriesFromAssetProperty – Disassociates a data stream from an asset property.
-
DeleteTimeSeries – Deletes a data stream.
-
DescribeTimeSeries – Retrieves information about a data stream.
-
ListTimeSeries – Retrieves a paginated list of data streams.
AssociateTimeSeriesToAssetProperty
To associate a data stream with an asset property, run the following command.
The specified asset property must not be currently associated with any data stream.
-
Replace
data-stream-alias
with the alias of the data stream that you're associating. -
Replace
asset-ID
with the ID of the asset in which the asset property was created. -
Replace
property-ID
with the ID of the asset property.
aws iotsitewise associate-time-series-to-asset-property \ --alias
data-stream-alias
\ --assetIdasset-ID
\ --propertyIdproperty-ID
DisassociateTimeSeriesFromAssetProperty
To disassociate a data stream from an asset property, run the following command.
-
Replace
data-stream-alias
with the alias of the data stream that you're disassociating. -
Replace
asset-ID
with the ID of the asset in which the asset property was created. -
Replace
property-ID
with the ID of the asset property.
aws iotsitewise disassociate-time-series-from-asset-property \ --alias
data-stream-alias
\ --assetIdasset-ID
\ --propertyIdproperty-ID
DeleteTimeSeries
To delete a data stream, run the following command.
Replace data-stream-alias
with the alias of the
data stream that you're deleting.
aws iotsitewise delete-time-series --alias
data-stream-alias
To identify a data stream, do one of the following:
-
If the data stream isn't associated with an asset property, specify the
alias
of the data stream. -
If the data stream is associated with an asset property, specify one of the following:
-
The
alias
of the data stream. -
The
assetId
andpropertyId
that identifies the asset property.
-
DescribeTimeSeries
You can use the DescribeTimeSeries
API operation to verify if you
successfully associated or disassociated a data stream.
To retrieve information about a data stream, run the following command.
aws iotsitewise describe-time-series --alias
data-stream-alias
To identify a data stream, do one of the following:
-
If the data stream isn't associated with an asset property, specify the
alias
of the data stream. -
If the data stream is associated with an asset property, specify one of the following:
-
The
alias
of the data stream. -
The
assetId
andpropertyId
that identifies the asset property.
-
ListTimeSeries
You can use the ListTimeSeries
API operation to verify if you
successfully deleted a data stream.
To retrieve a paginated list of data streams, run the following command.
aws iotsitewise list-time-series