listInterfaceRelationships method

Future<ListInterfaceRelationshipsResponse> listInterfaceRelationships({
  1. required String interfaceAssetModelId,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves a paginated list of asset models that have a specific interface asset model applied to them.

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

Parameter interfaceAssetModelId : The ID of the interface asset model. This can be either the actual ID in UUID format, or else externalId: followed by the external ID.

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<ListInterfaceRelationshipsResponse> listInterfaceRelationships({
  required String interfaceAssetModelId,
  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:
        '/interface/${Uri.encodeComponent(interfaceAssetModelId)}/asset-models',
    queryParams: $query,
    hostPrefix: 'api.',
    exceptionFnMap: _exceptionFns,
  );
  return ListInterfaceRelationshipsResponse.fromJson(response);
}