listCompatibleImages method
This action returns a list of the different Amazon EC2 Amazon Machine Images (AMIs) that are owned by your AWS account that would be supported for use on a Snow device. Currently, supported AMIs are based on the CentOS 7 (x86_64) - with Updates HVM, Ubuntu Server 14.04 LTS (HVM), and Ubuntu 16.04 LTS - Xenial (HVM) images, available on the AWS Marketplace.
May throw InvalidNextTokenException. May throw Ec2RequestFailedException.
Parameter maxResults
:
The maximum number of results for the list of compatible images.
Currently, a Snowball Edge device can store 10 AMIs.
Parameter nextToken
:
HTTP requests are stateless. To identify what object comes "next" in the
list of compatible images, you can specify a value for
NextToken
as the starting point for your list of returned
images.
Implementation
Future<ListCompatibleImagesResult> listCompatibleImages({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIESnowballJobManagementService.ListCompatibleImages'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListCompatibleImagesResult.fromJson(jsonResponse.body);
}