listViewVersions method
Returns all the available versions for the specified Connect Customer instance and view identifier.
Results will be sorted from highest to lowest.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find the
instanceId in the ARN of the instance.
Parameter viewId :
The identifier of the view. Both ViewArn and
ViewId can be used.
Parameter maxResults :
The maximum number of results to return per page. The default MaxResult
size is 100.
Parameter nextToken :
The token for the next set of results. Use the value returned in the
previous response in the next request to retrieve the next set of results.
Implementation
Future<ListViewVersionsResponse> listViewVersions({
required String instanceId,
required String viewId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
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:
'/views/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(viewId)}/versions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListViewVersionsResponse.fromJson(response);
}