createVoiceProfileDomain method

Future<CreateVoiceProfileDomainResponse> createVoiceProfileDomain({
  1. required String name,
  2. required ServerSideEncryptionConfiguration serverSideEncryptionConfiguration,
  3. String? clientRequestToken,
  4. String? description,
  5. List<Tag>? tags,
})

Creates a voice profile domain, a collection of voice profiles, their voice prints, and encrypted enrollment audio. For more information about voice profile domains, see Using Amazon Chime SDK Voice Analytics in the Amazon Chime SDK Developer Guide.

May throw AccessDeniedException. May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw ResourceLimitExceededException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

Parameter name : The name of the voice profile domain.

Parameter serverSideEncryptionConfiguration : The server-side encryption configuration for the request.

Parameter clientRequestToken : The unique identifier for the client request. Use a different token for different domain creation requests.

Parameter description : A description of the voice profile domain.

Parameter tags : The tags assigned to the domain.

Implementation

Future<CreateVoiceProfileDomainResponse> createVoiceProfileDomain({
  required String name,
  required ServerSideEncryptionConfiguration
      serverSideEncryptionConfiguration,
  String? clientRequestToken,
  String? description,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'ServerSideEncryptionConfiguration': serverSideEncryptionConfiguration,
    if (clientRequestToken != null) 'ClientRequestToken': clientRequestToken,
    if (description != null) 'Description': description,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/voice-profile-domains',
    exceptionFnMap: _exceptionFns,
  );
  return CreateVoiceProfileDomainResponse.fromJson(response);
}