listVoiceProfiles method

Future<ListVoiceProfilesResponse> listVoiceProfiles({
  1. required String voiceProfileDomainId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the voice profiles in a voice profile domain.

May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

Parameter voiceProfileDomainId : The ID of the voice profile domain.

Parameter maxResults : The maximum number of results in the request.

Parameter nextToken : The token used to retrieve the next page of results.

Implementation

Future<ListVoiceProfilesResponse> listVoiceProfiles({
  required String voiceProfileDomainId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    'voice-profile-domain-id': [voiceProfileDomainId],
    if (maxResults != null) 'max-results': [maxResults.toString()],
    if (nextToken != null) 'next-token': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/voice-profiles',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListVoiceProfilesResponse.fromJson(response);
}