There are more AWS SDK examples available in the AWS Doc SDK Examples
Use GetAssetPropertyValue
with an AWS SDK or CLI
The following code examples show how to use GetAssetPropertyValue
.
- AWS CLI
-
To retrieve an asset property's current value
The following
get-asset-property-value
example retrieves a wind turbine asset's current total power.aws iotsitewise get-asset-property-value \ --asset-id
a1b2c3d4-5678-90ab-cdef-33333EXAMPLE
\ --property-ida1b2c3d4-5678-90ab-cdef-66666EXAMPLE
Output:
{ "propertyValue": { "value": { "doubleValue": 6890.8677520453875 }, "timestamp": { "timeInSeconds": 1580853000, "offsetInNanos": 0 }, "quality": "GOOD" } }
For more information, see Querying current asset property values in the AWS IoT SiteWise User Guide.
-
For API details, see GetAssetPropertyValue
in AWS CLI Command Reference.
-