get_asset_property_aggregates
async
¶
get_asset_property_aggregates(
aggregate_types: AggregateTypes,
resolution: Resolution,
start_date: Timestamp,
end_date: Timestamp,
*,
config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
asset_id: Optional[ID] = None,
property_id: Optional[ID] = None,
property_alias: Optional[AssetPropertyAlias] = None,
qualities: Optional[Qualities] = None,
time_ordering: Optional[TimeOrdering] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[GetAssetPropertyValueAggregatesMaxResults] = None,
) -> GetAssetPropertyAggregatesResponse
Gets aggregated values for an asset property. For more information, see Querying aggregates in the IoT SiteWise User Guide.
To identify an asset property, you must specify one of the following:
-
The
assetIdandpropertyIdof an asset property. -
A
propertyAlias, which is a data stream alias (for example,/company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.
Parameters:
-
asset_id(Optional[ID], default:None) –The ID of the asset, in UUID format.
-
property_id(Optional[ID], default:None) –The ID of the asset property, in UUID format.
-
property_alias(Optional[AssetPropertyAlias], default:None) –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. -
aggregate_types(AggregateTypes) –The data aggregating function.
-
resolution(Resolution) –The time interval over which to aggregate data.
-
qualities(Optional[Qualities], default:None) –The quality by which to filter asset data.
-
start_date(Timestamp) –The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time.
-
end_date(Timestamp) –The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time.
-
time_ordering(Optional[TimeOrdering], default:None) –The chronological sorting order of the requested information.
Default:
ASCENDING -
next_token(Optional[NextToken], default:None) –The token to be used for the next set of paginated results.
-
max_results(Optional[GetAssetPropertyValueAggregatesMaxResults], default:None) –The maximum number of results to return for each paginated request. A result set is returned in the two cases, whichever occurs first.
-
The size of the result set is equal to 1 MB.
-
The number of data points in the result set is equal to the value of
maxResults. The maximum value ofmaxResultsis 2500.
-
Raises:
-
InternalFailureException–IoT SiteWise can't process your request right now. Try again later.
-
InvalidRequestException–The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.
-
ResourceNotFoundException–The requested resource can't be found.
-
ServiceUnavailableException–The requested service is unavailable.
-
ThrottlingException–Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.
For more information, see Quotas in the IoT SiteWise User Guide.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iotsitewise/_services/async_io_t_site_wise.py
6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 | |