time_series
Creates, updates, deletes, gets or lists a time_series resource.
Overview
| Name | time_series |
| Type | Resource |
| Id | aws.iotsitewise.time_series |
Fields
The following fields are returned by SELECT queries:
- describe_time_series
| Name | Datatype | Description |
|---|---|---|
alias | string | The alias that identifies the time series. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
asset_id | string | The 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_type | 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. (STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT, VIDEO, ANNOTATION, JSON) |
data_type_spec | 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. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
property_id | string | The 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_arn | string | The 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_date | string (date-time) | The date that the time series was created, in Unix epoch time. |
time_series_id | string | The ID of the time series. |
time_series_last_update_date | string (date-time) | The date that the time series was last updated, in Unix epoch time. |
workspace_name | string | The name of the workspace. (pattern: <code>^[a-zA-Z0-9_-]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_time_series | select | region | alias, assetId, propertyId, workspaceName | 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. |
delete_time_series | delete | region | alias, assetId, propertyId, workspaceName | 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. |
list_time_series | exec | region | nextToken, maxResults, assetId, aliasPrefix, timeSeriesType, workspaceName | Retrieves 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
alias | string | The alias that identifies the time series. |
aliasPrefix | string | The alias prefix of the time series. |
assetId | string | The 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. |
maxResults | integer | The maximum number of results to return for each paginated request. |
nextToken | string | The token to be used for the next set of paginated results. |
propertyId | string | The 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. |
timeSeriesType | string | 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. |
workspaceName | string | The name of the workspace. |
SELECT examples
- describe_time_series
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
- delete_time_series
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
- list_time_series
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 }}'
;