putLexicon
inline suspend fun PollyClient.putLexicon(crossinline block: PutLexiconRequest.Builder.() -> Unit): PutLexiconResponse
Stores a pronunciation lexicon in an Amazon Web Services Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation.
Overwriting a lexicon keeps its existing tags. You can specify tags only when you create a lexicon. If you specify tags for a lexicon that already exists, the request fails with a ValidationException. To change the tags of an existing lexicon, use TagResource and UntagResource.
For more information, see Managing Lexicons.
Samples
// Stores a pronunciation lexicon in an AWS Region.
val resp = pollyClient.putLexicon {
name = "W3C"
content = "<Lexicon Content>"
}Content copied to clipboard