Skip to main content

lexicons

Creates, updates, deletes, gets or lists a lexicons resource.

Overview

Namelexicons
TypeResource
Idaws.polly.lexicons

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
lexiconobjectLexicon object that provides name and the string content of the lexicon.
lexicon_attributesobjectMetadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_lexiconselectlexicon_name, regionReturns the content of the specified pronunciation lexicon stored in an Amazon Web Services Region. For more information, see Managing Lexicons.
list_lexiconsselectregionNextTokenReturns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see Managing Lexicons.
put_lexiconreplacelexicon_name, region, ContentStores 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. For more information, see Managing Lexicons.
delete_lexicondeletelexicon_name, regionDeletes the specified pronunciation lexicon stored in an Amazon Web Services Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon or ListLexicon APIs. For more information, see Managing Lexicons.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
lexicon_namestringThe name of the lexicon to delete. Must be an existing lexicon in the region.
regionstringAWS region (default: us-east-1)
NextTokenstringAn opaque pagination token returned from previous ListLexicons operation. If present, indicates where to continue the list of lexicons.

SELECT examples

Returns the content of the specified pronunciation lexicon stored in an Amazon Web Services Region. For more information, see Managing Lexicons.

SELECT
lexicon,
lexicon_attributes
FROM aws.polly.lexicons
WHERE lexicon_name = '{{ lexicon_name }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

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. For more information, see Managing Lexicons.

REPLACE aws.polly.lexicons
SET
Content = '{{ Content }}'
WHERE
lexicon_name = '{{ lexicon_name }}' --required
AND region = '{{ region }}' --required
AND Content = '{{ Content }}' --required;

DELETE examples

Deletes the specified pronunciation lexicon stored in an Amazon Web Services Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon or ListLexicon APIs. For more information, see Managing Lexicons.

DELETE FROM aws.polly.lexicons
WHERE lexicon_name = '{{ lexicon_name }}' --required
AND region = '{{ region }}' --required
;