listTimeSeries method
Retrieves a paginated list of time series (data streams).
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter aliasPrefix :
The alias prefix of the time series.
Parameter assetId :
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.
Parameter maxResults :
The maximum number of results to return for each paginated request.
Parameter nextToken :
The token to be used for the next set of paginated results.
Parameter timeSeriesType :
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.
Parameter workspaceName :
The name of the workspace.
Implementation
Future<ListTimeSeriesResponse> listTimeSeries({
String? aliasPrefix,
String? assetId,
int? maxResults,
String? nextToken,
ListTimeSeriesType? timeSeriesType,
String? workspaceName,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
if (aliasPrefix != null) 'aliasPrefix': [aliasPrefix],
if (assetId != null) 'assetId': [assetId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (timeSeriesType != null) 'timeSeriesType': [timeSeriesType.value],
if (workspaceName != null) 'workspaceName': [workspaceName],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/timeseries',
queryParams: $query,
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return ListTimeSeriesResponse.fromJson(response);
}