listViews method
Returns views in the given instance.
Results are sorted primarily by type, and secondarily by name.
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 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.
Parameter type :
The type of the view.
Implementation
Future<ListViewsResponse> listViews({
required String instanceId,
int? maxResults,
String? nextToken,
ViewType? type,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (type != null) 'type': [type.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/views/${Uri.encodeComponent(instanceId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListViewsResponse.fromJson(response);
}