listComponentVersions method
Retrieves a paginated list of all versions for a component. Greater versions are listed first.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter arn :
The ARN
of the component.
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.
Implementation
Future<ListComponentVersionsResponse> listComponentVersions({
required String arn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
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:
'/greengrass/v2/components/${Uri.encodeComponent(arn)}/versions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListComponentVersionsResponse.fromJson(response);
}