listManagedThingSchemas method

Future<ListManagedThingSchemasResponse> listManagedThingSchemas({
  1. required String identifier,
  2. String? capabilityIdFilter,
  3. String? endpointIdFilter,
  4. int? maxResults,
  5. String? nextToken,
})

List schemas associated with a managed thing.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter identifier : The managed thing id.

Parameter capabilityIdFilter : Filter on a capability id.

Parameter endpointIdFilter : Filter on an endpoint id.

Parameter maxResults : The maximum number of results to return at one time.

Parameter nextToken : A token that can be used to retrieve the next set of results.

Implementation

Future<ListManagedThingSchemasResponse> listManagedThingSchemas({
  required String identifier,
  String? capabilityIdFilter,
  String? endpointIdFilter,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (capabilityIdFilter != null)
      'CapabilityIdFilter': [capabilityIdFilter],
    if (endpointIdFilter != null) 'EndpointIdFilter': [endpointIdFilter],
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/managed-thing-schemas/${Uri.encodeComponent(identifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListManagedThingSchemasResponse.fromJson(response);
}