asset_properties
Creates, updates, deletes, gets or lists an asset_properties resource.
Overview
| Name | asset_properties |
| Type | Resource |
| Id | aws.iotsitewise.asset_properties |
Fields
The following fields are returned by SELECT queries:
- describe_asset_property
- list_asset_properties
| Name | Datatype | Description |
|---|---|---|
asset_external_id | string | The external ID of the asset. For more information, see Using external IDs in the IoT SiteWise User Guide. (pattern: <code>[a-zA-Z0-9_][a-zA-Z_-0-9.:]*[a-zA-Z0-9_]+</code>) |
asset_id | string | The ID of the asset, 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>) |
asset_model_id | string | The ID of the asset model, 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>) |
asset_name | string | The name of the asset. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
asset_property | object | The asset property's definition, alias, and notification state. This response includes this object for normal asset properties. If you describe an asset property in a composite model, this response includes the asset property information in compositeModel. |
composite_model | object | The composite model that declares this asset property, if this asset property exists in a composite model. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the property. (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>) |
alias | string | The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
asset_composite_model_id | string | The ID of the composite model that contains the asset property. (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>) |
external_id | string | The external ID of the property. For more information, see Using external IDs in the IoT SiteWise User Guide. (pattern: <code>[a-zA-Z0-9_][a-zA-Z_-0-9.:]*[a-zA-Z0-9_]+</code>) |
notification | object | Contains asset property value notification information. When the notification state is enabled, IoT SiteWise publishes property value updates to a unique MQTT topic. For more information, see Interacting with other services in the IoT SiteWise User Guide. |
path | array | The structured path to the property from the root of the asset. |
unit | string | The unit of measure (such as Newtons or RPM) of the asset property. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_asset_property | select | asset_id, property_id, region | Retrieves information about an asset property. When you call this operation for an attribute property, this response includes the default attribute value that you define in the asset model. If you update the default value in the model, this operation's response includes the new default value. This operation doesn't return the value of the asset property. To get the value of an asset property, use GetAssetPropertyValue. | |
list_asset_properties | select | asset_id, region | nextToken, maxResults, filter | Retrieves a paginated list of properties associated with an asset. If you update properties associated with the model before you finish listing all the properties, you need to start all over again. |
associate_time_series_to_asset_property | update | alias, assetId, propertyId, region | Associates a time series (data stream) with an asset property. | |
update_asset_property | update | asset_id, property_id, region | Updates an asset property's alias and notification state. This operation overwrites the property's existing alias and notification state. To keep your existing property's alias or notification state, you must include the existing values in the UpdateAssetProperty request. For more information, see DescribeAssetProperty. | |
disassociate_time_series_from_asset_property | exec | alias, assetId, propertyId, region | Disassociates a time series (data stream) from an asset property. |
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 |
|---|---|---|
alias | string | The alias that identifies 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. |
asset_id | string | The ID of the asset to be updated. 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. |
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. |
property_id | string | The ID of the asset property to be updated. 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. |
region | string | AWS region (default: us-east-1) |
filter | string | Filters the requested list of asset properties. You can choose one of the following options: ALL – The list includes all asset properties for a given asset model ID. BASE – The list includes only base asset properties for a given asset model ID. Default: BASE |
maxResults | integer | The maximum number of results to return for each paginated request. If not specified, the default value is 50. |
nextToken | string | The token to be used for the next set of paginated results. |
SELECT examples
- describe_asset_property
- list_asset_properties
Retrieves information about an asset property. When you call this operation for an attribute property, this response includes the default attribute value that you define in the asset model. If you update the default value in the model, this operation's response includes the new default value. This operation doesn't return the value of the asset property. To get the value of an asset property, use GetAssetPropertyValue.
SELECT
asset_external_id,
asset_id,
asset_model_id,
asset_name,
asset_property,
composite_model
FROM aws.iotsitewise.asset_properties
WHERE asset_id = '{{ asset_id }}' -- required
AND property_id = '{{ property_id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a paginated list of properties associated with an asset. If you update properties associated with the model before you finish listing all the properties, you need to start all over again.
SELECT
id,
alias,
asset_composite_model_id,
external_id,
notification,
path,
unit
FROM aws.iotsitewise.asset_properties
WHERE asset_id = '{{ asset_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND filter = '{{ filter }}'
;
UPDATE examples
- associate_time_series_to_asset_property
- update_asset_property
Associates a time series (data stream) with an asset property.
UPDATE aws.iotsitewise.asset_properties
SET
clientToken = '{{ clientToken }}'
WHERE
alias = '{{ alias }}' --required
AND assetId = '{{ assetId }}' --required
AND propertyId = '{{ propertyId }}' --required
AND region = '{{ region }}' --required;
Updates an asset property's alias and notification state. This operation overwrites the property's existing alias and notification state. To keep your existing property's alias or notification state, you must include the existing values in the UpdateAssetProperty request. For more information, see DescribeAssetProperty.
UPDATE aws.iotsitewise.asset_properties
SET
propertyAlias = '{{ propertyAlias }}',
propertyNotificationState = '{{ propertyNotificationState }}',
clientToken = '{{ clientToken }}',
propertyUnit = '{{ propertyUnit }}'
WHERE
asset_id = '{{ asset_id }}' --required
AND property_id = '{{ property_id }}' --required
AND region = '{{ region }}' --required;
Lifecycle Methods
- disassociate_time_series_from_asset_property
Disassociates a time series (data stream) from an asset property.
EXEC aws.iotsitewise.asset_properties.disassociate_time_series_from_asset_property
@alias='{{ alias }}' --required,
@assetId='{{ assetId }}' --required,
@propertyId='{{ propertyId }}' --required,
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}"
}'
;