Skip to main content

time_series

Creates, updates, deletes, gets or lists a time_series resource.

Overview

Nametime_series
TypeResource
Idaws.iotsitewise.time_series

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aliasstringThe alias that identifies the time series. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
asset_idstringThe ID of the asset in which the asset property was created. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
data_typestringThe 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. (STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT, VIDEO, ANNOTATION, JSON)
data_type_specstringThe 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. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
property_idstringThe ID of the asset property, in UUID format. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
time_series_arnstringThe ARN of the time series, which has the following format. arn:${Partition}:iotsitewise:${Region}:${Account}:time-series/${TimeSeriesId} (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:/_.]+$</code>)
time_series_creation_datestring (date-time)The date that the time series was created, in Unix epoch time.
time_series_idstringThe ID of the time series.
time_series_last_update_datestring (date-time)The date that the time series was last updated, in Unix epoch time.
workspace_namestringThe name of the workspace. (pattern: <code>^[a-zA-Z0-9_-]+$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_time_seriesselectregionalias, assetId, propertyId, workspaceNameRetrieves 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.
delete_time_seriesdeleteregionalias, assetId, propertyId, workspaceNameDeletes 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. You can't delete a time series until all of its data segments have been deleted from session datasets. 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.
list_time_seriesexecregionnextToken, maxResults, assetId, aliasPrefix, timeSeriesType, workspaceNameRetrieves a paginated list of time series (data streams).

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
aliasstringThe alias that identifies the time series.
aliasPrefixstringThe alias prefix of the time series.
assetIdstringThe ID of the asset in which the asset property was created. 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.
maxResultsintegerThe maximum number of results to return for each paginated request.
nextTokenstringThe token to be used for the next set of paginated results.
propertyIdstringThe 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.
timeSeriesTypestringThe 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.
workspaceNamestringThe name of the workspace.

SELECT examples

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.

SELECT
alias,
asset_id,
data_type,
data_type_spec,
property_id,
time_series_arn,
time_series_creation_date,
time_series_id,
time_series_last_update_date,
workspace_name
FROM aws.iotsitewise.time_series
WHERE region = '{{ region }}' -- required
AND alias = '{{ alias }}'
AND assetId = '{{ assetId }}'
AND propertyId = '{{ propertyId }}'
AND workspaceName = '{{ workspaceName }}'
;

DELETE examples

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. You can't delete a time series until all of its data segments have been deleted from session datasets. 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.

DELETE FROM aws.iotsitewise.time_series
WHERE region = '{{ region }}' --required
AND alias = '{{ alias }}'
AND assetId = '{{ assetId }}'
AND propertyId = '{{ propertyId }}'
AND workspaceName = '{{ workspaceName }}'
;

Lifecycle Methods

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

EXEC aws.iotsitewise.time_series.list_time_series
@region='{{ region }}' --required,
@nextToken='{{ nextToken }}',
@maxResults='{{ maxResults }}',
@assetId='{{ assetId }}',
@aliasPrefix='{{ aliasPrefix }}',
@timeSeriesType='{{ timeSeriesType }}',
@workspaceName='{{ workspaceName }}'
;