listCompositionRelationships method
Retrieves a paginated list of composition relationships for an asset model
of type COMPONENT_MODEL.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter assetModelId :
The ID of the asset model. 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.
Default: 50
Parameter nextToken :
The token to be used for the next set of paginated results.
Implementation
Future<ListCompositionRelationshipsResponse> listCompositionRelationships({
required String assetModelId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/asset-models/${Uri.encodeComponent(assetModelId)}/composition-relationships',
queryParams: $query,
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return ListCompositionRelationshipsResponse.fromJson(response);
}