listProvisioningTemplateVersions method
A list of fleet provisioning template versions.
May throw InternalFailureException. May throw InvalidRequestException. May throw ThrottlingException. May throw ResourceNotFoundException. May throw UnauthorizedException.
Parameter templateName
:
The name of the fleet provisioning template.
Parameter maxResults
:
The maximum number of results to return at one time.
Parameter nextToken
:
A token to retrieve the next set of results.
Implementation
Future<ListProvisioningTemplateVersionsResponse>
listProvisioningTemplateVersions({
required String templateName,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(templateName, 'templateName');
_s.validateStringLength(
'templateName',
templateName,
1,
36,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
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:
'/provisioning-templates/${Uri.encodeComponent(templateName)}/versions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListProvisioningTemplateVersionsResponse.fromJson(response);
}