listFieldOptions method
Lists all of the field options for a field identifier in the domain.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainId :
The unique identifier of the Cases domain.
Parameter fieldId :
The unique identifier of a field.
Parameter maxResults :
The maximum number of results to return per page.
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 values :
A list of FieldOption values to filter on for
ListFieldOptions.
Implementation
Future<ListFieldOptionsResponse> listFieldOptions({
required String domainId,
required String fieldId,
int? maxResults,
String? nextToken,
List<String>? values,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (values != null) 'values': values,
};
final response = await _protocol.send(
payload: null,
method: 'POST',
requestUri:
'/domains/${Uri.encodeComponent(domainId)}/fields/${Uri.encodeComponent(fieldId)}/options-list',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListFieldOptionsResponse.fromJson(response);
}