listServiceTemplateVersions method
List major or minor versions of a service template with detail data.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter templateName :
The name of the service template.
Parameter majorVersion :
To view a list of minor of versions under a major version of a service
template, include major Version.
To view a list of major versions of a service template, exclude
major Version.
Parameter maxResults :
The maximum number of major or minor versions of a service template to
list.
Parameter nextToken :
A token that indicates the location of the next major or minor version in
the array of major or minor versions of a service template, after the list
of major or minor versions that was previously requested.
Implementation
Future<ListServiceTemplateVersionsOutput> listServiceTemplateVersions({
required String templateName,
String? majorVersion,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AwsProton20200720.ListServiceTemplateVersions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'templateName': templateName,
if (majorVersion != null) 'majorVersion': majorVersion,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListServiceTemplateVersionsOutput.fromJson(jsonResponse.body);
}