describeTimeSeries method

Future<DescribeTimeSeriesResponse> describeTimeSeries({
  1. String? alias,
  2. String? assetId,
  3. String? propertyId,
  4. String? 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.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter alias : The alias that identifies 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 propertyId : 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.

Parameter workspaceName : The name of the workspace.

Implementation

Future<DescribeTimeSeriesResponse> describeTimeSeries({
  String? alias,
  String? assetId,
  String? propertyId,
  String? workspaceName,
}) async {
  final $query = <String, List<String>>{
    if (alias != null) 'alias': [alias],
    if (assetId != null) 'assetId': [assetId],
    if (propertyId != null) 'propertyId': [propertyId],
    if (workspaceName != null) 'workspaceName': [workspaceName],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/timeseries/describe',
    queryParams: $query,
    hostPrefix: 'api.',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeTimeSeriesResponse.fromJson(response);
}