listComponents method
Future<ListComponentsResponse>
listComponents({
- int? maxResults,
- String? nextToken,
- ComponentVisibilityScope? scope,
Retrieves a paginated list of component summaries. This list includes components that you have permission to view.
May throw ValidationException. May throw AccessDeniedException. May throw ThrottlingException. May throw InternalServerException.
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.toValue()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/greengrass/v2/components',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListComponentsResponse.fromJson(response);
}