listLenses method
List the available lenses.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter lensStatus :
The status of lenses to be returned.
Parameter lensType :
The type of lenses to be returned.
Implementation
Future<ListLensesOutput> listLenses({
String? lensName,
LensStatusType? lensStatus,
LensType? lensType,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
if (lensName != null) 'LensName': [lensName],
if (lensStatus != null) 'LensStatus': [lensStatus.value],
if (lensType != null) 'LensType': [lensType.value],
if (maxResults != null) 'MaxResults': [maxResults.toString()],
if (nextToken != null) 'NextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/lenses',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListLensesOutput.fromJson(response);
}