listMicrovmImageVersions method
Lists versions of a MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter imageIdentifier :
The unique identifier (ARN or ID) of the MicroVM image to list versions
for.
Parameter maxResults :
The maximum number of results to return in a single call.
Parameter nextToken :
The pagination token from a previous call. Use this token to retrieve the
next page of results.
Implementation
Future<ListMicrovmImageVersionsOutput> listMicrovmImageVersions({
required String imageIdentifier,
int? maxResults,
String? nextToken,
}) async {
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:
'/2025-09-09/microvm-images/${Uri.encodeComponent(imageIdentifier)}/versions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListMicrovmImageVersionsOutput.fromJson(response);
}