lexicons
Creates, updates, deletes, gets or lists a lexicons resource.
Overview
| Name | lexicons |
| Type | Resource |
| Id | aws.polly.lexicons |
Fields
The following fields are returned by SELECT queries:
- get_lexicon
- list_lexicons
| Name | Datatype | Description |
|---|---|---|
lexicon | object | Lexicon object that provides name and the string content of the lexicon. |
lexicon_attributes | object | Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes. |
| Name | Datatype | Description |
|---|---|---|
attributes | object | Provides lexicon metadata. |
name | string | Name of the lexicon. (pattern: <code>[0-9A-Za-z]{1,20}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_lexicon | select | lexicon_name, region | Returns the content of the specified pronunciation lexicon stored in an Amazon Web Services Region. For more information, see Managing Lexicons. | |
list_lexicons | select | region | NextToken | Returns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see Managing Lexicons. |
put_lexicon | replace | lexicon_name, region, Content | 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. | |
delete_lexicon | delete | lexicon_name, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
lexicon_name | string | The name of the lexicon to delete. Must be an existing lexicon in the region. |
region | string | AWS region (default: us-east-1) |
NextToken | string | An opaque pagination token returned from previous ListLexicons operation. If present, indicates where to continue the list of lexicons. |
SELECT examples
- get_lexicon
- list_lexicons
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
;
Returns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see Managing Lexicons.
SELECT
attributes,
name
FROM aws.polly.lexicons
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
;
REPLACE examples
- put_lexicon
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
- delete_lexicon
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
;