listServiceVersions method
Lists all supported versions for Snow on-device services. Returns an array
of ServiceVersion object containing the supported versions
for a particular service.
May throw InvalidNextTokenException.
May throw InvalidResourceException.
Parameter serviceName :
The name of the service for which you're requesting supported versions.
Parameter dependentServices :
A list of names and versions of dependant services of the requested
service.
Parameter maxResults :
The maximum number of ListServiceVersions objects to return.
Parameter nextToken :
Because HTTP requests are stateless, this is the starting point for the
next list of returned ListServiceVersionsRequest versions.
Implementation
Future<ListServiceVersionsResult> listServiceVersions({
required ServiceName serviceName,
List<DependentService>? dependentServices,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIESnowballJobManagementService.ListServiceVersions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ServiceName': serviceName.value,
if (dependentServices != null) 'DependentServices': dependentServices,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListServiceVersionsResult.fromJson(jsonResponse.body);
}