listComponents method

Future<ListComponentsResponse> listComponents({
  1. int? maxResults,
  2. String? nextToken,
  3. ComponentVisibilityScope? scope,
})

Retrieves a paginated list of component summaries. This list includes components that you have permission to view.

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

Parameter maxResults : The maximum number of results to be returned per paginated request.

Parameter nextToken : The token to be used for the next set of paginated results.

Parameter scope : The scope of the components to list.

Default: PRIVATE

Implementation

Future<ListComponentsResponse> listComponents({
  int? maxResults,
  String? nextToken,
  ComponentVisibilityScope? scope,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (scope != null) 'scope': [scope.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/greengrass/v2/components',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListComponentsResponse.fromJson(response);
}