describeAsset method
Retrieves information about an asset.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter assetId :
The ID of the asset. 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 excludeProperties :
Whether or not to exclude asset properties from the response.
Implementation
Future<DescribeAssetResponse> describeAsset({
required String assetId,
bool? excludeProperties,
}) async {
final $query = <String, List<String>>{
if (excludeProperties != null)
'excludeProperties': [excludeProperties.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/assets/${Uri.encodeComponent(assetId)}',
queryParams: $query,
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return DescribeAssetResponse.fromJson(response);
}